
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,358 Views
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.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,352 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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,353 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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,298 Views
Thank you very much for you explanation. I have corrected the problem.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,304 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 :
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- 1,300 Views
Thank you very much for you reply.