[Translated]How To Find IP Conflicts In Linux

This commit is contained in:
geekpi 2014-03-26 14:07:05 +08:00
parent 1be8e3217a
commit dcbf088f30
2 changed files with 38 additions and 41 deletions

View File

@ -1,41 +0,0 @@
Translating------------------geekpi
How To Find IP Conflicts In Linux
================================================================================
You all know what IP addresses are, right? How they are assigned to devices on a network to represent them. They are assigned by DHCP servers and the change frequently. Now there are two kinds of IPs. The dynamic ones who change frequently (a few times a day) and the static ones who, as the name suggests, are static, as in they dont change. Sometimes that creates conflicts. When a dynamic IP is assigned and there is already another device on the network with the same static IP. Or it can happen when there are more than one DHCP servers giving IPs on the same network from the same subnet. If youre having connectivity issues and suspect it is due to IP conflict you can use a tool called arp-scan to detect them.
This tool sends ARP (Address Resolution Protocol) packets on local network to collect the addresses. If there is multiple MAC addresses claiming the same IP address, then there is conflict.
To install arp-scan on Ubuntu or Debian type:
$ sudo apt-get install arp-scan
For Fedora, CentOS or Redhat:
$ sudo yum install arp-scan
To detect IP conflicts, run the following:
$ sudo arp-scan I eth0 -l
An output example:
192.168.1.10 00:1b:a9:63:a2:4c BROTHER INDUSTRIES, LTD.
192.168.1.30 00:1e:8f:58:ec:49 CANON INC.
192.168.1.33 00:25:4b:1b:10:20 Apple, Inc
192.168.1.37 10:9a:dd:55:d7:95 Apple Inc
192.168.1.38 20:c9:d0:27:8d:56 (Unknown)
192.168.1.39 d4:85:64:4d:35:be Hewlett Packard
192.168.1.39 00:0b:46:e4:8e:6d Cisco (DUP: 2)
192.168.1.40 90:2b:34:18:59:c0 (Unknown)
In this instance, the **19.168.1.39** IP is in conflict since it appears twice.
--------------------------------------------------------------------------------
via: http://www.unixmen.com/find-ip-conflicts-linux/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,38 @@
如何在Linux中找出IP地址冲突
================================================================================
你们都知道什么是IP地址是吧它们怎样被分配给网络上的设备来代表它们。它们通过DHCP服务器分配并且会经常改变。现在有两种IP地址。动态的一种会经常改变几天一次而静态的就如它的名字那样是静态的意味着它们不会改变。有时这会引发一些冲突。当一个动态IP被分配了并且有另外一台网络设备已经拥有了相同的IP。或者在相同网络子网上有多台分配IP的DHCP服务器。如果你有连通问题并且假设它是由于IP冲突造成的那么你可以使用一个工具称作arp-scan来扫描它们。
这个工具会在本地网络发送ARPAddress Resolution Protocol(地址解析协议)包来收集地址。如果有多个MAC地址声称拥有相同的IP地址那么这里就存在冲突。
要在Ubuntu或者Debian上安装arp-scan则输入
$ sudo apt-get install arp-scan
对于FedoraCentOS或者RedHat
$ sudo yum install arp-scan
要检测IP冲突运行下面的命令:
$ sudo arp-scan I eth0 -l
输出示例:
192.168.1.10 00:1b:a9:63:a2:4c BROTHER INDUSTRIES, LTD.
192.168.1.30 00:1e:8f:58:ec:49 CANON INC.
192.168.1.33 00:25:4b:1b:10:20 Apple, Inc
192.168.1.37 10:9a:dd:55:d7:95 Apple Inc
192.168.1.38 20:c9:d0:27:8d:56 (Unknown)
192.168.1.39 d4:85:64:4d:35:be Hewlett Packard
192.168.1.39 00:0b:46:e4:8e:6d Cisco (DUP: 2)
192.168.1.40 90:2b:34:18:59:c0 (Unknown)
在本例中,**192.168.1.39**这个IP冲突了因为它出现了两次。
--------------------------------------------------------------------------------
via: http://www.unixmen.com/find-ip-conflicts-linux/
译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出