当前位置: 技术问答>linux和unix
ping 的奇怪问题
来源: 互联网 发布时间:2016-12-01
本文导语: # ifconfig br0 Link encap:Ethernet HWaddr 00:E0:4C:81:96:C1 inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 err...
# ifconfig
br0 Link encap:Ethernet HWaddr 00:E0:4C:81:96:C1
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:860 (860.0 B)
eth0 Link encap:Ethernet HWaddr 00:E0:4C:81:96:C1
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:4
eth1 Link encap:Ethernet HWaddr 00:E0:4C:81:96:C9
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:913 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:84032 (82.0 KiB) TX bytes:4122 (4.0 KiB)
Interrupt:4
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:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:672 (672.0 B) TX bytes:672 (672.0 B)
# ping 192.168.2.150
PING 192.168.2.150 (192.168.2.150): 56 data bytes
64 bytes from 192.168.2.150: seq=0 ttl=127 time=0.000 ms
64 bytes from 192.168.2.150: seq=1 ttl=127 time=10.000 ms
64 bytes from 192.168.2.150: seq=2 ttl=127 time=10.000 ms
64 bytes from 192.168.2.150: seq=3 ttl=127 time=10.000 ms
64 bytes from 192.168.2.150: seq=4 ttl=127 time=10.000 ms
64 bytes from 192.168.2.150: seq=5 ttl=127 time=10.000 ms
^C
--- 192.168.2.150 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 0.000/8.333/10.000 ms
# ping 192.168.1.150
PING 192.168.1.150 (192.168.1.150): 56 data bytes
这个IP ping不通。。 郁闷到家了。
问题描述: 192.168.1.100 是一台嵌入式的设备,而192.168.2.150,192.168.1.150是一台PC机的两个IP。 这个设备能ping通 2 网段的,但ping 不通1 网段的。
br0 Link encap:Ethernet HWaddr 00:E0:4C:81:96:C1
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:860 (860.0 B)
eth0 Link encap:Ethernet HWaddr 00:E0:4C:81:96:C1
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:4
eth1 Link encap:Ethernet HWaddr 00:E0:4C:81:96:C9
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:913 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:84032 (82.0 KiB) TX bytes:4122 (4.0 KiB)
Interrupt:4
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:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:672 (672.0 B) TX bytes:672 (672.0 B)
# ping 192.168.2.150
PING 192.168.2.150 (192.168.2.150): 56 data bytes
64 bytes from 192.168.2.150: seq=0 ttl=127 time=0.000 ms
64 bytes from 192.168.2.150: seq=1 ttl=127 time=10.000 ms
64 bytes from 192.168.2.150: seq=2 ttl=127 time=10.000 ms
64 bytes from 192.168.2.150: seq=3 ttl=127 time=10.000 ms
64 bytes from 192.168.2.150: seq=4 ttl=127 time=10.000 ms
64 bytes from 192.168.2.150: seq=5 ttl=127 time=10.000 ms
^C
--- 192.168.2.150 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 0.000/8.333/10.000 ms
# ping 192.168.1.150
PING 192.168.1.150 (192.168.1.150): 56 data bytes
这个IP ping不通。。 郁闷到家了。
问题描述: 192.168.1.100 是一台嵌入式的设备,而192.168.2.150,192.168.1.150是一台PC机的两个IP。 这个设备能ping通 2 网段的,但ping 不通1 网段的。
|
不是一个网段肯定ping不通了
|
192.168.2.150,
192.168.1.150是一台PC机的两个IP
你怎么处理PC的2个IP的 在嵌入式设备ping的时候
192.168.1.150是一台PC机的两个IP
你怎么处理PC的2个IP的 在嵌入式设备ping的时候
|
楼主需要网络知识,不同网段得有正确路由
|
看看子网划分吧