现在使用ifconfig命令设置此网卡IP:
root@ELF1:~# ifconfig eth2 up
root@ELF1:~# ifconfig eth2 192.168.3.232
使用ping命令ping PC机测试(这里设置PC机IP为192.168.3.102):
root@ELF1:~# ping 192.168.3.102
PING 192.168.3.102(192.168.3.102)56(84) bytes of data.
64 bytes from 192.168.3.102: icmp seq =1 ttl =64 time =2.08 ms
64 bytes from 192.168.3.102: icmp seq =2 ttl =64 time =0.470 ms
64 bytes from 192.168.3.102: icmp seq =3 ttl =64 time =0.850 ms
64 bytes from 192.168.3.102: icmp seq =4 ttl =64 time=0.671 ms
64 bytes from 192.168.3.102: icmp seq =5 ttl =64 time =0.418 ms
64 bytes from 192.168.3.102: icmp seq =6 ttl =64 time =0.792 ms