Re: Run commands automatically when bringing up/down network interfaces?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



--On Wednesday, September 14, 2011 12:26:10 PM -0700 Edward Morbius
<dredmorbius@xxxxxxxxx> 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@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux