LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Destination Host Unreachable and unknown host ERRORS (https://www.linuxquestions.org/questions/linux-networking-3/destination-host-unreachable-and-unknown-host-errors-4175736732/)

vic121212 05-05-2024 10:39 AM

Destination Host Unreachable and unknown host ERRORS
 
Hi, I have just made the reboot of my lfs v12 and everything seems fine but i am unable to do pings. All the comprovations that the system does after rebot but before login are marked as OK.

When i try ping google.com I recive ping: unknown host.

If I try the ping 8.8.8.8 I recive
PING 8.8.8.8 (8.8.8.8): 56 data bytes
92 bytes from lfsPorfa (192.168.119.159): Destination Host Unreachable (this last line in repeat)

My /etc/sysconfig/ifconfig.ens33 file has
ONBOOT=yes
IFACE=ens33
SERVICE=ipv4-static
IP=192.168.119.159
GATEWAY=192.168.119.33
PREFIX=24
BROADCAST=192.168.119.255

My /etc/udev/rules.d/70-persistent-net.rules file has
SUBSYSTEM=="net"
ACTION=="add"
DRIVES=="?*"
ATTR{address}=="00:0c:29:86:90:d7"
ATTR{dev_id}=="0x0"
ATTR{type}=="1"
NAME="ens33


My /etc/hosts file has

127.0.0.1 localhost
192.168.119.159 lfsPorfa

My /etc/resolv.conf file has

nameserver 8.8.8.8
nameserver 8.8.4.4


I am working in VMware, with Ubuntu and Bridged as my network adapter.

I don't know what to do and if someone could help me I would apreciated :)

___ 05-06-2024 03:23 AM

Can you ping 192.168.119.159? (yourself &.33 GW?)
Post: ip r (&maybe ip a) (or route; ifconfig -a)
What does dmesg say, relevant as in https://www.linuxquestions.org/quest...5/#post4943801
Also maybe https://unix.stackexchange.com/quest...nning-centos-7

business_kid 05-06-2024 05:59 AM

Welcome to LQ, vic121212.

The file you left out of the collection was the routing table. Post the output of 'route' with no options. You might have to add a route or two. I take it the VM has NAT (=Network Address Translation).

As a suggestion, I have
Code:

alias ping='ping -c2'
in the startup stuff for bash so you can type ping without it endlessly repeating. I take it your host networking works?

vic121212 05-07-2024 06:57 AM

Quote:

Originally Posted by ___ (Post 6500093)
Can you ping 192.168.119.159? (yourself &.33 GW?)
Post: ip r (&maybe ip a) (or route; ifconfig -a)
What does dmesg say, relevant as in https://www.linuxquestions.org/quest...5/#post4943801
Also maybe https://unix.stackexchange.com/quest...nning-centos-7


Hii,

(Now that I have implemneted alias ping='ping -c2')
If i try to ping 192.168.119.159 i recive:
PING 192.168.119.159 (119.168.119.159): 56 data bytes
64 bytes from 192.168.119.159: icmp_seq=0 ttl=64 time=0.347 ms
2 packet trasnmited, 2 packet recived, 0% package loss


If i try to ping 192.168.119.33 i recive:
PING 192.168.119.33 (119.168.119.33): 56 data bytes
92 bytes from lfsPorfa (192.168.119.159): Destination Host Unreachable
92 bytes from lfsPorfa (192.168.119.159): Destination Host Unreachable
2 packet trasnmited, 0 packet recived, 100% package loss


ip r returns:
default via 192.168.119.33 dev ens33
192.168.119.0/24 dev ens33 proto kernel scope link src 192.168.119.159



ip a returns
1: lo_ <LOOPBACK,UP,LOWER_UP> mtu 65536 gdisc noqueue state UNKNOWN group default qlen 1000
link-loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_Ift forever preferred_Ift forever
inet6 ::1/128 scope host proto kernel_lo
valid_Ift forever preferred_Ift forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> ntu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link-ether 00:0c:29:86:90:d7 brd ff:ff:ff:ff:ff:ff
inet 192.168.119.159/24 brd 192.168.119.255 scope global ens33
valid_Ift forever preferred_lft forever
inet6 fe80::20c:29ff:fe86:90d7/64 scope link proto kernel_ll

Z0c:29f1:fe86:9047764 scope link proto kernel_11
valid_lft forever preferred_Ift forever
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0




ifconfig -a returns

ens33 Link encap:Ethernet HWaddr 00:0C:29:86:90:D7
inet addr:192.168.119.159 Bcast:192.168.119.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frane:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1932 TX bytes:1216
Interrupt:19 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen: 1000
RX bytes:4032 TX bytes:4032

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frane:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 TX bytes:0

vic121212 05-07-2024 11:33 AM

Quote:

Originally Posted by business_kid (Post 6500113)
Welcome to LQ, vic121212.

The file you left out of the collection was the routing table. Post the output of 'route' with no options. You might have to add a route or two. I take it the VM has NAT (=Network Address Translation).

As a suggestion, I have
Code:

alias ping='ping -c2'
in the startup stuff for bash so you can type ping without it endlessly repeating. I take it your host networking works?

Hi, yes I use NAT.

If I set alias ping='ping -c2', when I ping myself I receive 2 packet trasnmited, 2 packet recived, 0% package loss

if i do a ip route i get:
default via 192.168.119.33 dev ens33
192.168.119.0/24 dev ens33 proto kernel scope link src 192.168.119.159

___ 05-08-2024 03:45 AM

Apparently, GATEWAY=192.168.119.33 is wrong. (IDK VMware, only VirtualBox) (nor LFS)

How did you choose 119.33? https://www.ibm.com/support/pages/ho...static-ip-ipv4

Maybe try: dhclient -v ens33
(or try mll 10MB! distro .iso, to see what dhcp gets)

(RX bytes:1932 TX bytes:1216 would seem to indicate ?something? is talking!)

Hopefully other LQ'ers may know more ....

murugesandins 05-10-2024 03:55 AM

If you are using vmplayer(VirtualBox)
1) Press Ctrl d => Edit virtual machine settings
2) Validate Network Adapter => NAT/... required option => verify which one is being used at other available virtual machines.


All times are GMT -5. The time now is 11:56 AM.