Re: How to make a network interface come up automatically on link up?

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



You can create these two files which will be executed every time interface comes up & goes down.

/sbin/ifup-local
/sbin/ifdown-local

mark them as executable.

The Device name will be passed as argument.

example, /sbin/ifup-local eth0.

use case or if statements for interface parsing in the script.









On 24.4.2013, at 06:02, Joakim Ziegler wrote:

> This seems really dirty. :)
> 
> Also, I actually have to take it down and back up to make it work 
> currently. But I will try the recipe I got soon and see if that fixes it.
> 
> -- 
> Joakim Ziegler  -  Supervisor de postproducción  -  Terminal
> joakim@xxxxxxxxxxxxxx   -   044 55 2971 8514   -   5264 0864
> 
> On 23/04/13 5:09, Carl T. Miller wrote:
>> On 04/23/2013 05:25 AM, John Doe wrote:
>>> From: Joakim Ziegler <joakim@xxxxxxxxxxxxxx>
>>> 
>>>> As I'd mentioned before, the problem isn't that the interface doesn't
>>>> come up on boot, it does, but since it's a point to point interface,
>>>> when I reboot the computer on the other end, it goes down and doesn't
>>>> come back up automatically. That is, link going down and up makes the
>>>> network configuration stay down, I have to manually take the interface
>>>> down and back up to make it work again.
>>> 
>>> Not the solution you want but, as a last resort, you could always have a
>>> cron script that checks every minute if the link is down...
>> 
>> Or consider putting "* * * * * /sbin/ifup eth2" in root's crontab.  If
>> eth2 is up, it simply rereads the configs (which haven't changed).  If
>> it was down, it brings it up.
>> 
>> c
>> 
>> 
>> 
>> _______________________________________________
>> CentOS mailing list
>> CentOS@xxxxxxxxxx
>> http://lists.centos.org/mailman/listinfo/centos
>> 
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos


_______________________________________________
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