Routing

 View Only
last person joined: 5 hours ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  BGP Peer Priority Preference

    Posted 05-16-2024 17:37

    Hello Fellow Peers.

    I am need of some assistance. We have 3 ISP's that wwe BGP Peer with. ISP 1, is a 10Gb Peer, and has been running good for the past few years, but now they are having issues. Change of Ownership / Personnel, etc...

    While we would like to maintain the BGP Peer with ISP 1, we would like to have the bulk of the traffic go out ISP 2. ISP 2 is also a 10Gb BGP Peer.

    We have tried using the preference statement, but not seeing any real changes in traffic.

    We have also tried to pre-pend the ASN on ISP 1 to make it the undesirable path, but that seemed to have no effect as well.

    I have included the protocols config of the router for BGP.

    Any assistance would be appreciated.

    protocols {
        bgp {
            group internal {
                type internal;
                export next-hop-self;
                neighbor X.X.X.254;
            }
            group internet-peers {
                type external;
                family inet {
                    unicast;
                    multicast;
                }
                peer-as XXXX4;
                multipath;
                neighbor X.X46.253 {
                    description "ISP 3 - 5G";
                    preference 173;
                    export [ Adv-ISP-3 ];
                    peer-as XXXX3;
                }
                neighbor X.X152.197 {
                    description "ISP 2 - 10G";
                    preference 170;
                    export Adv-ISP-2;
                    peer-as XXXX2;
                }
                neighbor X.X.216.137 {
                    description "ISP 1 - 10G";
                   preference 171;
                    export Adv-ISP-1;
                    peer-as XXXX1;
                }
            }
            advertise-inactive;
            log-updown;
        }
        ospf {
            area 0.0.0.0 {
                interface lo0.10 {
                    passive;
                }
                interface xe-1/0/1.0 {
                    authentication {
                        md5 0 key "$9$lmMM7Vji.QF/s2QFn/OBNdbw2a"; ## SECRET-DATA
                    }
                }
                interface ge-0/1/5.0 {
                    passive;
                }
                interface xe-0/2/1.0 {
                    authentication {
                        md5 0 key "$9$lmMM7Vji.QF/s2QFn/OBNdbw2a"; ## SECRET-DATA
                    }
                }
                interface ge-0/0/5.0 {
                    passive;
                }
                interface ge-0/1/0.0 {
                    passive;
                }
            }
            export redist-default;
            reference-bandwidth 10g;
        }
    }

    Thank You



  • 2.  RE: BGP Peer Priority Preference

    Posted 05-17-2024 01:28

    Hello,

    For outgoing traffic ( upload ) you can increase ISP2 or ISP3 local-preference by adding import policy.

    For incoming traffic ( download ) AS prepending should work.  Please send your policy configuration. 



    ------------------------------
    CHINGIZ MAMMADOV
    ------------------------------



  • 3.  RE: BGP Peer Priority Preference

    Posted 05-17-2024 15:40

    Hello,

    I have included the policy configuration:
    prefix-list Networks-ISP-1 {
        
        X.X.176.0/22;
        
        X.X.180.0/22;
        
        X.X.32.0/21;
        
        X.X.40.0/21;
        
        X.X.40.0/24;
        
        X.X.41.0/24;
        
        X.X.42.0/24;
        
        X.X.43.0/24;
        
        X.X.44.0/24;
        
        X.X.45.0/24;
    }
    prefix-list External-Networks-ISP-1 {
     
        X.X.64.0/24;
     
        X.X.110.0/24;
     
        X.X.78.120/30;
     
        X.X.110.0/24;
     
        X.X.153.0/24;
     
        X.X.251.0/24;
     
        X.X.254.0/24;
     
        X.X.46.0/24;
     
        X.X.47.0/24;
    }
    prefix-list Networks-ISP-2 {
     
        X.X.176.0/21;
        
        X.X.32.0/20;
        
        X.X.224.0/21;
        
        X.X.40.0/24;
        
        X.X.41.0/24;
        
        X.X.42.0/24;
        
        X.X.43.0/24;
        
        X.X.44.0/24;
        
        X.X.45.0/24;
    }
    prefix-list External-Networks-ISP-2 {
        
        X.X.64.0/24;
        
        X.X.110.0/24;
        
        X.X.78.120/30;
        
        X.X.110.0/24;
        
        X.X.153.0/24;
        
        X.X.251.0/24;
        
        X.X.254.0/24;
        
        X.X.46.0/24;
        
        X.X.47.0/24;
    }
    prefix-list Networks-ISP-3 {
     
        X.X.176.0/21;
        X.X.32.0/20;
     
        X.X.224.0/21;
     
        X.X.40.0/24;
     
        X.X.41.0/24;
     
        X.X.42.0/24;
     
        X.X.43.0/24;
     
        X.X.44.0/24;
     
        X.X.45.0/24;
        
        X.X.46.0/24;
        
        X.X.47.0/24;
    }
    prefix-list External-Networks-ISP-3 {
        
        X.X.64.0/24;
        
        X.X.110.0/24;
        
        X.X.78.120/30;
        
        X.X.110.0/24;
        
        X.X.153.0/24;
        
        X.X.251.0/24;
        
        X.X.254.0/24;
        
        X.X.46.0/24;
        
        X.X.47.0/24;
    }
    policy-statement AS-prepend-ISP-1 {
        from policy Adv-ISP-1;
        then {
            as-path-prepend "XXXX4 XXXX4 XXXX4 XXXX4";
            accept;
        }
    }
    policy-statement AS-prepend-ISP-3 {
        from policy Adv-ISP-3;
        then {
            as-path-prepend "XXXX4 XXXX4 XXXX4 XXXX4";
            accept;
        }
    }
    policy-statement Adv-ISP-1 {
        term 10 {
            from {
                protocol static;
                prefix-list-filter Networks-ISP-1 exact;
            }
            then accept;
        }
        term 15 {
            from {
                protocol bgp;
                prefix-list-filter External-Networks-ISP-1 exact;
            }
            then accept;
        }
        term 20 {
            then reject;
        }
    }
    policy-statement Adv-ISP-2 {
        term 10 {
            from {
                protocol static;
                prefix-list-filter Networks-ISP-2 exact;
            }
            then accept;
        }
        term 15 {
            from {
                protocol bgp;
                prefix-list-filter External-Networks-ISP-2 exact;
            }
            then accept;
        }
        term 20 {
            then reject;
        }
    }
    policy-statement Adv-ISP-3 {
        term 10 {
            from {
                protocol static;
                prefix-list-filter Networks-ISP-3 exact;
            }
            then accept;
        }
        term 15 {
            from {
                protocol bgp;
                prefix-list-filter External-Networks-ISP-3 exact;
            }
            then accept;
        }
        term 20 {
            then reject;
        }
    }
    policy-statement next-hop-self {
        then {
            next-hop self;
        }
    }
    policy-statement preference {
        term ISP-1 {
            from {
                protocol bgp;
                next-hop X.X.216.137;
            }
            then {
                preference 10;
            }
        }
        term ISP-2 {
            from {
                protocol bgp;
                next-hop X.X.152.197;
            }
            then {
                preference 15;
            }
        }
        term ISP-3 {
            from {
                protocol bgp;
                next-hop X.X.46.253;
            }
            then {
                preference 20;
            }
        }
    }
    policy-statement redist-default {
        from {
            protocol static;
            route-filter 0.0.0.0/0 exact;
        }
        then accept;
    }




  • 4.  RE: BGP Peer Priority Preference

    Posted 15 days ago

    Hi,

    Sorry for late response. The config is correct. It seems that uplink provider of your ISP1 is prefers it. Most providers apply higher local preference to their direct customers. So your prepend will not work in this case. Some provider offer to change local preference with communities. For example : https://apps.db.ripe.net/db-web-ui/query?from=www&searchtext=AS1299#:~:text=1299%3A50%20Set%20local%20pref%2050%20within%20AS1299%20(lowest%20possible)



    ------------------------------
    CHINGIZ MAMMADOV
    ------------------------------