Oracle linux:ping to IP addresses on non-local subnet returns "Ping:sendmsg:Network are Down" (document ID 1625215.1)
applies To: linux os-version Oracle linux 5.9 with Unbreakable Enterprise Kernel [2.6.39] and later Linux x86 Linux x86-64 Symptoms
Issuing a ping (8) to a IP address on a non-local subnet reports "Network are down" message as described below. However, other applications/utilities e.g. SSH (1), SFTP (1), etc. successfully connect to the same IP address, Ping reported as unavailable. All pings to hosts in the local network connect successfully.
# Cat/etc/sysconfig/network/scripts/ifcfg-eth0 broadcast=192.168.xx.255 ipaddr=192.168.xx.18 NETMASK=255.255.255.0 network=192.168.xx.0 Onboot=yes gateway=192.168.xx.1
# Route-n Kernel IP Routing table destination Gateway genmask Flags Metric Ref use Iface 192.168.xx.0 192.168.xx.1 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.xx.1 0.0.0.0 UG 0 0 0 eth0
$ ping 192.168.xx.12 PING 192.168.xx.12 bytes of data. ping:sendmsg:Network is down ping:sendmsg:Network is down ping:sendmsg:Network is down ping:sendmsg:Network is down ping:sendmsg:Network is down ping:sendmsg:Network is down Cause
Above, IP address 192.168.xx.12 resides in a non-local network. Ping, a part of the Iputils package, is a basic network diagnostic utility This uses Internet control message Protocol (I CMP) to communicate to a specified network host to discover whether the system is alive and receiving network. Where the ping target happens resides on a non-local network, ICMP packets must traverse the default gateway router to Rea Ch the host. In some instances, however, routers could not enable ICMP redirect functionality necessary for Ping to reach the target Syst EM, therefore ping reports the Non-local network as down. The following Cisco reference discusses ICMP Redirect:http://www.cisco.com/en/us/tech/tk365/technologies_tech_ Note09186a0080094702.shtml
SOLUTION
To address the issue, configure static routes to targets on the Non-local network (192.168.xx.0/24 in this instance) on Ho STS within the local network (192.168.70.0 in this instance) to avoid the need for ICMP redirection.
Perform the following to configure a static route, ensuring to modify file names and content to reflect your own NTS):
1. Create a file file in which to define static routes for the relevant network interface. e.g Twork-scripts/route-eth0
# Touch/etc/sysconfig/network-scripts/route-eth0
2. Add the following line to File/etc/sysconfig/network-scripts/route-eth0, replace <gateway_ip_which_can_get_to_ 192.168.xx.12> to a gateway to access for non-local network 192.168.xx.0/24 192.168.71.0/24 via <gateway_ip_which_ca N_get_to_192.168.71.12> Dev eth0
3. Save the file, then restart the network Srvice (or reboot the server): #/sbin/service, network restart
4. Use The route (8) command to verify the new routing table entry: # route-n Kernel IP routing table Destin ation gateway Genmask Flags Metric ref use Iface 192.168.xx.0 192.168. xx.1 255.255.255.0 u 0 0 0 eth0 192.168.xx.0 <another gateway> 255.255.255.0 ug 0 0 0 eth0 0.0.0.0 192.168.xx.1 0.0.0.0 ug 0 0 0 eth0
With the new static route in place, Ping ICMP packets would directly access remote network gateway router <another g Ateway> rather than the default local gateway router 192.168.70.1.