Solved

How do I make ARP cache age in 30 seconds?

Posted on 1998-09-09
4
427 Views
Last Modified: 2011-10-03
How can I get an ARP cache to age in, say, 30 seconds.  What I've got is the following:

A device with a given IP, say IP1, has a MAC address, say MAC1.  During a short time interval, this device gets a new MAC address, MAC2.  While IP1 has MAC1, it does a tftp transfer of a file from the tftp server.  After IP1 gets MAC2, it tries to do another tftp, but tftp times out since the tftp server still sees MAC1 mapped to IP1.

I can manually intervene and do an "arp -d IP1" to clear the ARP entry, and then try the tftp transfer again with IP1+MAC2, which updates the ARP cache, and everything's fine.

Anyone have good ideas how to manage this without manual intervention?

What would happen if something were running on the tftp server to periodically clear the ARP entry for IP1, and this entry got cleared DURING a tftp transfer?  Would it barf completely and stop, or just recover with a new ARP and be basically invisible?
0
Comment
Question by:mruddick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Expert Comment

by:JYoungman
ID: 2006918
It would depend on the quality of implementation of
the TFTP requestor.  Most will work fine.

However, when a device changes its *IP* address, it issues a "gratuitous ARP" packet, saying
      IP1 is-at MAC1
This is how you detect IP address clashes.   So if you can get the device which is changing its MAC address to issue a gratuitous ARP when its MAC changes, everything should work seamlessly.

Failing that, depending again on the TCPIP implementation of the TFTPing device, you may be able to put the interface in promiscuous mode and so catch packets intended for IP1 no matter if they're sent to MAC1 or MAC2.  

This often won't work because ethernet drivers check that the packet sent to them really is directed at them -- in this way they can support IP multicast when the ethernet card has no packet-filtering logic at all - they just put the interface into promisc mode and do the checks in software.

Can I ask *why* you're changing MAC?

0
 

Author Comment

by:mruddick
ID: 2006919
Jyoungman -

Yes, changing MACs seems like a strange thing to do, but it's in a product test environment, so it's not like it's the only *weird* thing I'm doing to the product.  I'm trying to automate some testing tasks, but was having trouble with this particular bit.
0
 

Accepted Solution

by:
bknowles earned 100 total points
ID: 2006920
Flushing the ARP cache during a connection (either the entire cache or just the one entry) should have no permanent long-term effects, just perhaps delay the tftp for a fraction of a second as the machine where the cache got flushed re-acquires the MAC address.
0
 

Expert Comment

by:laustjensen
ID: 3754534
The MAC of a LAN-machine can be found using the function GetMacAddresses(const Machine: string; const Addresses: TStrings): Integer; found in the JEDI Code Library (JCL). This can be fetched from http://www.delphi-jedi.org. It is free, it works and it doesn't spawn external processes to resolve the MAC.

What it exactly does, I don't know, but it works :o)

Hope any of you can use it. Enjoy :)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Bad Block Relocation for Synchronous GLVM AIX 7.1 2 84
How to clone solaris 10 machine 33 194
centos commands 6 118
Equivalent of WSUS for Solaris, AIX and Cisco devices 11 139
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question