View Only
last person joined: 2 days 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 Routing preference

    Posted 03-01-2024 09:13


    my MX204 is BGP - EBGP.

    protocols {
        bgp {
            group PEERING-DCIX-FRA1 {
                type external;
                local-preference 300;
                import BGP-PEERING-IN;
                export BGP-PEERING-OUT;
                peer-as 6695;
                local-as 101010;
                neighbor {
                    family inet {
                        any {
                            prefix-limit {
                                maximum 350000;

    I have   set  " local-preference 300;" to prioritize the outgoing data traffic to the routes learned by this AS. Unfortunately, the setting doesn't work. The routes remain at the value 170.

    Can you help?




  • 2.  RE: BGP Routing preference

    Posted 03-01-2024 19:13

    The configuration on the peer as you have here is affecting what you ADVERTISE to BGP neighbors.  See this example for usage.

    What you will need is to modify your IMPORT policy to set the desired local preference on RECIEVED routes.  Just add to the import term setting the desired level for local preference.

    Example here.

    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP - Retired)

  • 3.  RE: BGP Routing preference

    Posted 03-02-2024 07:40

    One thing is not clear in your question - are you trying to influence localpref attribute of BGP updates or preference (also known as administrative distance) of BGP routes?

    If you need to influence localpref of the routes (so that this router is the preferred exit point from your AS to the peer AS), then, as Steve already mentioned, you need to increase localpref of incoming prefixes from eBGP peering with import policy. I assume that you have iBGP peering with this router and you try to make this router as preferred exit point from your ASN to the peer ASN.

    "local-preference-Preference to assign to routes that are advertised to the group or peer."

    BUT, if you are trying to change preference of BGP itself from default of 170 to, for instance, 15, then that's a different story, you need to set preference under BGP group


  • 4.  RE: BGP Routing preference

    Posted 03-02-2024 11:52

    1) you're making a confusion between «preference» (170 for BGP routes) which is the cisco «administrative distance» for the protocol ; and the local-pref (default: 100) which is a kind of metric for routes in iBGP (not eBGP).

    2) about the knot «local-preference 12345» in a BGP group, it's expected to be used for iBGP groups and changes advertised routes toward other iBGP peers. Just never use that.

    What you want is to set «then local-pref xxxx» in the import policy used by the eBGP group.

    Olivier Benghozi