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.
@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 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.
Thank you very much for you explanation. I have corrected the problem.
@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.
Thank you very much for you reply.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.