For anyone following this for their own purposes, the ifstated solution does not work. I was able to get it to log a few times in a VM environment, but on a live system neither manually bringing an interface up/down nor plugging/unplugging the ethernet cable is even noticed by ifstated (running -dvv). If I'm doing something wrong, please point it out to me.
Next, I'll be toying with Stuart's suggestion of using ospfd with all interfaces set to passive. -HKS On Fri, Nov 21, 2008 at 5:26 PM, (private) HKS <[EMAIL PROTECTED]> wrote: > On Fri, Nov 21, 2008 at 5:18 PM, (private) HKS <[EMAIL PROTECTED]> wrote: >>> "route monitor" ? >>> >>> -- >>> WBR, >>> Pereresus ne Vlezaet Buggy >> >> That's an interesting tool, but it's not what I'm looking for. >> >> My current solution is an incredibly awkward ifstated.conf (pasted below). >> >> Is this really the best way to do it? I have no idea what's involved >> with logging interface state changes, but it's something that any >> router, firewall, or server needs. PCs are debatable, but I prefer >> that mine log it. I'd like to file a feature request but before I do, >> is there something I'm missing here? Is there a specific reason it was >> decided to keep this functionality out of the OS? >> >> -HKS >> >> ------------------------------------- >> ifstated.conf: >> ------------------------------------- >> >> # global config >> init-state main >> vr0_up = "vr0.link.up" >> >> state main { >> init { >> run "" >> } >> >> if $vr0_up || ! $vr0_up { >> logger "ifstatus change. vr0 `ifconfig vr0 | grep status: | sed >> 's/^[[:space:]]//'`, vr1 `ifconfig vr1 | grep status: | sed >> 's/^[[:space:]]//'`, vr2 `ifconfig vr2 | grep status: | sed >> 's/^[[:space:]]//'`, vr1 `ifconfig vr3 | grep status: | sed >> 's/^[[:space:]]//'`" >> } >> } >> > > Whoops, posted an ifstated.conf writeup that had incorrect syntax. > Here's the correct version: > > init-state main > vr0_up = "vr0.link.up" > > state main { > init { > run "" > } > if $vr0_up || ! $vr0_up { > run "logger \"ifstatus change. vr0 `ifconfig vr0 | > grep status: | sed 's/^[[:space:]]//'`, vr1 `ifconfig vr1 | grep > status: | sed 's/^[[:space:]]//'`, vr2 `ifconfig vr2 | grep status: | > sed 's/^[[:space:]]//'`, vr3 `ifconfig vr3 | grep status: | sed > 's/^[[:space:]]//'`\"" > } > }