- 论坛徽章:
- 0
|
两块网卡,只有一块接了网线,为什么两块都可以ping到
# more ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.27
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
# more ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.28
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
# ifconfig
eth1 Link encap:Ethernet HWaddr 00:20:ED:64:E2:90
inet addr:192.168.1.28 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24372 errors:0 dropped:0 overruns:0 frame:0
TX packets:6458 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2418192 (2.3 Mb) TX bytes:853787 (833.7 Kb)
Interrupt:5 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1532 errors:0 dropped:0 overruns:0 frame:0
TX packets:1532 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:139299 (136.0 Kb) TX bytes:139299 (136.0 Kb)
# ping 192.168.1.27
PING 192.168.1.27 (192.168.1.27) from 192.168.1.27 : 56(84) bytes of data.
64 bytes from 192.168.1.27: icmp_seq=1 ttl=255 time=0.030 ms
64 bytes from 192.168.1.27: icmp_seq=2 ttl=255 time=0.022 ms
64 bytes from 192.168.1.27: icmp_seq=3 ttl=255 time=0.004 ms
^[[A64 bytes from 192.168.1.27: icmp_seq=4 ttl=255 time=0.006 ms
--- 192.168.1.27 ping statistics ---
4 packets transmitted, 4 received, 0% loss, time 2997ms
rtt min/avg/max/mdev = 0.004/0.015/0.030/0.011 ms
# ping 192.168.1.28
PING 192.168.1.28 (192.168.1.2 from 192.168.1.28 : 56(84) bytes of data.
64 bytes from 192.168.1.28: icmp_seq=1 ttl=255 time=0.027 ms
64 bytes from 192.168.1.28: icmp_seq=2 ttl=255 time=0.004 ms
64 bytes from 192.168.1.28: icmp_seq=3 ttl=255 time=0.004 ms
64 bytes from 192.168.1.28: icmp_seq=4 ttl=255 time=0.005 ms
--- 192.168.1.28 ping statistics ---
4 packets transmitted, 4 received, 0% loss, time 2997ms
rtt min/avg/max/mdev = 0.004/0.010/0.027/0.009 ms
这是我的配置文件和刚才执行的几条命令。 |
|