prefix list


#1

Hi to all
Many years ago, I did the following configuration:

prefix-list ASXXXXX-BH-out { rule 1 { action permit ge 32 prefix 0.0.0.0/0 } }

I have to adming that I don’t really remember what it does.
It should “catch” all prefixes greater than /32, right? Thus, it should catch everything.

What is strange is that these prefixes should be put in blackholing, due to this:

     route-map eBGP-EXPORT {
         rule 1 {
             action permit
             description "BGP Blackholing IPv4"
             match {
                 ip {
                     address {
                         prefix-list ASXXXXX-BH-out
                     }
                 }
                 tag 666
             }
             set {
                 community XXXXX:666
             }
         }

If I set a null-route to a single ip with this:

set protocol static route 1.2.3.4/32 blackhole

In fact, on my peer router, I’m able to see 1.2.3.4/32 with the proper community set to XXXXX:666

Some questions:

  1. why is this working?
  2. my prefix-list, shouldn’t catch everything and thus setting the same community to everything?

#2

The prefix-list ASXXXXX-BH-out matches all address ranges in the 0.0.0.0/0 address space that have a netmask greater than or equal (ge) to /32. So all routes with a netmask of 255.255.255.255 will match the prefix-list config block.


#3

Thank you. So is the opposite as I expect and that’s why is working.

Do you know how to match all prefixes having “blackhole/Null0” as next-hop ? I would like to remove the current prefix-list rule and match only the blackholed IPs