cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1990
Views
0
Helpful
10
Replies

EEM / Tcl Script Help Please

Hello Community,

I have been evaluating a Tcl Script posted here sometime ago, designed to help monitor track interfaces and routes, see attached.

I believe I have applied the configurations correctly, however when I test the script by shutting down interfaces nothing happens.

I'm sure its something very simple that I'm missing.

I wonder if someone could take a look at the configs and let me know what I'm doing wrong. I have also attached a diagram.

Cheers

Carlton

10 Replies 10

Joe Clarke
Cisco Employee
Cisco Employee

Keep reading the help text the author wrote in is Tcl policy.  You didn't configure any of the NOTIFY-foo applets he talks about there.  Those are the things that actually do the notifications.

Joseph,

I did read again and I got it to work :-)

Cheers

On a slightly different topic, is it possible to 'track' a static ip address?

For example, I have the following tracking configured:


!

track 1 ip route 0.0.0.0 0.0.0.0 reachability

!

track 2 interface FastEthernet0/0 ip routing

!

track 3 interface FastEthernet0/1 ip routing

!        

track 4 ip route 180.80.8.4 255.255.255.255 reachability

!

track 5 ip route 170.70.7.4 255.255.255.255 reachability

!

!


R3#show track brie

Track   Object                         Parameter        Value

1       ip route  0.0.0.0/0            reachability     Up (static)

2       interface FastEthernet0/0      ip routing       Up

3       interface FastEthernet0/1      ip routing       Up

4       ip route  180.80.8.4/32        reachability     Down (no route)

5       ip route  170.70.7.4/32        reachability     Down (no route)



However, you will see that track 4 and 5 are down. This is because, although I can ping 180.80.8.4 and 170.70.7.4 the actual ip addresses don't appear in the routing table:


Gateway of last resort is 0.0.0.0 to network 0.0.0.0


     170.70.0.0/24 is subnetted, 1 subnets

C       170.70.7.0 is directly connected, FastEthernet0/0

     10.0.0.0/24 is subnetted, 1 subnets

C       10.1.1.0 is directly connected, FastEthernet1/0

     180.80.0.0/24 is subnetted, 1 subnets

C       180.80.8.0 is directly connected, FastEthernet0/1

     150.50.0.0/24 is subnetted, 1 subnets

C       150.50.5.0 is directly connected, Ethernet2/0

S*   0.0.0.0/0 is directly connected, FastEthernet1/0

R3#


Therefore, is there way of creating a track for /32 ip addresses?


I hope that makes sense.

Cheers

You can use IP SLA to ping the hosts and track the state of the IP SLA operation.

ip sla 1

icmp-echo 170.70.7.4

ip sla schedule 1 start now life forever

!

track 1 ip sla 1 reachability

Hi Joseph,

Thanks for responding.

That does seem like an ideal solution.

Can you let me know what version allows me to

track 1 ip sla 1 reachability?

At the moment, I only have the following option

R3(config)#track 4 ip ?

  route  IP route

Cheers

Hi Joseph,

I managed to configure ip sla with old method - using rtr.

Everything is working fine:

R3#show track brie

Track   Object                         Parameter        Value

1       ip route  0.0.0.0/0            reachability     Up (static)

2       interface FastEthernet0/0      ip routing       Up

3       interface FastEthernet0/1      ip routing       Up

4       rtr       1                    reachability     Down

R3#

The problem I'm having is that the script doesn't recognise track 4. As you can see track 4 shows 'Down', but the script still thinks everything is up and working.

Any thoughts?

Cheers mate.

From what I can tell this script doesn't discriminate from the track types.  It should see track 4 and recognize it is down.  Provided you have conditions and other applets setup accordingly the script should work.  But since this isn't my work, I cannot say for certain.

Hi Joesph,

I totally agree.

I think I have the necessary applets.

Ive attached the script - just in case you might want to check it outl

Hi Joseph,

I figured it out. However, would you happen to know how to add another track to the script?

At the moment, the script is written for three occurences. I would like to add more.

Cheers

To me it looks like the script would work with any number of tracks provided you use the right $X variable to represent the track value (e.g., $4).

Brilliant. I will try it tomorrow

Cheers mate

Sent from Cisco Technical Support iPad App