Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Stopping a static route being advertised

I have a remote network which is having difficulty picking up all the routes advertised from a backbone network using ospf.

My intention is to put a few static routes pointing to the backbone or to set a default/last resort gateway on my remote network to solve SMS problems, however, i'm told if i do this then my remote router will advertise these routes back to the backbone with a better metric, therefore causing routing problems on the backbone.

Is this true?

If so is there a way to set up the static routes but to prevent the router advertising them in its ospf updates?

thanks for any help/advice

5 REPLIES
Silver

Re: Stopping a static route being advertised

Static routes will only be advertised by your ospf speaking router if you have "redistribute static" in your ospf process. If you have this and want to stop only a subset of statics from getting out then a distribution-list in your redistribution statement will allow this as well.

Hope this helps you,

Don

New Member

Re: Stopping a static route being advertised

Thanks to all for your help

New Member

Re: Stopping a static route being advertised

As Don stated, unless you put the redistribute static statement in your ospf speaking router the static routes will not be advertised by your ospf speaking router. However, if you choose to enter the statement, you can also use a route-map statement to prevent the ospf speaking router from advertising certain static routes. Here is a configuration example.

access-list 1 deny x.x.x.x (network) x.x.x.x (wildcard bits)

!

route-map STATIC (STATIC is the name of the route-map)

match ip address 1 ( 1 is the access-list number I created earlier)

!

router ospf 1

redistribute static subnets route-map STATIC

Hope this helps....

Shane

New Member

Re: Stopping a static route being advertised

Shane is correct, except in his according to his route-map, no static routes will be advertised. His access-list 1 will deny all static routes. Because the example only has 1 command, a deny, nothing will be redistributed because of the implicit deny at the end of an access-list.

New Member

Re: Stopping a static route being advertised

Good catch Matthew....I was assuming he knew about the implicit deny all at the end of the access-list and would have to put a permit any statement. Here is the correct configuration.

access-list 1 deny x.x.x.x (network) x.x.x.x (wildcard bits)

access-list 1 permit any

or

access-list 1 permit x.x.x.x (network) x.x.x.x (wildcard bits)

!

route-map STATIC (STATIC is the name of the route-map)

match ip address 1 ( 1 is the access-list number I created earlier)

!

router ospf 1

redistribute static subnets route-map STATIC

123
Views
0
Helpful
5
Replies