connect: Network is unreachable
If you are getting below error, then probably you have not added gateway address or you have incorrect gateway in config file.
[root@cluster ~]# ping google.com
connect: Network is unreachable
Before:
[root@cluster ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3
DEVICE=eth3
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.174.130
NETMASK=255.255.255.0
If you are getting below error, then probably you have not added gateway address or you have incorrect gateway in config file.
[root@cluster ~]# ping google.com
connect: Network is unreachable
Before:
[root@cluster ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3
DEVICE=eth3
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.174.130
NETMASK=255.255.255.0
After:
[root@cluster ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth3
DEVICE=eth3
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.174.130
NETMASK=255.255.255.0
GATEWAY=192.168.174.2
[root@cluster ~]# ifdown eth3
[root@cluster ~]# ifup eth3
Determining if ip address 192.168.174.130 is already in use for device eth3...
[root@cluster ~]# ping google.com
PING google.com (216.58.218.174) 56(84) bytes of data.
64 bytes from dfw06s46-in-f14.1e100.net (216.58.218.174): icmp_seq=1 ttl=128 time=261 ms
64 bytes from dfw06s46-in-f14.1e100.net (216.58.218.174): icmp_seq=2 ttl=128 time=257 ms
Comments
Post a Comment