cancel
Showing results for 
Search instead for 
Did you mean: 
linuxkull
Mission Specialist
Mission Specialist
  • 750 Views

nmcli ipv4.addresses (From linuxkull (192.168.65.1) icmp_seq=2 Destination Host Unreachable)

Jump to solution

nmcli connection modify eth0 ipv4.addresses 192.168.65.1/24 ipv4.gateway 192.168.115.1 ipv4.dns '8 8 8 8 8 8 4 4' ipv4.method static

I have used the command to set my ip address and gateway. However, when i ping www.google.com, it says "Destination Host Unreachable". Would you please explain whats wrong? Why am i getting this? Thank you very much.

1 Solution

Accepted Solutions
shashi01
Moderator
Moderator
  • 744 Views

@linuxkull Thanks for reaching out

I think the "Destination Host Unreachable" error was caused by the IP address and gateway being on different subnets, preventing your system from routing traffic correctly.

Also, the DNS server should be corrected to the proper IP format.

View solution in original post

4 Replies
shashi01
Moderator
Moderator
  • 745 Views

@linuxkull Thanks for reaching out

I think the "Destination Host Unreachable" error was caused by the IP address and gateway being on different subnets, preventing your system from routing traffic correctly.

Also, the DNS server should be corrected to the proper IP format.

linuxkull
Mission Specialist
Mission Specialist
  • 690 Views

Thank you very much for you explanation. I have corrected the problem. 

Chetan_Tiwary_
Community Manager
Community Manager
  • 696 Views

@linuxkull The IPv4 address is a 32bit integer that can be written in a hexa decomal format of 8 bits each. Your DNS address could be 8.8.8.8 & 8.8.4.4 ( google DNS ).

Also check below as to identify how the IPs are in same network :

Screenshot from 2024-09-23 18-23-13.png

To route between different subnets, you need a router connected to both. This can be your internet gateway, but it would need to be aware of the other subnet as well and have an interface on it.

linuxkull
Mission Specialist
Mission Specialist
  • 692 Views

Thank you very much for you reply. 

Join the discussion
You must log in to join this conversation.