How to: Detect Duplicate IP Address With arpi…
2009-05-13 13:40:17来源:未知 阅读 ()
Q.I run quite large network with different subnets. I'd like to know how can I find out duplicate IP address under Linux / UNIX?
A. You can use arppingcommand. The arping utility performs an action similar to ping command,but at the Ethernet layer. You can send
[url=javascript:;]ARP[/url]
REQUEST to a neighbor host/ computers.
Task: Send ARP requestLet us find out reachability of an IP on the local Ethernet with arping i.e send ARP request 192.168.1.1:
$
[url=javascript:;]sudo[/url]
arping -I eth0 -c 3 192.168.1.1
Output:
ARPING 192.168.1.1 from 192.168.1.106 ra0
Unicast reply from 192.168.1.1 [00:18:39:6A:C6:8B] 2.232ms
Unicast reply from 192.168.1.1 [00:18:39:6A:C6:8B] 1.952ms
Sent 3 probes (1 broadcast(s))
Received 3 response(s)Where,
- -I eth0: Specify network interface i.e. name of network device where to send ARP REQUEST packets. This option is required.
- -c 3: Stop after sending 3 ARP REQUEST packets
$ sudo arping -D -I eth0 -c 2 192.168.1.1
If 192.168.1.1 duplicated you should see zero exit status:
$ echo $?
Always use following syntax for duplicate address detection with arping:
$ sudo arping -D -I -c 2
$ echo $?
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_557887.html
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
下一篇:让某个用户登陆就关机的办法
- 提示:bad kernel: arp : 内网IP地址 is on em0 but got rep 2009-05-13
- Carp+IPVS实现热备及负载均衡freebsd 6.4 2009-05-13
- freebsd 7.1 CARP实现热备+负载均衡 2009-05-13
- Freebsd CARP设定写测试方法 2009-05-13
- OpenBSD3.8+PF+PFSYNC+CARP(VMware) 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash