Prefix-Lists and Route-Maps


#1

Hey guys,

So I’m trying to write a prefix-list and route-map, that will allow ANY route to be passed, but strip the default route.

Does anyone have this route-map/prefix-list configured that they could share?


#2

I suspect there’s more than one way to do it; but this worked in my lab assuming we want to receive all routes, but not default.

set policy prefix-list 42 rule 1 action 'permit'
set policy prefix-list 42 rule 1 ge '1'
set policy prefix-list 42 rule 1 le '31'
set policy prefix-list 42 rule 1 prefix '0.0.0.0/0'

set policy route-map INGRESS rule 1 action 'permit'
set policy route-map INGRESS rule 1 match ip address prefix-list '42'

set protocols bgp 65001 neighbor 10.10.1.1 route-map import 'INGRESS'

#3

Thanks @chrisg that worked for me! Done what I needed!