[PLUG] ARP black magic question

Eric Harrison eharrison at mail.mesd.k12.or.us
Tue Aug 26 22:03:02 UTC 2003


On Tue, 26 Aug 2003, Zot O'Connor wrote:

>ServerA will publish an arp for server B.  All responses will goto A. 
>What I failed to mention above is my serverA knew what to do with the
>packet (forward it to the network) because of routing rules.
>
>If you are merely usurping B's mac then
>  arp -i eth0 -s hostname hw_addr [netmask nm] pub
>
>where hostname is B's IP address, and hw_addr is B's MAC, eth0 is the
>appropriate interface.  Netmask is optional

Re-reading the arp man page for the x^2 time today, I see that 
the netmask is no longer supported. man 7 arp says that netmask
was dropped in favor of an "automatic proxy arp setup by the kernel
for all reachable hosts on other interfaces (when forwarding and proxy
arp is enabled for the interface)".

man 8 arp has the following note for the "-i" switch: This has to be
different from the interface to which the IP datagrams will be routed.


So this still might not do the trick for me, since I'm not working
with "another interface". 

Turning on proxy_arp & ip_forward and then running
"arp -i eth0 -s 10.0.0.1 01:02:03:04:05:06 pub" does not give me
an error, but "cat /proc/net/arp" shows the hw address as 
00:00:00:00:00:00. Doh!

Just for kicks, I did some amazingly ugly hacks with dummy devices,
but that didn't fool it either ;-)

Fun stuff!

-Eric

-- 
At lunch today, I asked Shahms King if he had spent any time mucking
with arp. His response was "I like my networks to work" ;-)





More information about the PLUG mailing list