FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 09-14-2011, 07:26 PM
Edward Morbius
 
Default Run commands automatically when bringing up/down network interfaces?

I'm looking for a capability similar to Debian/Ubuntu's pre/post up/down network commands capability.
The problem: *we've got a colo in which hosts talk directly to the hosting provider's router (through a bridging firewall) and hence our hosts MAC addresses are cached by the router.

We should be able to solve this by pinging the router directly when bringing up the interface, rather than waiting (a day) for the router's ARP cache to expire.
Yes, this means we're switching which hosts respond to a specific IP address, yes, we have to do this periodically.

An alternative would be to remap the MAC address, though pinging the router seems cleaner, and the MAC remap would /still/ have to run when the interface is brought up/down.

--
Dr. Ed Morbius
Chief Scientist / Philologist / Robot Wrangler / Powerplant Operator
Krell Power Systems Unlimited



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-14-2011, 09:37 PM
Devin Reade
 
Default Run commands automatically when bringing up/down network interfaces?

--On Wednesday, September 14, 2011 12:26:10 PM -0700 Edward Morbius
<dredmorbius@gmail.com> wrote:

> I'm looking for a capability similar to Debian/Ubuntu's pre/post up/down
> network commands capability.
[...]
> We should be able to solve this by pinging the router directly when
> bringing up the interface, rather than waiting (a day) for the router's
> ARP cache to expire.

Have a look at arping(8) and it's -U flag in particular rather than ping.

Also read 'man ifup'. That refers you to
/usr/share/doc/initscripts*/sysconfig.txt
which talks about the ifup-post script. Looking at the end of ifup-post,
we see the following:

if [ -x /sbin/ifup-local ]; then
/sbin/ifup-local ${DEVICE}
fi

So it's probably the case that you could create a /sbin/ifup-local
that, based on the device name, may arping the gateway.

I was looking at my RHEL6 laptop when I was writing this, but C6 is almost
certainly the same.

Devin

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-14-2011, 09:50 PM
Devin Reade
 
Default Run commands automatically when bringing up/down network interfaces?

--On Wednesday, September 14, 2011 03:37:34 PM -0600 Devin Reade
<gdr@gno.org> wrote:

> Have a look at arping(8) and it's -U flag in particular rather than ping.

Sorry, I should have said the -A flag. FWIW, gratuitous ARP is the
mechanism used by Linux-HA when dealing with IPs moving between nodes.
For example:
arping -A -c3 -I eth0 YOUR_IP

Devin

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 01:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org