目标识别 识别目标主机

1. 识别目标主机

1.2 ping
# ping -I eth0 -c 5 -s 128 192.168.1.103
PING 192.168.1.103 (192.168.1.103) from 192.168.1.100 eth0: 128(156) bytes of data.
136 bytes from 192.168.1.103: icmp_seq=1 ttl=128 time=0.256 ms
136 bytes from 192.168.1.103: icmp_seq=2 ttl=128 time=0.851 ms

[-I interface]
[-c count]
[-s packetsize]
1.3 arping
# arping -c 5 -I eth0 192.168.1.103
ARPING 192.168.1.103 from 192.168.1.100 eth0
Unicast reply from 192.168.1.103 [F0:76:1C:5E:78:52]  0.670ms
Unicast reply from 192.168.1.103 [F0:76:1C:5E:78:52]  1.136ms
Unicast request from 192.168.1.103 [F0:76:1C:5E:78:52]  468.713ms
Sent 2 probes (1 broadcast(s))
Received 3 response(s) (1 request(s))

检查IP地址是否被占用

# arping  -c 2 -I eth0 192.168.1.103 -D
ARPING 192.168.1.103 from 0.0.0.0 eth0
Unicast reply from 192.168.1.103 [F0:76:1C:5E:78:52]  0.677ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

# 返回结果1 被占用
arping  -c 2 -I eth0 192.168.1.104 -D
ARPING 192.168.1.104 from 0.0.0.0 eth0
Sent 2 probes (2 broadcast(s))
Received 0 response(s)
# 返回结果0 没有被占用

猜你喜欢

转载自blog.csdn.net/u010953692/article/details/79940721
今日推荐