OSPF Conditional Default Routing Using IP SLA - Learn Cisco

Post Top Ad

OSPF Conditional Default Routing Using IP SLA


Pic. 1 - Topology Diagram.



Task 1
Remove the configuration used in the previous lab.

Task 2
On R2 configure a static route towards 10.0.8.8/32.

Task 3
Configure R2 so that it advertises the default route into OSPF domain as long as there is connectivity between R2 and SW2 Loopback0 interface (10.0.8.8). You should use IP SLA to accomplish the goal. IP SLA should track the object that will perform ping test every 3 seconds and the timeout should be set to 2 seconds.

Questions
Try to answer the following questions:
  1. What is an advantage of using this solution?
Lab Solution

Solution configuration can be accessed below (if you want to save it, click the link, then go to File-->Download):
https://drive.google.com/file/d/0BwE5C95tpjZOMUhnSmdRRFdER0E/edit?usp=sharing


Task 1
Remove the configuration used in the previous lab.

R2 Config:
!
no ip prefix-list VLAN28
!
no route-map CHECK
!
router ospf 1
 no default-information originate

!

Task 2
On R2 configure a static route towards 10.0.8.8/32.

R2 Config:
!
ip route 10.0.8.8 255.255.255.255 172.16.28.8
!

Note!
Make sure that SW2 has these two static routes configured for the next task to succeed.
!
ip route 172.16.0.0 255.255.0.0 172.16.28.2
ip route 10.0.0.0 255.255.0.0 172.16.28.2
!

Also, make sure that R2's FastEthernet is UP (we brought it down in the previous lab for testing purposes).

Task 3
Configure R2 so that it advertises the default route into OSPF domain as long as there is connectivity between R2 and SW2 Loopback0 interface (10.0.8.8). You should use IP SLA to accomplish the goal. IP SLA should track the object that will perform ping test every 3 seconds and the timeout should be set to 2 seconds.

NOTE!
Depending on which IOS version you use, the syntax to configure ip sla probe may be different. Try to check the syntax using: ip sla ?

R2 Config:
!
ip sla 1
 icmp-echo 10.0.8.8
 timeout 2000
 frequency 3
!
ip sla schedule 1 life forever start-time now
!

Pic. 2 - IP SLA Activated.


Notice!
My router's date and time are not set properly.

R2 Config:
!
track 1 rtr 1
!
ip route 1.1.1.1 255.255.255.255 Null0 track 1
!
ip prefix-list FAKE_NETWORK permit 1.1.1.1/32
!
route-map TRACK_FAKE_NETWORK permit 10
 match ip address prefix-list FAKE_NETWORK
!
router ospf 1
 default-information originate always route-map TRACK_FAKE_NETWORK
!

Note!
This solution requires the presence of a bogus/fake network entry in the routing table (here: 1.1.1.1/32). This is the condition for default route advertisement.

As long as 1.1.1.1/32 is present in the routing table, R2 advertises the default route into OSPF. This entry (1.1.1.1/32) will be present in the routing table as long as object 1 receives success from IP SLA 1 probe. 

Pic. 3 - R1 Receives Default Route.



Study Drill

This is a more reliable method of injecting a default route into OSPF since it will rely on non-direct failure.


Perform the test by shutting down 10.0.8.8 on SW2. See, if the default route has been withdrawn. Below, is what happens to IP SLA when SW2 shuts down its loopback0 interface.


Pic. 4 - IP SLA Statistics on R2 (SW2 Loopack Down).


As a result of that, 1.1.1.1/32 disappears from the routing table on R2.


Pic. 5 - 1.1.1.1/32 is Missing.


And R2 stops advertising the default route.


Pic. 6 - R1 Loses Default Route.


As soon as connectivity to 10.0.8.8 is restored, the default route R2 advertises into OSPF again.

Post Top Ad