Lunar Mushrooms
Lunar Mushrooms

Reputation: 8928

Disable ARP while data transfer

I am sending data over PC1 to PC2, both are Linux 2.6 kernel machines. This transfer will take a couple of hours. The ARP cache stale timeout is set to 50 seconds in PC1. So during data transfer, every 50 seconds the PC1 sends ARP request to PC2 (since the arp cache expires in PC1). But theoretically, since data transfer is ongoing it is not required to send an ARP request to PC2 (Since PC1 knows PC2 is still there).

How is it possible to disable the expiry of ARP entry of PC2 inside PC1 (if the data transfer to PC2 is still ongoing)?

Note: I want to disable the arp-cache expiry for only for the PC2 ARP cache entry during transfer to PC2. After transfer let the ARP entry expire.

Upvotes: 0

Views: 670

Answers (2)

ugoren
ugoren

Reputation: 16441

In general, expiration of ARP improves connection reliability, not vice versa.
Suppose PC2 changes its MAC address for some reason. Within a network segment it may not make much sense, but in more complicated networks it does. With ARP, PC1 will soon enough learn the new MAC and proceed. Without it, it will still try to talk to the old MAC.

This said, static ARP (arp -s) can easily be used to tell PC1 what's PC2's MAC address, for all eternity (or the next boot, whichever comes first).

Upvotes: 0

Kristof Provost
Kristof Provost

Reputation: 26322

Get a new switch.

Really. Don't try to work around hardware issues by fooling around in the kernel.

If you really insist on getting this working, just set up static ARP entries. They don't time out.

Upvotes: 3

Related Questions