LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-25-2011, 02:29 AM   #1
mainaile
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
arp table cannot be timeout


connect a PC to the router which ip address is 10.0.0.2 and its arp table:
~ # arp -n
Address HWtype HWaddress Flags Mask Iface
10.0.0.2 ether 00:21:27:AC:3B:19 C * eth0.1
192.168.2.74 ether 00:05:CA9D:26 C * wan0
OK,I change the IP address of the PC to 10.0.0.20 and the arp table:
~ # arp -n
Address HWtype HWaddress Flags Mask Iface
10.0.0.20 ether 00:21:27:AC:3B:19 C * eth0.1
10.0.0.2 ether 00:21:27:AC:3B:19 C * eth0.1
192.168.2.74 ether 00:05:CA9D:26 C * wan0
192.168.22.254 ether 00:22:90F:2CB C * wan1
And nomatter how long it takes,the arp table is always like this,why the old one is not timeout?
 
Old 04-25-2011, 03:13 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,714
Blog Entries: 23

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Hi,

So, you want control over the APR cache...and I ask: why?

ARP is a protocol that "lives" on the MAC level, if you changed the IP address, you do realise that the MAC stil remains, dont ya? The ARP cache deals with the NIC's/Hosts on the network on a MAC level, in fact, it uses that MAC address to find the IP address...

Try it:

Enter a colsole, become root and enter

Quote:
tcpdump -ennqti eth0 -vv
and wait...

You'll see some lines like this (MAC's erased, of course, but you get the drift)

Quote:
00:00:00:00:00:00 > 00:00:00:00:00:00, ARP, length 60: Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.16 tell 192.168.1.1, length 46
00:00:00:00:00:00 > 00:00:00:00:00:00, ARP, length 42: Ethernet (len 6), IPv4 (len 4), Reply 192.168.1.16 is-at 00:00:00:00:00:00, length 28
ARP takes care for itself, the cache gets flushed as soon as a host did'nt reply, dont worry....unless you're asking something else...

Thor
 
Old 04-26-2011, 09:26 AM   #3
mainaile
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Original Poster
Rep: Reputation: 0
thank you very much, and i got what you said.
but i think there should be a way to update the ARP cache when the pairs of address/MAC changes
like:

10.0.0.2 ether 00:21:27:AC:3B:19 C * eth0.1
to
10.0.0.20 ether 00:21:27:AC:3B:19 C * eth0.1
10.0.0.2 ether 00:21:27:AC:3B:19 C * eth0.1
that some time(timeout) later the old one should be gone,isn't it right?
 
Old 04-27-2011, 04:04 AM   #4
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,714
Blog Entries: 23

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Hi,

Quote:
some time(timeout) later the old one should be gone,isn't it right?
Well, yes and no, I believe it is quite possible to bind more than one IP address to a single netwotrk card - hence same MAC address, so ARP does not see a reason to refresh just because there's more than one MAC address in the list...

If you do want to tinker with the refresh rates and policies, there's a man page for ARP with all the settings involved.

But all in all, the entries shown are valid, for the reason mentioned above...dont panic...


Thor

Last edited by ButterflyMelissa; 04-27-2011 at 04:05 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting arp timeout cbf021 Linux - Newbie 1 03-26-2011 05:00 AM
ARP table ddomiray Linux - Software 3 10-26-2009 02:52 PM
ARP table 98steve600 Linux - General 1 03-28-2005 04:25 AM
arp timeout MagDaddy Linux - Networking 2 10-13-2003 02:23 PM
How to create an proxyarp entry in arp table by using arp command? himalayas Linux - Networking 0 06-04-2003 05:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration