解决IP冲突的一些资料,但没多少用

发表于:2007-07-04来源:作者:点击数: 标签:
原因是这样的. linux 的IP为192.168.0.1 windows 系统启动网卡时发出一个ARP问询包 21:39:55.892237arp who-has 192.168.0.1 tell 192.168.0.99 linux系统会给一个应答包 arp reply192.168.0.99 is-at 0:a0:18:b8:16:59 当windows 系统的IP为192.168.0.1时发
原因是这样的. linux 的IP为192.168.0.1 windows 系统启动网卡时发出一个ARP问询包 21:39:55.892237arp who-has 192.168.0.1 tell 192.168.0.99 linux系统会给一个应答包 arp reply192.168.0.99 is-at 0:a0:18:b8:16:59 当windows 系统的IP为192.168.0.1时发一个ARP包arp who-has 192.168.0.1 tell 192.168.0.1 Linux 系统不知怎么处理了.

解决IP冲突的一些资料,但没多少用

http://bbs.chinaunix.net/forum/viewtopic.php?t=362196&show_type=new&postdays=0&postorder=asc&start=60
和http://bbs.chinaunix.net/forum/viewtopic.php?t=484228&;show_type=&postdays=0&postorder=asc&start=0
都在讨论IP冲突问题,一些内容:

原因是这样的. linux 的IP为192.168.0.1 windows 系统启动网卡时发出一个ARP问询包 21:39:55.892237 arp who-has 192.168.0.1 tell 192.168.0.99 linux系统会给一个应答包 arp reply 192.168.0.99 is-at 0:a0:18:b8:16:59 当windows 系统的IP为192.168.0.1时发一个ARP包 arp who-has 192.168.0.1 tell 192.168.0.1 Linux 系统不知怎么处理了. 有高人给了解决办法在LINUX上执行 arp -s   IP    MAC -i  DEV 效果还行

最近查了书,看了很多方面的资料。发现IP冲突在windows中的处理机制是相当优秀的,他使用一种 arp广播机制来探测ip和mac的对应关系。具体方法是但操作系统初始化TCP/IP协议的时候会发送ARP的广播包,去探测网络中是否有和自己IP相同的MAC地址,如果网络中的确存在这样的IP地址。这个被探测的主机就会发送一个ARP应答包,并同时发送广播包,宣告自己的mac地址才是合法的。于是IP地址相同的这个主机就会给操作系统发送一个TCP/IP初始化错误的包,并同时禁用TCP/IP协议。而很多unix,比如linux,bsd等不包括irix,solaris,只是回答这个arp查询请求,而不会发送广播包。因此他们的IP地址就被无情的夺取了。呵呵,好在找到了一个完美的解决办法,能和windows,solaris一样保护主机的IP地址,具体请看下面的连接。 http://marc.merlins.org/linux/arppatch/

呵呵,刚才在看linux的内核配置的时候竟然在RH9.0的内核中看到了关于ARP daemon support(试验)的支持。晕,呵呵,不用打那个patch,直接重新编译一次内核试试,看能不能解决问题。

在http://www.linuxgazette.com/node/509找到了关于ARP daemon support的资料,
At me one network in which now 1400 devices. While them was less than 1024 made the static
table, now dynamic and periodically out the message " Neighbour table overflow ". It can is possible to
correct something in a kernel?

If I'm reading this correctly: you have a LAN segment with about 1400 (ethernet) devices on it. When
you surpassed 1024 devices on the segment you started noticing errors regarding the Neighbour table
overflow.

The solution to this is to move ARP (address resolution protocol) handling out of the kernel and into
user space. This involves two steps. Reconfigure your kernel with CONFIG_ARPD = y (You'll have to enabled
the option to "Prompt for experimental features/drivers" near the top of your make menuconfig or make
xconfig.

Under: Code maturity level options --->

   [*] Prompt for development and/or incomplete code/drivers

Then under: Networking options --->

   [*]   IP: ARP daemon support (EXPERIMENTAL) (NEW)

Then from the help text thereunder:

...............

Normally, the kernel maintains an internal cache which maps IP addresses to hardware addresses
on the local network, so that Ethernet/Token Ring/ etc. frames are sent to the proper address on
the physical networking layer. For small networks having a few hundred directly connected hosts or
less, keeping this address resolution (ARP) cache inside the kernel works well. However,
maintaining an internal ARP cache does not work well for very large switched networks, and will use
a lot of kernel memory if TCP/IP connections are made to many machines on the network.

If you say Y here, the kernel's internal ARP cache will never grow to more than 256 entries (the
oldest entries are expired in a LIFO manner) and communication will be attempted with the user
space ARP daemon arpd. Arpd then answers the address resolution request either from its own cache
or by asking the net.

...............

Then you have to go fetch and install an ARP daemon. Under Debian
that would be as simple as: apt-get -f install arpd
看起来这个似乎也不能解决应答windows的IP是否占用的查询吧。有谁试试?

原文转自:http://www.ltesting.net