cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2394
Views
0
Helpful
5
Replies

Stopping a static route being advertised

mulhollandm
Level 1
Level 1

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 5

donewald
Level 6
Level 6

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

Thanks to all for your help

CHARLES HEUPEL
Level 1
Level 1

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

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.

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