cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
512
Views
0
Helpful
3
Replies

OSPF Static Route Redistribution Tweak

Sighclops
Level 1
Level 1

I have a router running OSPF and have it set to redistribute connected and static routes. I would like to add a static route to a router but not have this particular route redistribute, while all others still do. How can i accomplish this on my 7609?

1 Accepted Solution

Accepted Solutions

Rolf Fischer
Level 9
Level 9

Hi,

you can use a route-map to control which routes are redistributed. There are several options to tell the route-map which routes to filter out, one powerful option would be a prefix-list.

Example:

Redistribute all static routes except for 192.168.1.0/24

! deny 192.168.1.0/24 and permit everything else

ip prefix-list FILTER-STATIC seq 10 deny 192.168.1.0/24
ip prefix-list FILTER-STATIC seq 20 permit 0.0.0.0/0 le 32

!

route-map STATIC-2-OSPF permit 10
 match ip address prefix-list FILTER-STATIC

!

router ospf 1
 redistribute static metric-type 1 subnets route-map STATIC-2-OSPF

!

HTH

Rolf

View solution in original post

3 Replies 3

Rolf Fischer
Level 9
Level 9

Hi,

you can use a route-map to control which routes are redistributed. There are several options to tell the route-map which routes to filter out, one powerful option would be a prefix-list.

Example:

Redistribute all static routes except for 192.168.1.0/24

! deny 192.168.1.0/24 and permit everything else

ip prefix-list FILTER-STATIC seq 10 deny 192.168.1.0/24
ip prefix-list FILTER-STATIC seq 20 permit 0.0.0.0/0 le 32

!

route-map STATIC-2-OSPF permit 10
 match ip address prefix-list FILTER-STATIC

!

router ospf 1
 redistribute static metric-type 1 subnets route-map STATIC-2-OSPF

!

HTH

Rolf

Thanks Rolf... exactly what I was looking for!

You're welcome! Thanks for using the rating system.

Review Cisco Networking for a $25 gift card