Route-Map with IP prefix list that does not exist?

I was experimenting with a lab I created to test BGP to OSPF redistribution, and just want to clarify the behaviour I have seen or find some documentation

Basic setup R1 redistributing BGP routes into R2's OSPF. I wanted to set the metric of one subnet and set the type for another 2 x subnets.

route-map BGP_to_OSPF permit 30
 match ip address prefix-list 1_routes
 set metric 200
route-map BGP_to_OSPF permit 40
 match ip address prefix-list 2_routes
 set metric-type type-1
route-map BGP_to_OSPF permit 50

During my config the prefix list 1_routes did not exist.

The behaviour I saw was that the 2_routes networks were leaving R1 with a metric of 200?

Once I added the prefix-list 1_routes in this went away.

I have proved the behaviour but need to clarify the logic?

If you reference a prefix list that does not exist is that the same as having an empty line so it will set metric of 200 on everything?





  • it is not just the case with prefix-list it is the case with route-map, access-list, prefix-list. If there is a statement there will be a implicit deny at the end but if the list is empty you can say it has the opposite implicit permit. That is a good behavior as you can put a access-list or route-map and acciently refer a list that is not there and block everything.




  • Thank you for clarifying, I have not done much with route-maps to date so it is all good learning!



  • IF you match in a route-map on a prefix-list or ACL which does not exists, it ignores the command. What happens ina  route-map entry when you have no match commands? It has an  implicit/invisible match any. If you apply an ACL to an interface, direction is irelevant, and the ACL has no ACE entries, there is an implicit/invisible permit any. The implicit deny any gets activated in an ACL as soon as you add at least one ACE to the ACL.

    Good luck with your studies!

Sign In or Register to comment.