11-23-2015 10:51 AM - edited 03-08-2019 02:48 AM
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?
Solved! Go to Solution.
11-23-2015 11:32 AM
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
11-23-2015 11:32 AM
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
11-23-2015 12:35 PM
Thanks Rolf... exactly what I was looking for!
11-23-2015 12:44 PM
You're welcome! Thanks for using the rating system.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide