OSPF Default Routing
Case 1 - Advertise Route when default route in routing table
R6
router ospf 10
network 6.6.6.6 0.0.0.0 area 3
network 16.0.0.0 0.0.0.255 area 3
default-information originate metric 60 metric-type 1
ip route 0.0.0.0 0.0.0.0 Null0
R1
O*E1 0.0.0.0/0 [110/61] via 16.0.0.6, 00:00:10, FastEthernet0/0
Case 2 - Advertise Route when default route not in routing table
now we will remove Default Route, So R6 will not have any default route in Routing Table.
Other area will not have any default route.
R6
router ospf 10
default-information originate always metric 40
R1
O*E2 0.0.0.0/0 [110/40] via 16.0.0.6, 00:01:50, FastEthernet0/0
Case 3 - Default route generate only when Loopback 1 66.6.6.6/32 is in routing table.
R6
R6#sh ip int br | in Loopback1
Loopback1 66.6.6.6 YES NVRAM up up
router ospf 10
default-information originate route-map loop1
//ip route 0.0.0.0 0.0.0.0 Null0 this route is not required //
!
route-map loop1 permit 10
match ip address 1
!
access-list 1 permit 66.6.6.6
R1
O*E2 0.0.0.0/0 [110/1] via 16.0.0.6, 00:00:01, FastEthernet0/0
Now in R6
int lo1
shut
%LINK-5-CHANGED: Interface Loopback1, changed state to administratively down
R1
route will disappear as R6 does not have 66.6.6.6/32 in his routing table.
R1#sh ip route 0.0.0.0
% Network not in table
R1#
Case 4- Reliable Conditional Default Routing
track 1 ip sla 1 reachability
router ospf 10
default-information originate always route-map track
ip route 106.106.106.106 255.255.255.255 Null0 track 1
ip sla 1
icmp-echo 9.9.9.9
ip sla schedule 1 life forever start-time now
route-map track permit 10
match ip address prefix-list track
R1#sh ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
Known via "ospf 10", distance 110, metric 1, candidate default path
Tag 10, type extern 2, forward metric 1
Last update from 16.0.0.6 on FastEthernet0/0, 00:01:49 ago
Routing Descriptor Blocks:
* 16.0.0.6, from 66.6.6.6, 00:01:49 ago, via FastEthernet0/0
Route metric is 1, traffic share count is 1
Route tag 10
R1#
R9
Now we will shut lo0 in R9
int lo0
shut
Loopback0 9.9.9.9 YES NVRAM administratively down down
R6
R6#sh track
Track 1
IP SLA 1 reachability
Reachability is Down
3 changes, last change 00:00:33
Latest operation return code: Timeout
Tracked by:
Static IP Routing 0
R1
Now we can see now in R1 no default route is from R6
R1#sh ip route 0.0.0.0
% Network not in table
R1#
No comments:
Post a Comment