Skip to main content
1 of 2
MLu
  • 175
  • 1
  • 1
  • 7

Cisco 877 - Advertise OSPF default route only when PPP is up

I've got a Cisco 877 ADSL router from which I advertise a default route via OSPF to our central router. It also does a standard ADSL / PPP connection to one of our ISPs. What I want is to advertise the default route only when PPP is up. If it goes down stop advertising 0.0.0.0/0. We don't get a BGP or OSPF feed over that ADSL so I can't simply redistribute what I receive. Is that doable?

Here is the PPP config:

interface Dialer0
 ip address negotiated
 ip access-group INTERNET-IN in
 no ip redirects
 no ip unreachables
 ip mtu 1492
 ip nat outside
 ip inspect INTERNET out
 ip virtual-reassembly
 encapsulation ppp
 dialer pool 1
 no cdp enable
 ppp authentication pap callin
 ppp pap sent-username ...
 ppp ipcp route default

And here is the OSPF config:

router ospf 1
 log-adjacency-changes
 redistribute static subnets route-map ospf_tcl
 network 192.168.128.0 0.0.15.255 area 1
 default-information originate metric 1

route-map ospf_tcl permit 10
 match ip address prefix-list adsl_defroute

ip prefix-list adsl_defroute seq 5 permit 0.0.0.0/0
ip prefix-list adsl_defroute seq 10 permit 192.168.128.0/20

Thanks!

MLu
  • 175
  • 1
  • 1
  • 7