cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
14023
Views
10
Helpful
8
Replies

Interface Tracking in Routers

haithamnofal
Level 3
Level 3

Hi,

Is there a way to track an interface in Cisco routers and if that interface is down to bring another interface down as well (e.g. if fa0/0 becomes down, bring fa0/1 down)?

I found this link in Cisco website but it is not exactly what I am looking for:

http://www.cisco.com/en/US/tech/tk364/technologies_configuration_example09186a0080211f5c.shtml

Regards,

Haitham

1 Accepted Solution

Accepted Solutions

Assuming you have 12.4T or higher:

track 1 interface FastEthernet0/0 line-protocol

event manager track_interface

event track 1 state down

action 1.0 syslog msg "Interface FastEthernet0/0 has gone down; taking down Fa1/0 as well"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command "int fa1/0"

action 5.0 cli command "shut"

action 6.0 cli command "end"

If you don't have 12.4T, you can still do this using EEM by watching for the link down syslog message:

event manager watch_interface

event syslog pattern ".*UPDOWN.*FastEthernet0/0.* changed state to down"

action 1.0 syslog msg "Interface FastEthernet0/0 has gone down; taking down Fa1/0 as well"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command "int fa1/0"

action 5.0 cli command "shut"

action 6.0 cli command "end"

View solution in original post

8 Replies 8

mheusinger
Level 10
Level 10

Hi,

what is the issue you try to solve?

Afaik there is no such feature and thus we might find another solution, if you provide more informations.

Regards, Martin

Hi Martin and Medan,

The script idea is interesting but I was hoping to find something in IOS itself. Let me explain what I am trying to do and let me see if you have any ideas.

Basically, I have the following scenario:

- I have 2801 router sitting in my internet border with 2 FaEth interfaces and 2 ADSL modules. I also have ASA behind the router.

- I have 3 internet links (A,B,&C); 2 of them are ADSL links which are connected to my router through the ADSL modules and the 3rd is satellite link connected to the router to faEth 0/0 through a modem

- The requirement is to implement policy-based routing so email traffic goes through link A as the primary channel and to link B as the secondary channel, whileas internet traffic should go through the link C as primary and link B as secondary.

- Since in ADSL you get a /32 IP on your ADSL interface, and since no policy-based routing can be implemented in ASA, I decided to configure the router interface faEth 0/0 as trunk and to configure the global subnets from the 3 different ISP's as sub-interfaces on this interface.

- The traffic coming from the ASA will be checked against the route-map I have applied to the inside router interface and based on the traffic type, the traffic will be routed to the appropriate sub-interface in the trunk interface, and from that sub-interface it will be routed to the appropriate router outside interface and then to the ISP.

Now, I am concernted if one of the ISP links go down, the traffic will still be routed to the sub-interfaces because they will always remain up and the outbound traffic will get lost!! I am attaching here my configuration for you to have a look at and would appreciate any other ideas to achieve the requirements I have stated here.

Thanks and appreciate your support.

Regards,

Haitham

Hi Haitham,

Hope you might have implemented some solution at this point of time.

Anyway, for your awareness you might want to check the following link:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123newft/123t/123t_14/gteem21.htm

The above link has information about embedded event manager(EEM) which can enable or disable one interface when the other one goes down, and in addition it supports host of other features.

I came across your I post when I was looking for an information on automating the task of shutting the interfaces on switch when they are down for period of month.

Hi,

Thanks for the link and for your update.

I went through the link you sent and the EEM feature looks so exciting. However, I couldn't find a specific task to monitor an interface status. The closest one would be the "event interface" with, for example, the rxload parameter set to a low number, followed by the "set cli" command.

Please correct me if I am wrong. Do you have another idea?

Thanks,

Haitham

Assuming you have 12.4T or higher:

track 1 interface FastEthernet0/0 line-protocol

event manager track_interface

event track 1 state down

action 1.0 syslog msg "Interface FastEthernet0/0 has gone down; taking down Fa1/0 as well"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command "int fa1/0"

action 5.0 cli command "shut"

action 6.0 cli command "end"

If you don't have 12.4T, you can still do this using EEM by watching for the link down syslog message:

event manager watch_interface

event syslog pattern ".*UPDOWN.*FastEthernet0/0.* changed state to down"

action 1.0 syslog msg "Interface FastEthernet0/0 has gone down; taking down Fa1/0 as well"

action 2.0 cli command "enable"

action 3.0 cli command "config t"

action 4.0 cli command "int fa1/0"

action 5.0 cli command "shut"

action 6.0 cli command "end"

Yes it is helpful for me .

Danilo Dy
VIP Alumni
VIP Alumni

I'm also planning to do this and I have idea and tools. You need a monitoring program to monitor interfaces availability of the router and has a capability to run an application when an interface is down

For example, I have a WhatsUp that monitors a router through its fa1/0 which monitors s0/0 and s0/1. If WhatsUp detected s0/0 is down (for number of pooled specified), it can be configured to execute a script which in turn login to the router with a username and password and shutdown s0/1. It will do the same if s0/1 is down, it will trigger another script to shutdown s0/0. Of course it cannot do anything if fa1/0 is down as this is the entry point for the script.

I haven't done the script though but I know it can be done as I see a lot of netpro doing other automated task in the router using scripts in PHP like for looking glass.

Hi All,

Any ideas on how to achieve my requirements? Please refer to my list of requirements and to the config file in my second reply.

Appreciate your help on this.

Regards,

Haitham

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco