I'm trying to ping
the health of VM's using nmap
utility.
# nmap -v -n -sP 192.168.102.116
Host 192.168.102.116 appears to be down.
Note: Host seems down. If it is really up, but blocking our ping probes, try -P0
Nmap finished: 1 IP address (0 hosts up) scanned in 2.006 seconds
then I tried with direct ping
, as it shows the host reachable. then I found the next hop directive in the ping
output.
# ping 192.168.102.116
PING 192.168.102.116 (192.168.102.116) 56(84) bytes of data.
From 192.169.64.129: icmp_seq=1 Redirect Host(New nexthop: 192.169.64.149)
64 bytes from 192.168.102.116: icmp_seq=1 ttl=52 time=15.6 ms
Env:- RHEL 5.11 nmap version - 4.11
$ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
10.10.2.0 * 255.255.254.0 U 0 0 0
eth0
169.254.0.0 * 255.255.0.0 U 0 0 0
eth0
default 10.10.2.1 0.0.0.0 UG 0 0 0
eth0
Question
How to do it with the nmap
utility? by specifying to ping
host from the redirect address?
I found a similar option with fping
utility --icmp-redirect-addr
, likewise is there any option can specify next hop address so that nmap
to scan the host properly
Note: this is production as I can only try with ping
and nmap
. For scanning many hosts in parallel ping took more time, so need to stick in nmap
.