Re: OSPF conditional default route injection

From: Narbik Kocharians <narbikk_at_gmail.com>
Date: Wed, 9 Jun 2010 09:18:19 -0700

*Here you go my friend:*
**
*Lets say you have the following topology:*

*R1 (F0/0)---------- (F0/0) R2 (F0/1)-------------(F0/1) R3*

* *

*IP addressing:*

*R1s F0/0 = 10.1.12.1 /24*

*R2s F0/0 = 10.1.12.2 /24*

*R2s F0/1 = 10.1.23.2 /24*

*R3s F0/1 = 10.1.23.3 /24*

*R3s Loopback0 = 3.3.3.3 /24*

* *

*Routing protocols:*

*R1 and R2 are running OSPF in area 0*

* *

*R2 and R3 are running Eigrp As 100, R3s Loopback0 interface is advertised
in this routing protocol.*

*Policy:*

*R2 should inject a default route ONLY if it does NOT see network 3.3.3.0
/24 in its routing table:*

*On R2*

*router ospf 1*

*network 10.1.12.2 0.0.0.0 area 0*

*default-information originate*

*We know that default-information originate on its own will NOT inject a
default route, and we need a default route in order to originate one. Lets
configure one:*

R2(config)#*ip route 0.0.0.0 0.0.0.0 Null0*

*We should see a default route injected in R1s routing table:*

*R1#Show ip route ospf | Inc O*

* *

*O*E2 0.0.0.0/0 [110/1] via 10.1.12.2, **00:08:09**, FastEthernet0/0*

*Now lets implement the policy:*

*The state of the following Boolean will ONLY be UP, if object 1 is NOT up
(Specified by the NOT keyword in the second line of the following
configuration):*

R2(config)#*track 3 list boolean and*

R2(config -track)#*object 1 NOT*

*But the question is, what is object 1? So lets define object 1:*

 R2(config)#*track 1 ip route 3.3.3.0 255.255.255.0 reachability*

*Now lets test:*

*On R1*

R1#Show ip route ospf | Inc O

R1#

*Note R1 does NOT have a default route anymore because R2 can see network
3.3.3.0 /24 in its routing table, here is the proof:*

*On R2*

*R2#Show ip route | B Gate*

Gateway of last resort is not set

     3.0.0.0/24 is subnetted, 1 subnets

*D 3.3.3.0 [90/156160] via 10.1.23.3, **00:01:56**, FastEthernet0/1*

     10.0.0.0/24 is subnetted, 2 subnets

C 10.1.12.0 is directly connected, FastEthernet0/0

C 10.1.23.0 is directly connected, FastEthernet0/1

*So lets shutdown the loopback0 interface on R3 and see the result:*

*On R3*

R3(config)#*Int lo0*

R3(config-if)#*Shut*

*Lets check the routing table on R1:*

*On R1*

*BB1#Show ip route ospf*

* *

*O*E2 0.0.0.0/0 [110/1] via 10.1.12.2, **00:01:07**, FastEthernet0/0*

On Wed, Jun 9, 2010 at 8:03 AM, Sorin Platon <sorin.platon_at_gmail.com> wrote:

> So i tried tested and labed the OSPF conditional default route injection,
> all the scenarios i did were to inject a default route based on the
> presence
> of a subnet in the routing table
>
> This was done trough route-maps or reliable static routes
>
> I'm trying to do the reverse, inject a default route in case a subnet is
> NOT
> present in the routing table
>
> I did tried the obvious and did a deny on the ACL or a deny in the routing
> map but didn't got the desired result
>
> is it feasible ?
>
> regards
> Sorin
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>
>

--
Narbik Kocharians
CCSI#30832, CCIE# 12410 (R&S, SP, Security)
www.MicronicsTraining.com
Sr. Technical Instructor
YES! We take Cisco Learning Credits!
Training And Remote Racks available
Blogs and organic groups at http://www.ccie.net
Received on Wed Jun 09 2010 - 09:18:19 ART

This archive was generated by hypermail 2.2.0 : Sun Aug 01 2010 - 09:11:37 ART