Skip to main content
gradius85
New Member
October 17, 2019
Question

Difference between 'pre-fixlist-out6' vs 'route-map-out6'

  • October 17, 2019
  • 2 replies
  • 5286 views

I am looking over the BGP configuration section of the manual for 6.x; however, I am not understanding when to use pre-fix-list-out6 vs route-map-out6.

 

Any help or suggestions is greatly appreciated.

 

Thank you

    2 replies

    emnoc
    New Member
    October 17, 2019

    They have different benefits for various reason,"route-maps" allow specific customization depending on if they are in or out such as ;

     

        set tags, metric, routeOrigin, etc..

     

    config router route-map

        edit "map"

            config rule

                edit 1

                    set match-tag 234

                    set set-metric 23450

                next

            end

        next

    end

     

    Prefix-list strictly match or do-not match on /cidr prefixes. ( i.e route-filtering )

     

    config router prefix-list

        edit "routes-west"

            set comments "routes out of west DC"

            config rule

                edit 1

                    set prefix 10.19.11.0 255.255.255.0

                    unset ge

                    unset le

                next

                edit 2

                    set prefix 10.12.11.0 255.255.255.0

                    unset ge

                    unset le

                next

            end

        next

    end

     

    Ken Felix

    Toshi_Esumi
    SuperUser
    SuperUser
    October 17, 2019

    prefix-list/prefix-list6 is to just define prefixes. route-map/route-map6 can set rules to filter/manupulate routes based on many parameters, like prefix-list (match-ip-address), community (match-community), as path (match-as-path), and so on.

    So if you want to filter BGP routes in or out by prefixes, you have two options: 1) directly refer to the prefix-list/prefix-list6 at BGP neighbor config (set prefix-list-in/out/-in6/out6), or 2) create a route-map/-map6 to referto the same prefix-list/-list6, then refer to it.

    My preference is always using route-map because soon or later we need to manipulate those parameters, like setting/changing communities, append ASes, and so on by matching the prefixes. Not just filtering in/out from/to BGP table based on prefixes.

    gradius85
    gradius85Author
    New Member
    October 18, 2019

    toshiesumi wrote:

    prefix-list/prefix-list6 is to just define prefixes. route-map/route-map6 can set rules to filter/manupulate routes based on many parameters, like prefix-list (match-ip-address), community (match-community), as path (match-as-path), and so on.

    So if you want to filter BGP routes in or out by prefixes, you have two options: 1) directly refer to the prefix-list/prefix-list6 at BGP neighbor config (set prefix-list-in/out/-in6/out6), or 2) create a route-map/-map6 to referto the same prefix-list/-list6, then refer to it.

    My preference is always using route-map because soon or later we need to manipulate those parameters, like setting/changing communities, append ASes, and so on by matching the prefixes. Not just filtering in/out from/to BGP table based on prefixes.

    I suspect - I know what you mean... I am already prepending one of my full class C blocks out to a different ISP by prepending the path. I am looking at working with the ISP and migrating to communities; however, I am not there yet with understanding what 'communities' will by me.

     

    I do want to get rid of my prepend, so I can let BGP and the ISP do their 'smoke and mirror' magic; however, had some peering issue in the Internet when I removed prepending on IPv6. So more research is required.

     

    Thank you

    Toshi_Esumi
    SuperUser
    SuperUser
    October 18, 2019

    I doubt you could get rid of prepending unless the problem you're experiencing is inside of your ISPs.

    The prepending is a method utilizing BGP built-in mechanism to prefer a shorter AS path route over longer ones. But those communities you attach are just tags that needs to be understood what each value mean by whom receives the route. Generally between direct neighbors. So your ISPs need to agree what to do with your routes when they have "community 1" attached or "community 2", and so on. They would mean nothing to anybody else and be ignored/removed.

    gradius85
    gradius85Author
    New Member
    October 18, 2019

    toshiesumi wrote:

    I doubt you could get rid of prepending unless the problem you're experiencing is inside of your ISPs.

    The prepending is a method utilizing BGP built-in mechanism to prefer a shorter AS path route over longer ones. But those communities you attach are just tags that needs to be understood what each value mean by whom receives the route. Generally between direct neighbors. So your ISPs need to agree what to do with your routes when they have "community 1" attached or "community 2", and so on. They would mean nothing to anybody else and be ignored/removed.

    Hmmm... my hope was to remove the prepending to allow the ISP and the Internet just route the traffic based on the ISP best path. I can run with asymmetric routing, due to the latter, I thought I could remove the prepend, and would see possible traffic and return traffic come in via different ISP.

     

    I really do not care which path my traffic takes, as long as the ISP delivers the traffic down. When I did remove IPv6 prepend, it broke AT&T connectivity to me. That appears to be the only IPv6 network that broke... Comcast worked fine. In addition, I did see some BGP looking glass servers showed both paths, which is what I wanted; however, which path being taken... not sure.

     

    NOTE - I am not an AT&T customer... this was some hops out.