The peer advertise encap-type command configures the encapsulation attribute carried by EVPN routes.
The undo peer advertise encap-type command restores the default configuration.
By default, a device advertises EVPN routes that carry the MPLS encapsulation attribute to its peers.
peer ipv4-address advertise encap-type vxlan
peer ipv6-address advertise encap-type srv6 [ advertise-srv6-locator ]
peer ipv6-address advertise encap-type vxlan
undo peer ipv4-address advertise encap-type vxlan
undo peer ipv6-address advertise encap-type srv6 [ advertise-srv6-locator ]
undo peer ipv6-address advertise encap-type vxlan
Parameter | Description | Value |
---|---|---|
ipv4-address |
Specifies the IPv4 address of a peer. |
The value is in dotted decimal notation. |
vxlan |
Specifies EVPN routes carrying the VXLAN encapsulation attribute. |
- |
ipv6-address |
Specifies the IPv6 address of a peer. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
srv6 |
Specifies EVPN routes carrying the SRv6 encapsulation attribute. |
- |
advertise-srv6-locator |
Enables EVPN routes to use the SRv6 SID Structure Sub-Sub-TLV to carry locator length information. |
- |
Usage Scenario
By default, BGP EVPN peers advertise only MPLS-encapsulated EVPN routes to each other. In an EVPN VPWS over SRv6 scenario, to enable BGP EVPN peers to advertise SRv6-encapsulated EVPN routes to each other, run the peer advertise encap-type srv6 command.
In a scenario where an EVPN over VXLAN tunnel is deployed, if you want the next hops of EVPN routes advertised between BGP EVPN peers to be iterated to a VXLAN tunnel, run the peer advertise encap-type vxlan command to enable the advertised EVPN routes to carry the VXLAN attribute. After receiving the route, the remote device iterates the route to the VXLAN tunnel for traffic forwarding. In an EVPN over SRv6 BE scenario, BFD is used to detect locator reachability. If the primary path fails, BFD detects the Down event and triggers auto FRR (VPN FRR) to switch traffic to another path. After locator routes are aggregated by the P device between PEs, the remote PE can learn only the locator routes aggregated by the local PE. However, BFD detection depends on the peer IPv6 address (local locator address) bound to the BFD session. As a result, BFD fails and auto FRR (VPN FRR) switching cannot be triggered. To resolve this problem, run the advertise-srv6-locator command on the local PE to configure the local PE to carry locator length information when advertising BGP routes to the remote PE. The remote PE then calculates the local locator based on the SRv6 SID and locator length information carried in the BGP routes, if the peer IPv6 address bound to a BFD session matches the IPv6 address of the local locator, BFD takes effect. When the primary path fails, auto FRR (VPN FRR) is triggered for path switching.Precautions
When a BGP EVPN peer is in a peer group, the undo peer advertise encap-type command is run to inherit the encapsulation attribute of the peer group, and this command is run again to restore the default encapsulation attribute.
<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] peer 2001:db8:1::1 as-number 100 [*HUAWEI-bgp] l2vpn-family evpn [*HUAWEI-bgp-af-evpn] peer 2001:db8:1::1 enable [*HUAWEI-bgp-af-evpn] peer 2001:db8:1::1 advertise encap-type srv6
<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] peer 1.1.1.1 as-number 100 [*HUAWEI-bgp] l2vpn-family evpn [*HUAWEI-bgp-af-evpn] peer 1.1.1.1 enable [*HUAWEI-bgp-af-evpn] peer 1.1.1.1 advertise encap-type vxlan