Requirement One:I really have two situationst that I would like to use a script to change an active config. One is that we have multiple ISP's, but with one i need to be able to change a route when the link goes down.
The easiest way to accomplish this is to have the router do it for you without having to modify the running ocnfiugration. Use a floating static route. I am assuming that the route you are referring to is a default route. The syntax to create a floating static route is ip route 0.0.0.0 0.0.0.0 1.1.1.1 200.
Where 1.1.1.1 is the IP address of the secondary ISP next hop and 200 is the administrative distance. Once the interface, or link, to the primary ISP goes down, the route to that ISP will get flusheed and the secondary route with the higher administrative distance will get placed into the routing table.
Requirement 2: so if the link goes down i will be notified
This one you can use a program that monitors (most easily by issuing pings) the routers interfaces. YOu can configure a loopback and have it ping the loopback. This will ensure that the router itself has not failed. Further you can have it ping the IP address on the interface that connects to the primary ISP, this ensures that the link to the primary ISP is up. There are a number of programs that you will do this, and alot of them are configurable to have the program email or send a page. It depends on how much money you want to spend, if any at all. It probably would not be too difficulut to write a script that would accomplish the same thing. As suggested previously, perl is a great scripting language. One free monitoring utility that uses perl and works well with perl is mrtg and can be found at
hope this helps
Erik Rudnick, CCIE No. 9545
mailto:erik@kuriosity.com