Routing

Expand all | Collapse all

BGP prefix /24 and bigger

Jump to Best Answer
  • 1.  BGP prefix /24 and bigger

    Posted 12-19-2018 13:29

    Hi,

    Before I use route-filter for reject small ranges.

     

    route-filter 0.0.0.0/0 prefix-length-range /25-/32

    then reject

     

    But now, I need to accept /24 and bigger prefixes. How do I do it?

     

    route-filter 0.0.0.0/0 prefix-length-range /0-/24 

    then accept

    ?

     



  • 2.  RE: BGP prefix /24 and bigger
    Best Answer

     
    Posted 12-19-2018 15:02

    Hi,

     

    Similar construct but you can use

     

    route-filter 0/0 upto /24

    See this suport page for several exmaples.

     

    Tim



  • 3.  RE: BGP prefix /24 and bigger

     
    Posted 12-19-2018 17:19

    I think you are looking for the "or longer" qualifier where you accept the /24 /25 up through /32 prefixes

     

    route filter 0.0.0.0/24 or longer

     



  • 4.  RE: BGP prefix /24 and bigger

    Posted 12-19-2018 21:11

    It's not correct and not working well. Some /24 didn't came with it.

     

    route-filter 0/0 upto /24 is correct way to do it.



  • 5.  RE: BGP prefix /24 and bigger

    Posted 12-20-2018 00:43

    Hi,

    My policy for BGP sanity on the border routers is like this:

    [edit policy-options]
      policy-statement bgp_sanity {
            term no_shorts {
                from {
                    route-filter 0.0.0.0/0 prefix-length-range /25-/32;
                }
                then reject;
            }
            term rfc1918 {
                from {
                    prefix-list-filter rfc1918 orlonger;
                }
                then reject;
            }
        }

        prefix-list rfc1918 {
            10.0.0.0/8;
            172.16.0.0/12;
            192.168.0.0/16;
        }

     

    I apply it as import policy on BGP neighbours as first policy, if there are more.