Re: How I can inject a default route into the OSPF upon the

From: Dale Shaw (dale.shaw@gmail.com)
Date: Tue Feb 24 2009 - 05:03:40 ARST


Hi,

On Tue, Feb 24, 2009 at 5:36 PM, ccie <ccie@just-horizon.com> wrote:
> Hi Experts,
>
> How I can inject a default route into the OSPF upon the availability of a
> ping to certain destination?

This is really rough but I tested it and it does work:

ip sla monitor 10
 type echo protocol ipIcmpEcho 10.1.13.3 source-interface Serial0/0/0.13
 timeout 500
 threshold 1000
 frequency 5
ip sla monitor schedule 10 life forever start-time now
!
track 1 rtr 10
!
ip route 1.1.1.1 255.255.255.255 Null0 track 1
!
ip prefix-list STEER seq 5 permit 1.1.1.1/32
!
route-map CHEESE permit 10
 match ip address prefix-list STEER
!
router ospf 10
 default-information originate always route-map CHEESE

- static route 1.1.1.1/32 is only 'up' if pings to 10.1.13.3 are succeeding
- default-originate uses route-map which requires 1.1.1.1/32 to be in
the routing table

> And How I can inject a default route into the OSPF upon the availability of
> a directly connected link?

interface Lo0
 !
 ! this is the directly connected interface we want to use as part of
the condition
 !
 ip address 1.1.1.1 255.255.255.255
!
ip prefix-list LOOPBACK0-IP seq 5 permit 1.1.1.1/32
!
route-map CHEESE permit 10
 match ip address prefix-list LOOPBACK0-IP
!
router ospf 10
 default-information originate always route-map CHEESE

(I quickly tried 'match interface' but that did not work.)

cheers,
Dale

Blogs and organic groups at http://www.ccie.net



This archive was generated by hypermail 2.1.4 : Sun Mar 01 2009 - 09:44:12 ARST