Combined ECMP for BGP PE-CE and EVPN IFL/IP-VPN

Note: This feature is supported on 7220 IXR, 7250 IXR and 7730 SXR platforms.

SR Linux supports the combination of EVPN IFL, IP-VPN, and BGP PE-CE routes in a single ECMP set or next-hop group. The combination of routes is also supported in unequal ECMP.

Combined ECMP is supported along with IP Aliasing, unequal ECMP and resilient hashing for EVPN IFL routes.

Combined ECMP is represented in a route table as a single route with a combined next-hop group. When at least one of the next hops is coming from a BGP PE-CE route, the resulting route type is BGP.

All possible route combinations for combined BGP PE-CE weighted ECMP shows all the possible route combinations and the resulting route types. The resulting route follows the best path selection result across the BGP owners of the route.

Table 1. All possible route combinations for combined BGP PE-CE weighted ECMP
Route combination Resulting route type
  • bgp
  • bgp-ipvpn

BGP

  • bgp
  • bgp-evpn

BGP

  • bgp-evpn
  • bgp-ipvpn

BGP-EVPN

  • bgp
  • bgp-evpn
  • bgp-ipvpn

BGP

The range of the number of ECMP paths in a combined set is the minimum of the configured ECMP paths of the contributing routes. The individual ECMP path ranges are:
  • bgp-evpn.ecmp[=1..64]
  • bgp-ipvpn.ecmp[=1..64]
  • bgp.multipath.max-paths-level-1[=1..64]
To show the maximum ECMP number of paths, the following is an example configuration:
  • bgp-evpn.ecmp[=10]
  • bgp-ipvpn.ecmp[=12]
  • bgp.multipath.max-paths-level-1[=15]
In this example, the following are true:
  • If at least one bgp-evpn is present in the combined route, the maximum number of ECMP paths used is 10.
  • Else, if at least one bgp-ipvpn route is present in the combined route, the maximum number of ECMP paths used is 12.
  • Else, the maximum number of ECMP paths is 15.
The combination of multiple BGP PE-CE routes in a single ECMP set is configured using the combined-ecmp command.
--{ * candidate shared default }--[  ]--
A:srl1# info network-instance ip-vrf
    network-instance ip-vrf {
        protocols {
            bgp-vpn {
                combined-ecmp {
                }
            }
        }
    }
Candidate routes to be combined are compared against the BGP best path selection tie-breakers and routes can only be combined if all the best path selection criteria up to the MED comparison are equal. That is, two routes of different owners can be combined for ECMP purposes only if the following attributes match on both routes:
  1. Valid routes
  2. Origin validation state
  3. Route table PREFERENCE
  4. BGP local preference
  5. BGP AS_PATH
  6. BGP origin
  7. BGP MED

When multiple routes of the same or different owner for the same prefix are received, the selection is affected by the configuration of combined-ecmp, as indicated in Best path selection for EVPN IFL routes.

Combined ECMP example

The following figure shows an example of combined ECMP:
Figure 1. Combined ECMP

The figure shows that CE12, CE13, CE21, CE31 and CE41 are all connected to the host 1.2.3.4/32 and advertise this in BGP PE-CE to their connected leaf router. Leaf1 receives the 1.2.3.4/32 prefix via BGP and BGP-EVPN. By configuring combined-ecmp, leaf1 can install a single BGP route to 1.2.3.4/32 with a combined next-hop group that includes the PE-CE routes and remote next hops from EVPN IFL routes, with or without weights and with or without ESIs.

The following shows the configuration of leaf1:
--{ * candidate shared default }--[ network-instance IP-VRF-1 ]--
A:srl1# info
    type ip-vrf
    description "IP-VRF-2 EVPN-MPLS uecmp"
    ip-load-balancing {
        resilient-hash-prefix 1.2.0.0/16 {
            hash-buckets-per-path 6
            max-paths 10
        }
    }
    interface ethernet-1/1.1 {
    }
    interface irb0.1 {
    }
    interface lo0.1 {
    }
    protocols {
        bgp-evpn {
            bgp-instance 1 {
                encapsulation-type mpls
                evi 1
                ecmp 64
                mpls {
                    next-hop-resolution {
                        allowed-tunnel-types [
                            ldp
                            sr-isis
                        ]
                    }
                }
                routes {
                    route-table {
                        ip-prefix {
                            evpn-link-bandwidth {
                                advertise {
                                    weight dynamic
                                }
                                weighted-ecmp {
                                    admin-state enable
                                    max-ecmp-hash-buckets-per-next-hop-group 64
                                }
                            }
                        }
                    }
                }
            }
        }
        bgp {
            admin-state enable
            autonomous-system 64500
            router-id 1.1.1.1
            ebgp-default-policy {
                import-reject-all false
                export-reject-all false
            }
            afi-safi ipv4-unicast {
                admin-state enable
                multipath {
                    maximum-paths 64
                }
            }
            trace-options {
                flag packets {
                    modifier detail
                }
                flag update {
                    modifier detail
                }
            }
            group pe-ce {
                multihop {
                    admin-state enable
                    maximum-hops 10
                }
                afi-safi ipv4-unicast {
                    ipv4-unicast {
                        link-bandwidth {
                            add-next-hop-count-to-received-bgp-routes 1
                        }
                    }
                }
                timers {
                    connect-retry 1
                    minimum-advertisement-interval 1
                }
                trace-options {
                    flag update {
                        modifier detail
                    }
                }
                transport {
                    local-address 1.1.1.1
                }
            }
            neighbor 11.11.11.12 {
                peer-as 64512
                peer-group pe-ce
            }
            neighbor 11.11.11.13 {
                peer-as 64513
                peer-group pe-ce
            }
        }
        bgp-vpn {
            combined-ecmp {
            }
            bgp-instance 1 {
            }
        }
    }
