Solved Interface tracking

Hi everyone,

I'm new to FreeBSD, I'm trying to set up some tracking on my FreeBSD interfaces. I'd want to automatically set an interface down on the same host when another is down. On my host I have two interfaces, bge0 and bge1. I'd like when bge0 is down, bge1 goes down also automatically. I don't know what to look for, may be some one can guide me?

Thanks.
 
That's probably the weirdest configuration I've seen in a while. Usually people want bge1 to come up when bge0 goes down, which is what lagg(4) does.

But in case this is something you really want to do, you could add a few scripts to devd.conf(5). Triggering on a notify from IFNET LINK_DOWN. The script could then simply issue an ifconfig bge1 down.
 
Hi SirDice,

Thanks for your reply, I'll check devd.conf(5).

The peculiarity is that my host is connected to two routers, and is acting like a QoS host. By default, packets from the 1first router are routed to the first host interface (bge0), and when they are from the second router, they are routed to the 2second interface, bge1, to be shaped. But when one of the interfaces is down, the two routers can communicate directly without crossing the BSD host.

I'll let you know.
 
That's probably the weirdest configuration I've seen in a while. Usually people want bge1 to come up when bge0 goes down, which is what lagg(4) does.

But in case this is something you really want to do, you could add a few scripts to devd.conf(5). Triggering on a notify from IFNET LINK_DOWN. The script could then simply issue an ifconfig bge1 down.

That worked for me. Thanks.
 
Back
Top