root@forlinx:/# ifconfig
eth0 Link encap:Ethernet HWaddr 5E:4A:4B:B9:4D:0A
inet addr:192.168.0.232 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::5c4a:4bff:feb9:4d0a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:72 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4797 (4.6 KiB) TX bytes:508 (508.0 B)
Interrupt:64
eth0:1 Link encap:Ethernet HWaddr 5E:4A:4B:B9:4D:0A
inet addr:192.168.1.232 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:64
可以和电脑一样同时ping通两个网段
root@forlinx:/# ping 192.168.0.52
PING 192.168.0.52 (192.168.0.52): 56 data bytes
64 bytes from 192.168.0.52: seq=0 ttl=128 time=0.349 ms
64 bytes from 192.168.0.52: seq=1 ttl=128 time=0.268 ms
64 bytes from 192.168.0.52: seq=2 ttl=128 time=0.271 ms
^C
--- 192.168.0.52 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.268/0.296/0.349 ms
root@forlinx:/# ping 192.168.1.52
PING 192.168.1.52 (192.168.1.52): 56 data bytes
64 bytes from 192.168.1.52: seq=0 ttl=128 time=0.593 ms
64 bytes from 192.168.1.52: seq=1 ttl=128 time=0.352 ms
64 bytes from 192.168.1.52: seq=2 ttl=128 time=0.328 ms
^C
--- 192.168.1.52 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.328/0.424/0.593 ms