destination host unreachable linux

У меня есть два компьютера ubuntu в локальной сети, и ни один из них не может пинговать друг друга. Каждый раз, когда я пытаюсь, я получаю сообщение об ошибке «Недоступный хост-узел». Оба компьютера имеют доступ к Интернету с любыми проблемами.

У меня есть маршрутизатор ActionTech v1000h от Telus. Я был в контакте с одним из их представителей клиентов, и они сказали, что не должно быть причин, по которым два устройства не могут пинговать друг друга в сети.

Я полностью в растерянности, у любого из вас есть идеи?

Компьютер 1:

sudo iptables -L

Компьютер 2:

sudo iptables -L

Изменить: Пример ошибки, когда компьютер 1 пытается выполнить ping-компьютер 2:

Изменить 2: arp -a обоих компьютеров

Изменить 3: nmap -sn 192.168.1.0/24 на компьютере 2

Изменить 4: Журналы tcpdump на обоих компьютерах при первом пинге 192.168.1.254, а затем друг другу:

Изменить 5: Установите статические ips для обоих компьютеров etho0 и подключите их с помощью интернет-кабеля. Оба компьютера могут определенно пинговать друг друга через кабель Ethernet! ifconfig -a eth0 результатов:

8 ответов

ping-шлюз с обоих компьютеров ping 192.168.1.254 затем попытайтесь выполнить команду ping comp1 в compt2 и comp2 в comp1 затем опубликуйте результаты arp -a из BOTH boxes

Интересно, что-то блокирует трафик

запустите sudo tcpdump -ni wlan0 arp в одном окне на обоих компьютерах, а затем попытайтесь выполнить pinging друг друга и шлюз из другого окна на оба снова и опубликовать результаты

До сих пор это показывает, что comp1 делает то, что предполагается отправить ARP-запрос (запрашивая адрес comp2s etherner), но не получая ответ arp (слушая что-нибудь обратно). Вам нужно увидеть tcpdump с PC2, чтобы увидеть полную картину. Либо запустите команду экрана, либо сделайте это на PC1 sudo tcpdump -w pc1.pcap -ni wlan0 arp & , а на PC2 sudo tcpdump -w pc2.pcap -ni wlan0 arp & & amp; следует бросить его в фоновом режиме и дать вам свое приглашение обратно для pings. После того, как pings не удалось вернуть задания на передний план, fg %1 остановите его ctrl+c и прочитайте записанные файлы с помощью sudo tcpdump -r pc1/2.pcap

Edit3 ПК делают то, что они предполагают, выставляя ARP, но они не получают, что указывает на маршрутизатор. Может быть, отключить настройку брандмауэра, сомневаюсь, что он поддерживает VLAN? Kinda желает, чтобы вы позволили ему работать немного дольше 22: 45: 48.379058 , ваш маршрутизатор отправил свой собственный запрос ARP, когда он искал PC1 22:45:48.379058 ARP, Request who-has 192.168.1.77 tell 192.168.1.254, length 28 , и оба ПК должны были его видеть, мы можем видеть, что PC1 увидел его и ответил своим IP-адресом, но не мог сказать, получил ли PC2 его с тех пор, как вы остановили его, остановившись только на 22: 45: 09.796214 . Предположим, что вы синхронизированы с NTP.

Посмотрите, что он все еще не разрешен. Не видел, что у вас есть эти адаптеры на обоих ПК. Можете ли вы подключиться к маршрутизатору на eth вместо wlan и посмотреть, сможете ли вы пинговать? Или получить еще один маршрутизатор? Или сделать горячую точку на телефоне подключить оба компьютера и попытаться выполнить ping? Также удивлен, увидев, что вы смогли подключить два компьютера вместе и пинговать друг друга, вы использовали кроссоверный кабель?

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

Are you new to LinuxQuestions.org? Visit the following links:
Site Howto | Site FAQ | Sitemap | Register Now

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux — A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author’s experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Click Here to receive this Complete Guide absolutely free.

I have my Linux box with integrated NIC (eth1) connected via router to the public network. Able to ping itself but not able to ping the gateway of the router:
[root@linux2 root]# ping 192.168.15.1
PING 192.168.15.1 (192.168.15.1) 56(84) bytes of data.
From 192.168.15.7 icmp_seq=1 Destination Host Unreachable
From 192.168.15.7 icmp_seq=2 Destination Host Unreachable
From 192.168.15.7 icmp_seq=3 Destination Host Unreachable

Some of the relevant information :
[root@linux2 root]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:13:20:3F:02:B1
inet addr:192.168.15.7 Bcast:192.168.15.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:64 errors:0 dropped:0 overruns:0 frame:0
TX packets:61 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:2562 (2.5 Kb)
Interrupt:23 Base address:0xd840 Memory:dfaff000-dfaff038

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:727 errors:0 dropped:0 overruns:0 frame:0
TX packets:727 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:52749 (51.5 Kb) TX bytes:52749 (51.5 Kb)

[root@linux2 rc.d]# cat /etc/resolv.conf
nameserver 68.87.64.196
nameserver 68.87.66.196

[root@linux2 root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.15.1 0.0.0.0 UG 0 0 0 eth1

An external card (eth0) in the PCI slot is working fine. When connected to the router from eth0 instead of eth1, by giving the same Static IP Address(192.168.15.7), I am able to ping the outside world. The ifconfig details for the eth0 NIC as follows:

[root@linux2 root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:12:17:4E:A3:29
inet addr:192.168.15.7 Bcast:192.168.15.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3148 (3.0 Kb) TX bytes:2756 (2.6 Kb)
Interrupt:16 Base address:0xb400

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:1717 errors:0 dropped:0 overruns:0 frame:0
TX packets:1717 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:125854 (122.9 Kb) TX bytes:125854 (122.9 Kb)
——————————————————————————————

I have 3 VMs with Ubuntu 12.10: m1, m2 and m3. Here are their IPs

When I try to ping between them, I get a destination host unreachable. If I set them to 192.168.1.X, then the ping works fine, so the VM setup is working fine. The issue is when I put them in a different 192.168.X ip.

What’s the ideal setup for all 3 machines to be able to ping each other?

2 Answers 2

If you’re using a normal netmask of 255.255.255.0, that means that they are on different subnets. You need to set up some way of routing between them. I don’t know what virtualization software you’re using, but the 2 most common ones (VMWare and Virtualbox) both have support for configuring and modifying virtual networks.

You will have to look for the network settings config options.

EDIT: Depending on what you’re trying to do, dennis’ answer may be easier.

Change the subnet mask accordingly: in your case, 255.255.0.0

Not the answer you’re looking for? Browse other questions tagged unix networking routing or ask your own question.

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2019 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2019.11.15.35459

Оцените статью
07-20-2005, 01:29 AM #1