LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-18-2024, 09:58 AM   #1
kishanrao
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Rep: Reputation: 0
VRRP mastership results in arp cache flush


Hello,

When a VRRP backup becomes master and becomes owner of the VIP/VMAC on an interface, I notice that the arp cache is flushed. Why is this done?

In net/core/dev.c:
NETDEV_CHANGEADDR:
rt_cache_flush(dev_net(dev));
...

The ARP cache contains IP-MAC information of other devices in the network. Only the local interface's IP/MAC is getting updated so it should not ideally affect the cache of other devices.
 
Old 04-22-2024, 01:22 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
Prior to the backup becoming master, there would have been an ARP entry for the VMAC/VIP in its ARP cache.

Logically, a node obviously shouldn't have an ARP entry for its own IP or MAC address, and I'm guessing that's probably why rt_cache_flush is being called. Having said that, I don't know what (if anything) would happen if such an entry were allowed to remain until it expired.

Flushing the ARP cache should have a negligible effect on performance, as it will immediately trigger ARP requests for any IPs involving active sessions. If you're seeing lost connections or performance degradation during failover, check if perhaps the ARP requests are being dropped by a switch with a broadcast limit or "storm control" setting.

Last edited by Ser Olmy; 04-22-2024 at 01:30 PM.
 
Old 04-23-2024, 02:31 AM   #3
kishanrao
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you. Perhaps we should only remove the VIP/VMAC arp entry and keep the rest as it is since others may not be related to VRRP?
 
Old 04-23-2024, 12:41 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
Sure, you could do that.

But if you're seeing ARP-related issues during failover, that's a fault in and of itself. It could be related to the small ARP storm that occurs due to the cache flush, or it could be the switch not updating its MAC table fast enough when the VMAC suddenly appears at a different port.
 
Old 04-24-2024, 04:09 AM   #5
kishanrao
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your response. I will check the switch and if updates are happening sooner than later.
 
  


Reply



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
ARP flush nag30ele Linux - Networking 9 04-22-2024 02:51 PM
Flush arp cache trackstar2000 Linux - Newbie 1 08-10-2013 12:01 PM
ARP flush abneru SUSE / openSUSE 3 01-27-2012 12:57 PM
99% cpu usage due to flush-8:0 & flush-8:16 propofol Debian 4 09-09-2011 03:03 PM
mysql "flush logs" or "flush tables with read lock", ... hangs deadeyes Linux - Server 4 01-19-2010 03:24 AM

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

All times are GMT -5. The time now is 03:50 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
Open Source Consulting | Domain Registration