LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-18-2024, 06:22 AM   #1
nag30ele
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Rep: Reputation: 0
Question ARP flush


Hello folks,

Need help..

I want to know the background/history of doing the neighbor flush for the interface Mac address change.

void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev)
{
write_lock_bh(&tbl->lock);
neigh_flush_dev(tbl, dev, false); <<<
write_unlock_bh(&tbl->lock);
}

What would be the implications if we don't flush the neighbors for interface Mac address change event.

Thanks,
Nagendra.
 
Old 04-18-2024, 06:44 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,641

Rep: Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966Reputation: 7966
Quote:
Originally Posted by nag30ele View Post
Hello folks,
Need help..I want to know the background/history of doing the neighbor flush for the interface Mac address change.
Code:
void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev)
{
	write_lock_bh(&tbl->lock);
	neigh_flush_dev(tbl, dev, false);  <<<
	write_unlock_bh(&tbl->lock);
}
What would be the implications if we don't flush the neighbors for interface Mac address change event.
You have given no details at all about your system or what you're trying to do, and posting four lines of code with zero context is similarly meaningless. If you'd like to know the "background/history" of something, you are welcome to do your own research, rather than asking us to look it up for you.

Ask a clear question and provide relevant details and we may be able to help with your problem.
 
Old 04-18-2024, 12:08 PM   #3
nag30ele
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Lightbulb

Thanks for the response.

I am currently working on a Linux-based edge router (ER) router deployment, which utilizes the VRRP protocol for high availability. During my work, I encountered a scenario where the ER, upon electing as master, replaces the original MAC address with a VMAC address (00:00:5e:00:01:<VRID>). This action triggers the kernel to flush the neighbor caches, subsequently rendering static routes inactive and causing data traffic loss for a brief period, approximately 10 seconds.

In seeking to better understand this behavior, I am curious about the necessity of flushing the neighbor cache upon a MAC address change to the interface, especially when it is not relevant to any neighbor MAC address (i.e., the MAC change is local to the interface). I am interested in exploring whether there are any potential issues or implications if we opt not to flush the cache on such MAC address changes.

I would greatly appreciate any insights on this matter.

Thank you very much for your attention to this inquiry. I look forward to your response.

Regards,
Nagendra.

Last edited by nag30ele; 04-19-2024 at 01:56 PM.
 
Old 04-18-2024, 03:08 PM   #4
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 566

Rep: Reputation: Disabled
Hi, that is interesting.
Understand that is likely a business and you can only provide perhaps a limited amount of info.
But could you please inform on OS,kernel and routing software used?
 
Old 04-18-2024, 11:11 PM   #5
nag30ele
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Post

thanks for the response.

here are the details.

uname -a
Linux 4.19.87 #1 SMP PREEMPT 2024 x86_64 x86_64 x86_64 GNU/Linux

Last edited by nag30ele; 04-19-2024 at 01:58 PM.
 
Old 04-19-2024, 01:33 AM   #6
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,153

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Quote:
What would be the implications if we don't flush the neighbors for interface Mac address change event.
I believe you will experience network issue, it will mess up your network.

Layer 2 is important, if it's not updated or will not flush. You might encounter: Packet Forwarding Failures, Communication Errors etc..

Check the internet of what's the importance of Layer 2, from there you will be able to know what will be your issue if you don't update Mac.
 
Old 04-20-2024, 02:25 PM   #7
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 566

Rep: Reputation: Disabled
Quote:
Originally Posted by nag30ele View Post
Linux 4.19.87 #1 SMP PREEMPT 2024 x86_64 x86_64 x86_64 GNU/Linux
Nothing out of the ordinary there, it's a bit behind but should be ok.

Whats is the OS and the application used?
 
Old 04-20-2024, 02:52 PM   #8
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,143

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
The case I can think of is taking over the MAC of some other device. So just flush instead of walking through the ARP cache and try to figure out what needs to change. There is no way that flushing should cause significant delays on the network. ARP updates are done in parallel.
 
Old 04-22-2024, 12:02 AM   #9
nag30ele
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yvesjv View Post
Nothing out of the ordinary there, it's a bit behind but should be ok.

Whats is the OS and the application used?
UBUNTU, VRRP router application.

Last edited by nag30ele; 04-22-2024 at 12:03 AM.
 
Old 04-22-2024, 02:51 PM   #10
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 566

Rep: Reputation: Disabled
Ubuntu.
Ok, assuming you are using keepalived (or something else?) your query may have already been answered, see the link below:
https://serverfault.com/questions/10...-impact-rhel-8
 
  


Reply

Tags
arp, network, network interface



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
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
How to create an proxyarp entry in arp table by using arp command? himalayas Linux - Networking 0 06-04-2003 04:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:57 AM.

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