The route table for prefix 1.2.3.4/32 is displayed as follows:
--{ + candidate shared default }--[ network-instance IP-VRF-1 ]--
A:leaf1# show route-table ipv4-unicast prefix 1.2.3.4/32
---------------------------------------------------------------------------------------------------------
IPv4 unicast route table of network instance IP-VRF-1
---------------------------------------------------------------------------------------------------------
+------------+----+--------+----------+--------+----------+--------+------+-----------------+-----------+
| Prefix     | ID | Route  | Route    | Active | Origin   | Metric | Pref | Next-hop (Type) | Next-hop  |
|            |    | Type   | Owner    |        | Network  |        |      |                 | Interface |
|            |    |        |          |        | Instance |        |      |                 |           |
+============+====+========+==========+========+==========+========+======+=================+===========+
| 1.2.3.4/32 | 0  | bgp    | bgp_mgr  | True   | IP-VRF-1 | 0      | 170  | 11.11.11.0/24 ( | irb0.1    |
|            |    |        |          |        |          |        |      | indirect/local) | irb0.1    |
|            |    |        |          |        |          |        |      | 11.11.11.0/24 ( |           |
|            |    |        |          |        |          |        |      | indirect/local) |           |
|            |    |        |          |        |          |        |      | 100.0.0.2/32 (  |           |
|            |    |        |          |        |          |        |      | indirect/ldp)   |           |
|            |    |        |          |        |          |        |      | 100.0.0.3/32 (  |           |
|            |    |        |          |        |          |        |      | indirect/ldp)   |           |
|            |    |        |          |        |          |        |      | 100.0.0.4/32  ( |           |
|            |    |        |          |        |          |        |      | indirect/ldp)   |           |
+------------+----+--------+----------+--------+----------+--------+------+-----------------+-----------+
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
The following shows the route table state for the route:
--{ + candidate shared default }--[ network-instance IP-VRF-1 ]--
A:leaf1# info from state route-table ipv4-unicast route 1.2.3.4/32 id 0 route-type bgp route-owner bgp_mgr origin-network-instance IP-VRF-1
leakable false
    metric 0
    preference 170
    active true
    last-app-update "2024-07-02T09:06:02.838Z (an hour ago)"
    next-hop-group 347400906964
    next-hop-group-network-instance IP-VRF-1
    resilient-hash true
    fib-programming {
        suppressed false
        last-successful-operation-type modify
        last-successful-operation-timestamp "2024-07-02T09:06:02.839Z (an hour ago)"
        pending-operation-type none
        last-failed-operation-type none
    }
--{ + candidate shared default }--[ network-instance IP-VRF-1 ]--
A:leaf1# info from state route-table next-hop-group 347400906964
    backup-next-hop-group 0
    fib-programming {
        last-successful-operation-type modify
        last-successful-operation-timestamp "2024-07-02T09:06:02.839Z (an hour ago)"
        pending-operation-type none
        last-failed-operation-type none
    }
    next-hop 0 {
        next-hop 347400907006
        resolved true
    }
    next-hop 1 {
        next-hop 347400907007
        resolved true
    }
    next-hop 2 {
        next-hop 347400906982
        resolved true
    }
    next-hop 3 {
        next-hop 347400906999
        resolved true
    }
    next-hop 4 {
        next-hop 347400906996
    resolved true
    }
--{ + candidate shared default }--[ network-instance IP-VRF-1 ]--
A:leaf1# info from state route-table next-hop {347400907006,347400907007,347400906982,347400906999,347400906996}
    next-hop 347400907006 {
        type indirect
        ip-address 11.11.11.12
            resolving-route {
            ip-prefix 11.11.11.0/24
            route-type local
            route-owner net_inst_mgr
            }
        }
    next-hop 347400907007 {
        type indirect
        ip-address 11.11.11.13
            resolving-route {
            ip-prefix 11.11.11.0/24
            route-type local
            route-owner net_inst_mgr
            }
        }
    next-hop 347400906982 {
        type indirect
        ip-address 100.0.0.2
        resolving-tunnel {
            ip-prefix 100.0.0.2/32
            tunnel-type ldp
            tunnel-owner ldp_mgr
        }
    mpls {
        pushed-mpls-label-stack [
            1000
            ]
        }
    }
    next-hop 347400906999 {
        type indirect
        ip-address 100.0.0.3
        resolving-tunnel {
            ip-prefix 100.0.0.3/32
            tunnel-type ldp
            tunnel-owner ldp_mgr
        }
    mpls {
        pushed-mpls-label-stack [
            1002
            ]
        }
    }
    next-hop 347400906996 {
        type indirect
        ip-address 100.0.0.4
        resolving-tunnel {
            ip-prefix 100.0.0.4/32
            tunnel-type ldp
            tunnel-owner ldp_mgr
        }
    mpls {
        pushed-mpls-label-stack [
            1001
            ]
        }
    }