03-07-2014 02:31 AM - edited 03-07-2019 06:34 PM
Hi guys,
I have like the simplest form of redistribution setup in a test lab but cant seem to get it to work correctly:
router ospf 1
redistribute static subnets route-map STATIC-TO-OSPF
ip route 123.0.0.0 255.255.255.0 10.100.0.18
!
!
route-map STATIC-TO-OSPF permit 1
match ip address prefix-list STATIC-PREFFERED-RTR1
set metric 10000 10 255 1 150
!
route-map STATIC-TO-OSPF permit 2
match ip address prefix-list STATIC-PREFFERED-RTR2
set metric 10000 20 255 1 150
!
However, With this setup, It still advertises the 123.0.0.0 subnet.
How do I get it to NOT do this?
I add the
ip prefix-list STATIC-PREFFERED-RTR1 seq 10 deny 0.0.0.0/0 le 32
And yet it still advertises the 123.0.0.0 subnet?!?
Clearly its ignoring the prefix list?
Any help would be epic.
-Graham
Please note: My comments are simply suggestions. I cannot be held liable for any loss of data, life or marbles due to following my instructions.
Got a website? Need some live chat software?
Solved! Go to Solution.
03-07-2014 03:32 AM
Put those what you want in prefix-list...for example if you have:
ip route 10.10.1.0 255.255.255.0
ip route 10.10.2.0 255.255.255.0
ip route 10.10.3.0 255.255.255.0
And you want to redistribute only 1 and 3 statement:
ip prefix-list STATIC-PREFFERED-RTR1 permit ip 10.10.1.0/24
ip prefix-list STATIC-PREFFERED-RTR2 permit ip 10.10.3.0/24
And then use this lists in your route-map...
There are also many other options but this could be one of them...
HTH,
Dragan
03-07-2014 02:34 AM
Graham,
Can you perhaps post the entire prefix lists? Thanks!
Best regards,
Peter
03-07-2014 02:36 AM
That is it.
When I add the denys to the prefix list ( to not allow ANY statics for the moment )
The prefix lists vanish from the running config ( I assume deny is implied? )
yet, It still allows any static to be redistributed..
This is all my routing config and prefix list config.
03-07-2014 02:52 AM
Ok, maybe not.
Im being stupid..
I want to have two prefix lists. These will contain statics I want to redistribute.
However, I cannot for the life of me get it to work correctly.
if i place a deny in the first prefix list, then it matches everything and the second one is never looked at?
route-map STATIC-TO-OSPF permit 1
match ip address prefix-list STATIC-PREFFERED-RTR1
set metric 10000 10 255 1 150
!
route-map STATIC-TO-OSPF permit 2
match ip address prefix-list STATIC-PREFFERED-RTR2
set metric 10000 20 255 1 150
!
route-map STATIC-TO-OSPF deny 3
03-07-2014 03:20 AM
Right - because you have positive match second one is not going to be evaluated...you must be more specific in it.
HTH,
Dragan
03-07-2014 03:25 AM
Any ideas how to do this?
If I dont match on the first, It never goes on to the second because it thinks it matched nothing.
Arrge
This si driving me crazy..
I have a bunch of statics that I dont want to be redistributed, but some that I do ( in either the RTR1 or RTR2 route map. )
This is driving me absolutely crazy.
It seems like there is no way around this..
Needs to be almost.
If IP is not in list 1, move on to route map 2.
If IP is not in list 2, deny anything else.
03-07-2014 03:32 AM
Put those what you want in prefix-list...for example if you have:
ip route 10.10.1.0 255.255.255.0
ip route 10.10.2.0 255.255.255.0
ip route 10.10.3.0 255.255.255.0
And you want to redistribute only 1 and 3 statement:
ip prefix-list STATIC-PREFFERED-RTR1 permit ip 10.10.1.0/24
ip prefix-list STATIC-PREFFERED-RTR2 permit ip 10.10.3.0/24
And then use this lists in your route-map...
There are also many other options but this could be one of them...
HTH,
Dragan
03-07-2014 03:34 AM
Thanks,
The problem I have is that in some places, the prefix list may be empty at the moment..
Does adding the deny 0.0.0.0/0 atthe end cause any issues? Because without it, Its allowing everything through.
ip route 120.0.0.0 255.255.255.0 10.100.0.18
ip route 123.0.0.0 255.255.255.0 10.100.0.18
ip route 123.123.0.0 255.255.255.0 10.100.0.18
!
!
ip prefix-list STATIC-PREFFERED-RTR1 seq 4 permit 123.123.0.0/24
ip prefix-list STATIC-PREFFERED-RTR1 seq 5 deny 0.0.0.0/0
!
ip prefix-list STATIC-PREFFERED-RTR2 seq 10 deny 0.0.0.0/0
!
route-map STATIC-TO-OSPF permit 1
match ip address prefix-list STATIC-PREFFERED-RTR1
set metric 10000 10 255 1 150
set metric-type internal
!
route-map STATIC-TO-OSPF permit 2
match ip address prefix-list STATIC-PREFFERED-RTR2
set metric 10000 20 255 1 150
!
03-07-2014 03:37 AM
For exmaple. I need to do it like this otherwise it doesnt work.
Does this seem sensible?
ip prefix-list STATIC-PREFFERED-RTR1 seq 10 deny 0.0.0.0/0
!
ip prefix-list STATIC-PREFFERED-RTR2 seq 5 permit 123.123.0.0/24
ip prefix-list STATIC-PREFFERED-RTR2 seq 10 deny 0.0.0.0/0
!
route-map STATIC-TO-OSPF permit 1
match ip address prefix-list STATIC-PREFFERED-RTR1
set metric 10000 10 255 1 150
set metric-type internal
!
route-map STATIC-TO-OSPF permit 2
match ip address prefix-list STATIC-PREFFERED-RTR2
set metric 10000 20 255 1 150
03-07-2014 03:42 AM
Right,
Thanks guys,
I think I have it licked now.
Ill just have the deny 0.0.0.0/0 at the end of each list ( even ones not having any IP's in them )
Looks like I ws getting muddled with empty prefix lists allowing all.
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