08-09-2006 03:15 AM - edited 03-03-2019 04:26 AM
I'd like to redistribute a pile of statics on a router into OSPF. However I don't want to redistribute ones that go via a particular router.
Would an extended access list with the particular router as the destination do this ?
Router ospf 1
redistribute statics subnets route-map statics
access-list 100 permit any 10.0.0.1
route-map Statics deny 10
match ip address 100
route-map Statics permit 20
So the theory is match anything to 10.0.0.1. And then in the route-map deny these from being redistributed. Permit any other statics with line 20.
Thanks, Stephen.
08-09-2006 03:28 AM
Stephen
I believe that you will have problems using a match against an access list such as you have suggested. I suggest that instead you match against the next hop address (which uses a standard access list which will explicitly look for the next hop address). The config would be something like this:
route-map statics permit 10
match ip next-hop 50
!
access-list 50 deny
access-list 50 permit any
HTH
Rick
08-09-2006 04:46 AM
Thanks Rick but that's similar to what I've used before. That matches the route, not the next hop. I think that would only match a static route to 10.0.0.1, not a route that has 10.0.0.1 as next hop.
I may be wrong though.
I'll need to test it.
Stephen.
08-09-2006 08:32 AM
How many static routes are they? If they are not many try use an ACL that only permits the list of static routes you want to distribute. However, it they are many you can use the route map matching against ACL and NEXT HOP.
Let me know if this helps,
08-09-2006 10:15 AM
Stephen
The significant difference between what you posted and what I suggested is that you were doing a match on ip address - which uses an access list and does indeed match on source and destination addresses not on the next hop address. What I suggested is something that will check for the next hop address - it also uses access lists but note that it uses standard access list not extended access list. And it will check for the next hop.
Please do test it. I think you will find that it does what you need. If not please post to the forum with the details of what you tested.
HTH
Rick
08-10-2006 12:07 AM
Rick,
You are correct. I hadn't noticed the match next-hop in your answer.
Many thanks for the replies.
Stephen.
08-10-2006 05:47 AM
Stephen
You are quite welcome.
I believe that the match next-hop was developed especially for use with route maps in policy based routing where it could redirect traffic based on the next hop the packet would take. I believe that it can also function in redistribution.
If it does not work then I have an alternative suggestion. There is an option in configuring static routes to set a tag value with the static route. If you configure your static routes (especially the ones that you do not want to redistribute) with a tag value then you can write a route map to use with redistribution that will match the tag value and will deny those static routes with particular tag values.
HTH
Rick
08-09-2006 10:32 AM
Here is a config I use for one network.
access-list 5 permit 172.19.2.0
route-map (name) permit 10
match ip address 5
router eigrp 1
redistribute static route-map static (name)
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