cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to set BGP Local Preference on VPNv4 routes

Unable to set BGP Local Preference on VPNv4 routes

Rowan_Sakul
New Contributor III

Hi,
We're trying to our MPLS PE device to properly advertise VPNv4 routes with an appropriate local preference within iBGP-VPNv4.
This is so we can influence the preferred path and PE devices the traffic traverses in our L3VPN MPLS network.

We've managed to use the following policy to mark inbound BGP IPv4 routes with a Local Preference
Config XOS Command: (within Customer VR) "configure bgp neighbor [CUSTOMER_PEER] route-policy in VPRN-CUSTOMER-1-I-SITE-PE1"

Policy File: VPRN-CUSTOMER-1-I-SITE-PE1
entry ALLOW_ALL_WITH_LP50 {
        if match all {
                nlri 0.0.0.0/0 ;
        } then {
                local-preference 50;
                permit;
        }
}

Verify XOS Command: (within Customer VR) "show bgp neighbor [CUSTOMER_PEER] received-routes all"
The command above shows LPref as correct, but this does not appear to be inherited once its been exported across to VPN-V4, it reverts back to the default of 100.
 
We also tried used the same policy file above as an vpnv4 export policy, but this also did not change what the other PEs see in the VPN-V4 table.
Config XOS Command: (VR-Default) "enable bgp export vr VPRN-CUSTOMER-1 bgp address-family vpnv4 export-policy VPRN-CUSTOMER-1-I-SITE-PE1"

 

Can anyone help point me in the right direction?
Also, can you re-use the same policy file on multiple peers and routing/export policies?

We run XOS 21.1.5.2 and 22.7.2.4 on our network.

1 ACCEPTED SOLUTION

Rowan_Sakul
New Contributor III

Got it sorted, once you’ve got your policy file sorted [OUTBOUND_POLICY_FILE] you need to apply it in the following way:

 

configure bgp neighbor [ROUTE_REFELECTOR_1] address-family vpnv4 route-policy out [OUTBOUND_POLICY_FILE]
configure bgp neighbor [ROUTE_REFELECTOR_2]  address-family vpnv4 route-policy out [OUTBOUND_POLICY_FILE]

 

The takeaway point is to remember to be specific around the relevant address family you are working with. Also that the Local Pref value doesn’t move between address families (at least in my experience with XOS).

I’m not sure you can use nlri as a matching field either, I tested using a route target to match routes I wanted to manipulate.

View solution in original post

3 REPLIES 3

Rowan_Sakul
New Contributor III

One more thing to add, for XOS VPN-V4 and Local Pref to work together, all the PE devices must have the same RD for that particular VRF otherwise Local Pref doesn't take affect.

…..and upgrade to ExtremeXOS 22.7.3-Patch1-3 if your want XOS VPN-V4 to work properly.

Rowan_Sakul
New Contributor III

FYI, this is the Routing Policy we ended up with, we are matching on a community sent from an upstream PE device:

 

@description "THIS POLICY IS FOR MANIPULATING ROUTES OUTBOUND-TOWARDS THE ROUTE REFLECTORS"

# THESE ENTIRES SET THE LOCAL PREFERENCE BASED ON BGP COMMUNITIES

# THE DEFAULT LOCAL PREFERENCE VALUE IS 100

# FOR xG CELLULAR SERVICES

entry SET_LPREF_80 {

    if match any {

        community "65100:80";

    } then {

        local-preference 80;

        permit;

    }

}

# FOR WIRELESS SERVICES

entry SET_LPREF_90 {

    if match any {

        community "65100:90";

    } then {

        local-preference 90;

        permit;

    }

}

# FOR FUTURE IF REQUIRED (NBN EE)

entry SET_LPREF_110 {

    if match any {

        community "65100:110";

    } then {

        local-preference 110;

        permit;

    }

}

# FOR FUTURE IF REQUIRED (DARK FIBRE)

entry SET_LPREF_120 {

    if match any {

        community "65100:120";

    } then {

        local-preference 120;

        permit;

    }

}

# PERMIT REMAINING VPN-V4 ROUTES

# IF NO MATCH CONDITIONS SPECIFIED THEN EVERY ROUTING ENTITY MATCHES

entry PERMIT_ALL {

    if match any {

    } then {

        permit;

    }

}

#IF NO POLICY MATCH DEFAULT ACTION IS DENY

 

Rowan_Sakul
New Contributor III

Got it sorted, once you’ve got your policy file sorted [OUTBOUND_POLICY_FILE] you need to apply it in the following way:

 

configure bgp neighbor [ROUTE_REFELECTOR_1] address-family vpnv4 route-policy out [OUTBOUND_POLICY_FILE]
configure bgp neighbor [ROUTE_REFELECTOR_2]  address-family vpnv4 route-policy out [OUTBOUND_POLICY_FILE]

 

The takeaway point is to remember to be specific around the relevant address family you are working with. Also that the Local Pref value doesn’t move between address families (at least in my experience with XOS).

I’m not sure you can use nlri as a matching field either, I tested using a route target to match routes I wanted to manipulate.

GTM-P2G8KFN