Automated Interface Shutdown

Hi Guys

What I want to achieve is to automate an interface shutdown should a WAN link fail, this is not a ‘failover’ solution as such.

Essentially, if sh!t hits the fan I want the entire unit to shut down, I can imagine this comes across as a very odd request.

I’ve waded through existing threads in the forum and cannot find anything so specific as this, has anyone scripted somthing similar to this?

Keep in mind I am a complete newbie to the forums please but any help would be greatly appreciated.


Cheers,
Tim

Interface shutdown, or system shutdown?

Cannot think of any application for system shutdown…

In any case, you achieve this by:

1.- Set a netwatch that monitors some IP further up your WAN (8.8.8.8, you get the idea)
2.- Create the up/down scripts for it.

Scripts can be CLI commands, so to disable/enable an interface as this would be the bare minimum that will work:

down (8.8.8.8 doesn’t answer to pings):

/interface ethernet disable INTERFACE_NAME

You can learn “on the go” the CLI commands by opening a terminal and using tab, it will “offer” you context-sensitive possible parameters, commands and options.