Pinging computers on local network: destination host unreachable
I have two ubuntu computers on a local network and neither one of them can ping each other. Every time I try I get the «destination host unreachable» error message. Both computers are able to access the internet with any problems. I have a ActionTech v1000h router from Telus. I’ve been in touch with one of their customer representatives and they said that there should’t be any reason why two devices cannot ping each other on the network. I’m totally at a loss, do any of you guys have any ideas? Computer 1: ifconfig -a
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:10084 errors:0 dropped:0 overruns:0 frame:0 TX packets:10084 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:797420 (797.4 KB) TX bytes:797420 (797.4 KB) wlan0 Link encap:Ethernet HWaddr c4:85:08:77:d3:f5 inet addr:192.168.1.77 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::c685:8ff:fe77:d3f5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:373068 errors:0 dropped:0 overruns:0 frame:0 TX packets:380158 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:103445020 (103.4 MB) TX bytes:112630337 (112.6 MB)
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 wlan0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
etho0 Link encap:Ethernet HWaddr 00:24:8c:ae:f6:91 UP BROADCAST 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:2 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:110 errors:0 dropped:0 overruns:0 frame:0 TX packets:110 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8414 (8.4 KB) TX bytes:8414 (8.4 KB) wlan0 Link encap:Ethernet HWaddr 00:22:43:9b:7b:64 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::222:43ff:fe9b:7b64/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:252 errors:0 dropped:0 overruns:0 frame:0 TX packets:435 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:123143 (123.1 KB) TX bytes:65828 (65.8 KB)
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. From 192.168.1.77 icmp_seq=1 Destination Host Unreachable From 192.168.1.77 icmp_seq=2 Destination Host Unreachable From 192.168.1.77 icmp_seq=3 Destination Host Unreachable From 192.168.1.77 icmp_seq=4 Destination Host Unreachable From 192.168.1.77 icmp_seq=5 Destination Host Unreachable From 192.168.1.77 icmp_seq=6 Destination Host Unreachable ^C --- 192.168.1.2 ping statistics --- 7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6031ms pipe 3
? (192.168.1.254) at 20:76:00:f5:3b:70 [ether] on wlan0
? (192.168.1.254) at 20:76:00:f5:3b:70 [ether] on wlan0 ? (192.168.1.77) at on wlan0
Starting Nmap 6.40 ( http://nmap.org ) at 2014-05-07 21:14 PDT Nmap scan report for 192.168.1.2 Host is up (0.00024s latency). Nmap done: 256 IP addresses (1 host up) scanned in 3.30 seconds
Edit 4: The tcpdump logs of both computers while the first ping 192.168.1.254 and then each other: Computer 1:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on wlan0, link-type EN10MB (Ethernet), capture size 65535 bytes 22:45:01.661300 ARP, Request who-has 192.168.1.2 tell 192.168.1.77, length 28 22:45:02.659393 ARP, Request who-has 192.168.1.2 tell 192.168.1.77, length 28 22:45:03.659394 ARP, Request who-has 192.168.1.2 tell 192.168.1.77, length 28 22:45:04.676872 ARP, Request who-has 192.168.1.2 tell 192.168.1.77, length 28 22:45:05.675391 ARP, Request who-has 192.168.1.2 tell 192.168.1.77, length 28 22:45:06.675396 ARP, Request who-has 192.168.1.2 tell 192.168.1.77, length 28 22:45:07.692825 ARP, Request who-has 192.168.1.2 tell 192.168.1.77, length 28 22:45:48.379058 ARP, Request who-has 192.168.1.77 tell 192.168.1.254, length 28 22:45:48.379108 ARP, Reply 192.168.1.77 is-at c4:85:08:77:d3:f5, length 28 22:45:54.419388 ARP, Request who-has 192.168.1.254 tell 192.168.1.77, length 28 22:45:54.420875 ARP, Reply 192.168.1.254 is-at 20:76:00:f5:3b:70, length 28
reading from file pc2.pcap, link-type EN10MB (Ethernet) 22:44:43.538367 ARP, Request who-has 192.168.1.254 tell 192.168.1.2, length 28 22:44:43.676705 ARP, Reply 192.168.1.254 is-at 20:76:00:f5:3b:70 (oui Unknown), length 28 22:45:02.107935 ARP, Request who-has 192.168.1.254 tell 192.168.1.2, length 28 22:45:02.107951 ARP, Reply 192.168.1.254 is-at 20:76:00:f5:3b:70 (oui Unknown), length 28 22:45:06.780619 ARP, Request who-has 192.168.1.77 tell 192.168.1.2, length 28 22:45:07.778419 ARP, Request who-has 192.168.1.77 tell 192.168.1.2, length 28 22:45:08.778419 ARP, Request who-has 192.168.1.77 tell 192.168.1.2, length 28 22:45:09.796214 ARP, Request who-has 192.168.1.77 tell 192.168.1.2, length 28
Edit 5: Setup static ips for both computers etho0 and connected them with an internet cable. Both computers can definitely ping each other through the ethernet cable! ifconfig -a eth0 results: Computer 1:
eth0 Link encap:Ethernet HWaddr 68:68:68:00:62:a4 inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::6a68:68ff:fe00:62a4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4060 (4.0 KB) TX bytes:7629 (7.6 KB)
eth0 Link encap:Ethernet HWaddr 00:24:8c:ae:f6:91 inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::224:8cff:feae:f691/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:250 errors:0 dropped:0 overruns:0 frame:0 TX packets:130 errors:0 dropped:0 overruns:0 carrier:3 collisions:0 txqueuelen:1000 RX bytes:26501 (26.5 KB) TX bytes:20897 (20.8 KB)
«Destination Host Unreachable» and ssh » No route to host»
На центосе стоит 2 сетевые карты с этими айпи. И нету подключения к интернету.
При попытке пинга с Убунты локальной машины центос пишет
Чего? Ты с локальной машины с убунтой пингуешь сам себя и тебе отвечает центос?
Я с Убунты(192.168.8.101) пытаюсь пинговать центос(192.168.100.166 и 192.168.8.1) На центосе установлены 2 сетевые карты с такими айпи. К 166 подключен кабель от глобальной сетки, а со второй карты идет кабель в роутер и от роутера второй кабель идет в убунту.
Не судите, но тут думаю есть проблема.
route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.8.0 0.0.0.0 255.255.255.0 U 100 0 0 enp2s1 192.168.8.1 192.168.100.166 255.255.255.255 UGH 0 0 0 enp2s5 192.168.8.101 192.168.100.166 255.255.255.255 UGH 0 0 0 enp2s5 192.168.100.0 0.0.0.0 255.255.255.0 U 100 0 0 enp2s5 192.168.100.166 192.168.100.254 255.255.255.255 UGH 0 0 0 enp2s5
Ну так у Вас просто сеть не работает.
Начинать надо сначала — приведите список и параметры сетевых интерфейсов на локальной машине (команда ifconfig), а также таблицу маршрутизации (команда ip route).
Ну и проверьте, есть ли сеть физически (в логах dmesg должны быть строчки, что сетевые интерфейсы подняты).
Это с какой машины таблица маршрутизации?
ifconfig enp2s5 Link encap:Ethernet HWaddr 00:16:e6:66:3d:f2 inet addr:192.168.8.101 Bcast:192.168.8.255 Mask:255.255.255.0 inet6 addr: fe80::9d31:3207:5516:4f24/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21420 errors:0 dropped:1 overruns:0 frame:0 TX packets:12467 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8616229 (8.6 MB) TX bytes:1984494 (1.9 MB) Interrupt:21 lo Link encap:Локальная петля (Loopback) inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:2153 errors:0 dropped:0 overruns:0 frame:0 TX packets:2153 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:300690 (300.6 KB) TX bytes:300690 (300.6 KB) ip route default via 192.168.8.1 dev enp2s5 proto static metric 100 169.254.0.0/16 dev enp2s5 scope link metric 1000 192.168.8.0/24 dev enp2s5 proto kernel scope link src 192.168.8.101 metric 100
ifconfig enp2s1: flags=4163 mtu 1500 inet 192.168.8.1 netmask 255.255.255.0 broadcast 192.168.8.255 ether 00:1e:58:2b:f3:d8 txqueuelen 1000 (Ethernet) RX packets 10877 bytes 1691073 (1.6 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 35 bytes 3226 (3.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp2s5: flags=4163 mtu 1500 inet 192.168.100.166 netmask 255.255.255.0 broadcast 192.168.100.255 inet6 fe80::216:e6ff:fe66:3830 prefixlen 64 scopeid 0x20 ether 00:16:e6:66:38:30 txqueuelen 1000 (Ethernet) RX packets 21222 bytes 3227539 (3.0 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 7336 bytes 1019089 (995.2 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 21 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback) RX packets 8204 bytes 1397066 (1.3 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 8204 bytes 1397066 (1.3 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ip route 192.168.8.0/24 dev enp2s1 proto kernel scope link src 192.168.8.1 metric 100 192.168.8.1 via 192.168.100.166 dev enp2s5 scope link 192.168.8.101 via 192.168.100.166 dev enp2s5 scope link 192.168.100.0/24 dev enp2s5 proto kernel scope link src 192.168.100.166 metric 100 192.168.100.166 via 192.168.100.254 dev enp2s5