11-20-2009 11:08 AM - last edited on 03-25-2019 04:08 PM by ciscomoderator
Hi Everyone,
Object tracking with static routes allows you to monitor a target with the ability to remove and then add a new route to the routing table, but in my scenario, when the target is unreachable (upstream device), I would like to stop advertising a route from this device. It should then be learned from another Layer 3 device.
Main question: Is it possible to use object tracking to just remove a route, but not inject a new one? I suppose I can always inject a useless route?
More detail is this: Layer 3 device with a static route to the Internet is redistributed south to the local LAN. This static route should be monitored and if a northbound devices becomes unreachable, it would be removed from the routing table, and thus not redistributed any more. The local LAN then would learn a new default route from somewhere else that had been previously advertised from, but has a lower metric from the one redistributed from the Layer 3 device mentioned above so it's not used when all devices are working as expected.
Any thoughts?
Thanks,
Jason
11-20-2009 11:11 AM
jason.edelman wrote:
Hi Everyone,
Object tracking with static routes allows you to monitor a target with the ability to remove and then add a new route to the routing table, but in my scenario, when the target is unreachable (upstream device), I would like to stop advertising a route from this device. It should then be learned from another Layer 3 device.
Main question: Is it possible to use object tracking to just remove a route, but not inject a new one? I suppose I can always inject a useless route?
More detail is this: Layer 3 device with a static route to the Internet is redistributed south to the local LAN. This static route should be monitored and if a northbound devices becomes unreachable, it would be removed from the routing table, and thus not redistributed any more. The local LAN then would learn a new default route from somewhere else that had been previously advertised from, but has a lower metric from the one redistributed from the Layer 3 device mentioned above so it's not used when all devices are working as expected.
Any thoughts?
Thanks,
Jason
Jason
I saw a similiar question to this a while back and if i recall correctly the answer was to use EEM. The EEM expert is J. Clarke and he usually hangs out in the Network Management forum. Perhaps if you posted there you would get an answer.
Jon
11-20-2009 11:19 AM
Jon,
I'm actually using an ASA here. Either way, I'd rather not get into scripting using EEM.
The simplest way to accomplish might be to monitor a device using object tracking and if that device is unreachable, remove the default route and insert a route such as 99.99.99.99/32 or something rogue and that way it would still learn a default from another device. Thoughts on this?
Thanks,
Jason
11-20-2009 11:35 AM
Jason
jason.edelman wrote:
Jon,
I'm actually using an ASA here. Either way, I'd rather not get into scripting using EEM.
The simplest way to accomplish might be to monitor a device using object tracking and if that device is unreachable, remove the default route and insert a route such as 99.99.99.99/32 or something rogue and that way it would still learn a default from another device. Thoughts on this?
Thanks,
Jason
Worth a shot but would need testing. Alternatively could you not just insert a default-route pointing to the other device ie. the one you want to use.
Jon
11-20-2009 11:26 AM
Hello Jason,
>> Main question: Is it possible to use object tracking to just remove a route, but not inject a new one? I suppose I can always inject a useless route?
I think it is enough to skip configuration of floating static route.
or in your case you should verify if you are redistributing the static route in a dynamic routing protocol in theory when the route is removed from IP routing table the redistribution detects this and should be able to remove the route from the dynamic routing protocol domain.
This is something you should test in a lab, you may expect some delay between object failure and effective removal of dynamic route as the redistribution process is executed from time to time so reaction is not immediate.
Edit:
I don't see a need for EEM here, redistribution imports in a dynamic routing protocol only routes that are present in the IP routing table, object tracking should able to remove the route from IP routing table when the test fails. subsecond convergence cannot be expected.
we can see this because for example IP ACLs used for controlled redistribution have their counters that increment over time.
Hope to help
Giuseppe
11-20-2009 11:32 AM
This scenario is actually the opposite of a floating static actually. Static is peferred and should the next hop go down via object tracking it should learn a new route via a dynamic routing protocol.
The question still is can object tracking be configured without "inserting" a new route or is the best way to insert a new bogus route?
Jason
11-20-2009 11:57 AM
Hello Jason,
if you just want to have the tracked route removed when the test fails I don't see any need for a bogus route.
if the bogus route is missing the primary route should disappear from IP routing table and then from dynamic routing protocol database and domain.
Hope to help
Giuseppe
11-14-2012 07:18 PM
Hi,
To conditionally advertise thedefault route in BGP based on track:
Config details from my Blog:http://mynotesonroutingprotocols.blogspot.in/2012/11/bgp-conditional-advertisement-of.html
=====================
BGP: Conditional advertisement of default-route based on track object:
Solution:
R1(config)#do show run | i track
track 1 ip route 0.0.0.0 0.0.0.0 reachability
ip route 0.0.0.0 0.0.0.0 10.1.12.2 track 1
R1(config)#
R1(config)#ip prefix-list TRACK permit 0.0.0.0/0
R1(config)#route-map TRACK
R1(config-route-map)#match ip address prefix-list TRACK
R1(config-route-map)#exit
R1(config)#
R1(config)#router bgp 100
R1(config-router)#neighbor 10.1.13.3 default-originate route-map TRACK
R1(config-router)#neighbor 10.1.14.4 default-originate route-map TRACK
R1(config-router)#
R4(config-router)#do show ip bgp
BGP table version is 56, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 10.1.14.1 0 0 100 i
*> 1.1.1.1/32 10.1.14.1 0 0 100 i
*> 2.2.2.2/32 10.1.14.1 0 100 200 i
*> 3.3.3.3/32 10.1.14.1 0 100 300 i
*> 4.4.4.4/32 0.0.0.0 0 32768 i
R4(config-router)#
R3(config-router)#do show ip bgp
BGP table version is 54, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 10.1.13.1 0 0 100 i
*> 1.1.1.1/32 10.1.13.1 0 0 100 i
*> 2.2.2.2/32 10.1.13.1 0 100 200 i
*> 3.3.3.3/32 0.0.0.0 0 32768 i
*> 4.4.4.4/32 10.1.13.1 0 100 400 i
R3(config-router)#
Observation:
R1#debug ip bgp updates
BGP updates debugging is on for address family: IPv4 Unicast
R1#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int ser1/0
R1(config-if)#shut
R1(config-if)#
*Mar 1 03:29:00.567: BGP(0): no valid path for 2.2.2.2/32
*Mar 1 03:29:00.567: %BGP-5-ADJCHANGE: neighbor 10.1.12.2 Down Interface flap
R1(config-if)#
*Mar 1 03:29:00.571: BGP(0): nettable_walker 2.2.2.2/32 no best path
*Mar 1 03:29:01.567: BGP(0): 10.1.13.3 send unreachable 0.0.0.0/0
*Mar 1 03:29:01.567: BGP(0): 10.1.13.3 enqueued default-originate update
*Mar 1 03:29:01.567: BGP(0): 10.1.14.4 send unreachable 0.0.0.0/0
*Mar 1 03:29:01.567: BGP(0): 10.1.14.4 enqueued default-originate update
R1(config-if)#
*Mar 1 03:29:02.543: %LINK-5-CHANGED: Interface Serial1/0, changed state to administratively down
*Mar 1 03:29:03.543: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
R1(config-if)#
*Mar 1 03:29:06.139: %TRACKING-5-STATE: 1 ip route 0.0.0.0/0 reachability Up->Down
R1(config-if)#
*Mar 1 03:29:09.575: BGP(0): 10.1.13.3 send unreachable 2.2.2.2/32
*Mar 1 03:29:09.575: BGP(0): 10.1.13.3 send UPDATE 2.2.2.2/32 -- unreachable
*Mar 1 03:29:09.675: BGP(0): updgrp 2 - 10.1.13.3 updates replicated for neighbors: 10.1.14.4
R1(config-if)#do u all
All possible debugging has been turned off
R1(config-if)#
R4(config-router)#do show ip bgp
BGP table version is 58, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 10.1.14.1 0 0 100 i
*> 3.3.3.3/32 10.1.14.1 0 100 300 i
*> 4.4.4.4/32 0.0.0.0 0 32768 i
R4(config-router)#
R3(config-router)#do show ip bgp
BGP table version is 56, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 10.1.13.1 0 0 100 i
*> 3.3.3.3/32 0.0.0.0 0 32768 i
*> 4.4.4.4/32 10.1.13.1 0 100 400 i
R3(config-router)#
Observation:
R1(config-if)#
R1(config-if)#no shut
R1(config-if)#
*Mar 1 03:34:56.939: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar 1 03:34:57.943: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R1(config-if)#
*Mar 1 03:34:57.955: BGP(0): 10.1.13.3 enqueued default-originate update
*Mar 1 03:34:57.955: BGP(0): 10.1.14.4 enqueued default-originate update
R1(config-if)#
*Mar 1 03:35:06.139: %TRACKING-5-STATE: 1 ip route 0.0.0.0/0 reachability Down->Up
R1(config-if)#
R4(config-router)#do show ip bgp
BGP table version is 60, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 10.1.14.1 0 0 100 i
*> 1.1.1.1/32 10.1.14.1 0 0 100 i
*> 2.2.2.2/32 10.1.14.1 0 100 200 i
*> 3.3.3.3/32 10.1.14.1 0 100 300 i
*> 4.4.4.4/32 0.0.0.0 0 32768 i
R4(config-router)#
R3(config-router)#do show ip bgp
BGP table version is 58, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 10.1.13.1 0 0 100 i
*> 1.1.1.1/32 10.1.13.1 0 0 100 i
*> 2.2.2.2/32 10.1.13.1 0 100 200 i
*> 3.3.3.3/32 0.0.0.0 0 32768 i
*> 4.4.4.4/32 10.1.13.1 0 100 400 i
R3(config-router)#
Observation:
Hope this helps.
Regards,
Usha Rani P
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: