- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-EVPN commands | 109.74 KB |
EVPN commands
address-family evpn
Use address-family evpn to enter EVPN view.
Use undo address-family evpn to delete all configuration in EVPN view.
Syntax
address-family evpn
undo address-family evpn
Views
VPN instance view
Predefined user roles
network-admin
Examples
# Enter EVPN view.
<Sysname> system-view
[Sysname] ip vpn-instance tenant
[Sysname-vpn-instance-tenant] address-family evpn
[Sysname-vpn-evpn-tenant]
address-family l2vpn evpn
Use address-family l2vpn evpn to create the BGP EVPN address family and enter its view, or enter the view of the existing BGP EVPN address family view.
Use undo address-family l2vpn evpn to delete the BGP EVPN address family and all configuration in BGP EVPN address family view.
Syntax
address-family l2vpn evpn
undo address-family l2vpn evpn
Default
The BGP EVPN address family does not exist.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
Configuration made in BGP EVPN family address view takes effect only on routes and peers of the BGP EVPN address family that are on the public network.
Examples
# Create the BGP EVPN address family and enter its view.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family l2vpn evpn
[Sysname-bgp-default-evpn]
advertise l2vpn evpn
Use advertise l2vpn evpn to enable BGP EVPN route advertisement to the local site.
Use undo advertise l2vpn evpn to disable BGP EVPN route advertisement to the local site.
Syntax
advertise l2vpn evpn
undo advertise l2vpn evpn
Default
BGP EVPN route advertisement to the local site is enabled.
Views
BGP-VPN IPv4 address family view
Predefined user roles
network-admin
Usage guidelines
This command enables the device to advertise private BGP EVPN routes to the local site after the device adds the routes to the routing table of a VPN instance.
Examples
# Enable BGP EVPN route advertisement to the local site for VPN instance vpn1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] ip vpn-instance vpn1
[Sysname-bgp-default-vpn1] address-family ipv4
[Sysname-bgp-default-ipv4-vpn1] advertise l2vpn evpn
arp mac-learning disable
Use arp mac-learning disable to disable an EVPN instance from learning MAC addresses from ARP information.
Use undo arp mac-learning disable to restore the default.
Syntax
arp mac-learning disable
undo arp mac-learning disable
Default
An EVPN instance learns MAC addresses from ARP information.
Views
EVPN instance view
Predefined user roles
network-admin
Usage guidelines
The MAC information and ARP information advertised by a remote VTEP overlap. To avoid duplication, use this command to disable the learning of MAC addresses from ARP information. EVPN will learn remote MAC addresses only from the MAC information advertised from remote sites.
Examples
# Disable an EVPN instance from learning MAC addresses from ARP information.
<Sysname> system-view
[Sysname] vsi aaa
[Sysname-vsi-aaa] evpn encapsulation vxlan
[Sysname-vsi-aaa-evpn-vxlan] arp mac-learning disable
display bgp l2vpn evpn
Use display bgp l2vpn evpn to display BGP EVPN routes.
Syntax
display bgp [ instance instance-name ] l2vpn evpn [ peer ipv4-address { advertised-routes | received-routes } [ statistics ] | route-distinguisher route-distinguisher [ route-type { auto-discovery | es | imet | ip-prefix | mac-ip } ] [ evpn-route route-length [ advertise-info ] ] | route-type { auto-discovery | es | imet | ip-prefix | mac-ip } | statistics ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP EVPN routes for the default BGP instance.
peer ipv4-address: Specifies a peer by its IPv4 address.
advertised-routes: Specifies the routes advertised to the specified peer.
received-routes: Specifies the routes received from the specified peer.
statistics: Displays BGP EVPN route statistics.
route-distinguisher route-distinguisher: Specifies a route distinguisher (RD), a string of 3 to 21 characters. The RD can use one of the following formats:
· 16-bit AS number:32-bit user-defined number. For example, 101:3.
· 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number. For example, 65536:1. The AS number must be equal to or greater than 65536.
route-type: Specifies a route type.
auto-discovery: Specifies Ethernet auto-discovery routes.
es: Specifies Ethernet segment (ES) routes.
imet: Specifies inclusive multicast Ethernet tag (IMET) routes.
ip-prefix: Specifies IP prefix advertisement routes.
mac-ip: Specifies MAC/IP advertisement routes.
evpn-route: Specifies a BGP EVPN route, a case-insensitive string of 1 to 512 characters.
route-length: Specifies the route length in bits, in the range of 0 to 65535.
advertise-info: Displays advertisement information for BGP EVPN routes.
Usage guidelines
If you do not specify any parameter, this command displays brief information about all BGP EVPN routes.
Examples
# Display brief information about all BGP EVPN routes.
<Sysname> display bgp l2vpn evpn
BGP local router ID is 1.1.1.9
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Total number of routes from all PEs: 2
Route distinguisher: 100:1
Total number of routes: 6
Network NextHop MED LocPrf PrefVal Path/Ogn
* > [2][0][48][00aa.00bb.00cc][4][0.0.0.0]/136
10.1.1.2 0 32768 ?
* e 10.1.1.1 0 0 65410?
* > [3][300][16][::ffff:1.1.1.1]/176
127.0.0.1 0 32768 ?
Route distinguisher: 200:1
Total number of routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn
* >i [2][0][48][00aa.00cc.00dd][4][1.1.1.1]/136
3.3.3.9 0 100 0 ?
* >i [3][300][16][::ffff:2.2.2.2]/176
3.3.3.9 0 100 0 65420?
Table 1 Command output
Field |
Description |
Status codes |
Route status codes: · * - valid—Valid route. · > - best—Optimal route. · d - dampened—Dampened route. · h - history—History route. · i - internal—Internal route. · e - external—External route. · s - suppressed—Suppressed route. · S - Stale—Stale route. |
Origin |
Origin of the route: · i – IGP—Originated in the AS. The origin of routes advertised by using the network command is IGP. · e – EGP—Learned through EGP. · ? – incomplete—Unknown origin. The origin of routes redistributed from IGP protocols is incomplete. |
Network |
BGP EVPN route/route length. BGP EVPN routes are as follows: · [1][ESI][EthernetTagID] ? 1—Ethernet auto-discovery route. ? ESI—Ethernet segment identifier (ESI). ? EthernetTagID—Ethernet tag ID. · [2][EthernetTagID][MACLength][MAC][IPAddressLength][IPAddress] ? 2—MAC/IP advertisement route. ? EthernetTagID—Ethernet tag ID. ? MACLength—MAC address length. ? MAC—MAC address. ? IPAddressLength—IP address length. ? IPAddress—IP address. · [3][EthernetTagID][IPAddressLength][IPAddress] ? 3—IMET route. ? IPAddressLength—IP address length. ? IPAddress—IP address of the originating router. · [4][ESI][IPAddressLength][IPAddress] ? 4—ES route. ? ESI—ESI. ? IPAddressLength—IP address length. ? IPAddress—IP address of the originating router. · [5][EthernetTagID][IPAddressLength][IPAddress] ? 5—IP prefix advertisement route. ? EthernetTagID—Ethernet tag ID. ? IPAddressLength—IP address length. ? IPAddress—IP address of the originating router. |
NextHop |
Next hop IP address. |
MED |
Multi-Exit Discriminator (MED) attribute. |
LocPrf |
Local precedence. |
PrefVal |
Preferred value. |
Path/Ogn |
AS_PATH and ORIGIN attributes of the route. |
# Display detailed information about BGP EVPN route [1][00:01:02:03:04:05:06:07:08:09][5]/120 with RD 1.1.1.1:100.
<Sysname> display bgp l2vpn evpn route-distinguisher 1.1.1.1:100 [1][00:01:02:03:04:05:06:07:08:09][5] 120
BGP local router ID: 172.16.250.133
Local AS number: 100
Route distinguisher: 1.1.1.1:100
Total number of routes: 1
Paths: 1 available, 1 best
BGP routing table information of [1][00:01:02:03:04:05:06:07:08:09][5]/120:
From : 10.1.1.2 (192.168.56.17)
Rely nexthop : 10.1.1.2
Original nexthop: 10.1.1.2
OutLabel : 0
Ext-Community : <RT: 1:2>, <Encapsulation Type: VXLAN >, <ESI Label: Flag 0,
Label 1>
AS-path : 200
Origin : igp
Attribute value : MED 0, pref-val 0
State : valid, external, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
EVPN route type : Ethernet auto-discovery route
ESI : 00:01:02:03:04:05:06:07:08:09
Ethernet tag ID : 5
MPLS label : 10
Table 2 Command output
Field |
Description |
Paths |
Number of routes: · available—Number of valid routes. · best—Number of optimal routes. |
From |
IP address of the BGP peer that advertised the route. |
Rely Nexthop |
Next hop after route recursion. If no next hop is found, this field displays not resolved. |
Original nexthop |
Original next hop of the route. If the route was obtained from a BGP update message, the original next hop is the next hop IP address in the message. |
OutLabel |
Outgoing label of the route. |
Ext-Community |
Extended community attributes: · RT. · Encapsulation Type. · ESI Label. |
AS-path |
AS_PATH attribute of the route. This attribute records the ASs the route has passed and avoids routing loops. |
Origin |
Origin of the route: · igp—Originated in the AS. The origin of routes advertised by using the network command is IGP. · egp—Learned through EGP. · incomplete—Unknown origin. The origin of routes redistributed from IGP protocols is incomplete. |
Attribute value |
Attributes of the route: · MED—MED value for the destination network. · localpref—Local preference value. · pref-val—Preferred value. · pre—Route preference value. |
State |
Current state of the route: · valid. · internal. · external. · local. · synchronize. · best. |
IP precedence |
IP precedence in the range of 0 to 7. N/A indicates that the IP precedence is invalid. |
QoS local ID |
QoS local ID in the range of 1 to 4095. N/A indicates that the QoS local ID is invalid. |
Traffic index |
Traffic index in the range of 1 to 64. N/A indicates that the traffic index is invalid. |
MPLS label |
MPLS label. The current software version does not support this field. |
# Display detailed information about BGP EVPN route [2][5][48][0001-0203-0405][32][4.5.5.5]/136 with RD 1.1.1.1:100.
<Sysname> display bgp l2vpn evpn route-distinguisher 1.1.1.1:100 [2][5][48][0001-0203-0405][32][5.5.5.5] 136
BGP local router ID: 172.16.250.133
Local AS number: 100
Route distinguisher: 1.1.1.1:100
Total number of routes: 1
Paths: 1 available, 1 best
BGP routing table information of [2][5][48][0001-0203-0405][32][5.5.5.5]/136:
From : 10.1.1.2 (192.168.56.17)
Rely nexthop : 10.1.1.2
Original nexthop: 10.1.1.2
OutLabel : 0
Ext-Community : <RT: 1:2>, <RT: 1:3>, <RT: 1:4>, <RT: 1:5>, <RT: 1:6>, <RT: 1:7
>, <Encapsulation Type: VXLAN>, <Router's Mac: 0006-0708-0910
>, <MAC Mobility: Flag 0, SeqNum 2>, <Default GateWay>
AS-path : 200
Origin : igp
Attribute value : MED 0, pref-val 0
State : valid, external, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
EVPN route type : MAC/IP advertisement route
ESI : 00:01:02:03:04:05:06:07:08:09
Ethernet tag ID : 5
MAC address : 0001-0203-0405
IP address : 5.5.5.5/32
MPLS label1 : 10
MPLS label2 : 0
Table 3 Command output
Field |
Description |
Ext-Community |
Extended community attributes: · RT. · Encapsulation Type. · Router's Mac. · MAC Mobility—MAC mobility. ? Flag—Indicates whether the MAC address can move. A value of 1 indicates that the MAC address cannot move, and a value of 0 indicates that the MAC address can move. ? SeqNum—Identifies the most recent move of the MAC address. · Default GateWay—Route for the default gateway. |
MPLS label1 |
VXLAN ID used for Layer 2 forwarding. |
MPLS label2 |
L3 VXLAN ID used for Layer 3 forwarding. |
# Display detailed information about BGP EVPN route [3][0][32][5.5.5.5]/80 with RD 1.1.1.1:100.
<Sysname> display bgp l2vpn evpn route-distinguisher 1.1.1.1:100 [3][0][32][4.5.5.5] 80
BGP local router ID: 172.16.250.133
Local AS number: 100
Route distinguisher: 1.1.1.1:100
Total number of routes: 1
Paths: 1 available, 1 best
BGP routing table information of [3][0][32][4.5.5.5]/80:
From : 10.1.1.2 (192.168.56.17)
Rely nexthop : 10.1.1.2
Original nexthop: 10.1.1.2
OutLabel : 0
Ext-Community : <RT: 1:2>, <Encapsulation Type: VXLAN>
AS-path : 200
Origin : igp
Attribute value : MED 0,pref-val 0
State : valid, external, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
EVPN route type : Inclusive multicast Ethernet tag route
Ethernet tag ID : 0
Origin address : 5.5.5.5/32
Table 4 Command output
Field |
Description |
Ext-Community |
Extended community attributes: · RT. · Encapsulation Type. |
Origin address |
IP address of the originating router. |
# Display detailed information about BGP EVPN route [4][00:00:00:00:00:00:00:00:00:0a][32][4.5.5.5]/128 with RD 1.1.1.1:100.
<Sysname> display bgp l2vpn evpn route-distinguisher 1.1.1.1:100 [4][00:00:00:00:00:00:00:00:00:0a][32][4.5.5.5] 128
BGP local router ID: 172.16.250.133
Local AS number: 100
Route distinguisher: 1.1.1.1:100
Total number of routes: 1
Paths: 1 available, 1 best
BGP routing table information of [4][00:00:00:00:00:00:00:00:00:0a][32] [4.5.5
.5]/128:
From : 10.1.1.2 (192.168.56.17)
Rely nexthop : 10.1.1.2
Original nexthop: 10.1.1.2
OutLabel : 0
Ext-Community : <RT: 1:2>, <Encapsulation Type: VXLAN>, <ES-Import RT: 1:1>
AS-path : 200
Origin : igp
Attribute value : MED 0,pref-val 0
State : valid, external, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
EVPN route type : Ethernet segment route
ESI : 00:00:00:00:00:00:00:00:00:0a
Origin address : 4.5.5.5/32
Table 5 Command output
Field |
Description |
Ext-Community |
Extended community attributes: · RT. · Encapsulation Type. · ES-Import RT. |
Origin address |
IP address of the originating router. |
# Display detailed information about BGP EVPN route [5][10][32][4.5.5.5]/80 with RD 1.1.1.1:100.
<Sysname> display bgp l2vpn evpn route-distinguisher 1.1.1.1:100 [5][10][32][4.5.5.5] 80
BGP local router ID: 172.16.250.133
Local AS number: 100
Route distinguisher: 1.1.1.1:100
Total number of routes: 1
Paths: 1 available, 1 best
BGP routing table information of [5][10][32][4.5.5.5]/80:
From : 10.1.1.2 (192.168.56.17)
Rely nexthop : 10.1.1.2
Original nexthop: 10.1.1.2
OutLabel : 0
Ext-Community : <RT: 1:2>, <Encapsulation Type: VXLAN>, <Router's Mac:
0006-0708-0910>
AS-path : 200
Origin : igp
Attribute value : MED 0,pref-val 0
State : valid, external, best
IP precedence : N/A
QoS local ID : N/A
Traffic index : N/A
EVPN route type : IP prefix advertisement route
ESI : 00:00:00:00:00:00:00:00:00:0a
Ethernet tag ID : 10
IP address : 4.5.5.5/32
Gateway address : 0.0.0.0
MPLS Label : 1
Table 6 Command output
Field |
Description |
Ext-Community |
Extended community attributes: · RT. · Encapsulation Type. · Router's Mac. |
IP address |
IP address and prefix length. |
MPLS Label |
L3 VXLAN ID used for Layer 3 forwarding. |
# Display detailed information about BGP EVPN route [4][00:00:00:00:00:00:00:00:00:0a][32][4.5.5.5]/128 with RD 1.1.1.1:100.
<Sysname> display bgp l2vpn evpn route-distinguisher 1.1.1.1:100 [4][00:00:00:00:00:00:00:00:00:0a] [32][4.5.5.5] 128 advertise-info
BGP local router ID: 172.16.250.133
Local AS number: 100
Route distinguisher: 1.1.1.1:100
Total number of routes: 1
Paths: 1 best
BGP routing table information of [4][00:00:00:00:00:00:00:00:00:0a][32][4.5.5.5]/128:
Advertised to peers (1 in total):
10.2.1.2
Table 7 Command output
Field |
Description |
Paths |
Number of optimal routes. |
Advertised to peers (1 in total) |
Peers to whom the route has been advertised and the number of the peers. |
display evpn auto-discovery
Use display evpn auto-discovery to display information about peers that are automatically discovered through BGP.
Syntax
display evpn auto-discovery { imet [ peer ip-address] [ vsi vsi-name ] | macip-prefix [ nexthop next-hop ] [ count ] }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
imet: Specifies peers discovered through IMET routes.
peer ip-address: Specifies a peer by its IP address. If you do not specify this option, the command displays information about all automatically discovered peers.
vsi vsi-name: Specifies a VSI by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays peer information for all VSIs.
macip-prefix: Specifies peers discovered through MAC/IP advertisement routes and IP prefix advertisement routes.
nexthop next-hop: Specifies a next hop. If you do not specify this option, the command displays peer information for all next hops.
count: Displays the number of peers. If you do not specify this keyword, the command displays detailed peer information.
Examples
# Display information about peers discovered through IMET routes.
<Sysname> display evpn auto-discovery imet
Total number of automatically discovered peers: 2
VSI name: bbb
RD PE_address Nexthop Tunnel_address VXLAN ID
2:2 1.1.1.9 1.1.1.9 2.2.2.3 1001
2:2 3.3.3.9 3.3.3.9 2.2.2.4 1009
Table 8 Command output
Field |
Description |
PE_address |
Identifier of the remote VTEP on the VSI. |
Nexthop |
IP address of the remote VTEP. |
Tunnel_address |
VXLAN tunnel destination IP address. |
# Display information about peers discovered through MAC/IP advertisement routes and IP prefix advertisement routes.
<Sysname> display evpn auto-discovery macip-prefix
Destination IP Source IP L3VNI Outgoing interface
1.1.1.1 3.3.3.3 200 Vsi-interface3
2.2.2.2 3.3.3.3 200 Vsi-interface3
# Display the total number of peers discovered through MAC/IP advertisement routes and IP prefix advertisement routes.
<Sysname> display evpn auto-discovery macip-prefix count
Total number of entries: 2
Table 9 Command output
Field |
Description |
Destination IP |
VXLAN tunnel destination IP address. |
Source IP |
VXLAN tunnel source IP address. |
L3VNI |
L3 VXLAN ID used for Layer 3 forwarding. |
Outgoing interface |
VSI interface associated with the L3 VXLAN ID. |
display evpn route arp
Use display evpn route arp to display EVPN ARP entries.
Syntax
display evpn route arp [ local | remote ] [ vpn-instance vpn-instance-name ] [ count ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
local: Specifies local ARP entries.
remote: Specifies remote ARP entries.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays ARP entries for all VPN instances.
count: Displays the number of ARP entries. If you do not specify this keyword, the command displays detailed information about ARP entries.
Usage guidelines
If you do not specify the local or remote keyword, this command displays both local and remote EVPN ARP entries.
Examples
# Display all EVPN ARP entries.
<Sysname> display evpn route arp
Flags: D - Dynamic B - BGP G - Gateway L - Local Active
Interface: Vsi-interface1 VPN instance name: vpna
IP address MAC address Router MAC VSI Index Flags
10.1.1.1 0003-0003-0003 a0ce-7e40-0400 0 GL
10.1.1.11 0001-0001-0001 a0ce-7e40-0400 0 DL
# Display the total number of EVPN ARP entries.
<Sysname> display evpn route arp count
Total number of entries: 2
Table 10 Command output
Field |
Description |
Interface |
VSI interface. |
Flags |
ARP entry type: · D—Dynamically learned entry. · B—Entry learned from BGP EVPN routes. · G—Entry for the gateway. · L—Local entry. |
display evpn route arp suppression
Use display evpn route arp suppression to display EVPN ARP flood suppression entries.
Syntax
display evpn route arp suppression [ local | remote ] [ vsi vsi-name ] [ count ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
local: Specifies local ARP flood suppression entries.
remote: Specifies remote ARP flood suppression entries.
vsi vsi-name: Specifies a VSI by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays ARP flood suppression entries for all VSIs.
count: Displays the number of ARP flood suppression entries. If you do not specify this keyword, the command displays detailed information about ARP flood suppression entries.
Usage guidelines
If you do not specify the local or remote keyword, this command displays both local and remote EVPN ARP flood suppression entries.
Examples
# Display all EVPN ARP flood suppression entries.
<Sysname> display evpn route arp suppression
Flags: D - Dynamic B - BGP G - Gateway L - Local Active
VSI name: vpna
IP address MAC address Flags
10.1.1.12 0002-0002-0002 B
# Display the total number of ARP flood suppression entries.
<Sysname> display evpn route arp suppression count
Total number of entries: 1
Table 11 Command output
Field |
Description |
Flags |
ARP flood suppression entry type: · D—Dynamically learned entry. · B—Entry learned from BGP EVPN routes. · G—Entry for the gateway. · L—Local entry. |
display evpn route mac
Use display evpn route mac to display EVPN MAC address entries.
Syntax
display evpn route mac [ local | remote ] [ vsi vsi-name ] [ count ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
local: Specifies local MAC address entries.
remote: Specifies remote MAC address entries.
vsi vsi-name: Specifies a VSI by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays MAC address entries for all VSIs.
count: Displays the number of MAC address entries. If you do not specify this keyword, the command displays detailed information about MAC address entries.
Usage guidelines
If you do not specify the local or remote keyword, this command displays both local and remote EVPN MAC address entries.
Examples
# Display all EVPN MAC address entries.
<Sysname> display evpn route mac
Flags: D - Dynamic B - BGP L - Local active
VSI name: bbb
MAC address Link ID/Name Flags Next hop
0000-0000-000a 1 DB -
0000-0000-0009 Tunnel1 B 2.2.2.2
# Display the total number of EVPN MAC address entries.
<Sysname> display evpn route mac count
Total number of entries: 2
Table 12 Command output
Field |
Description |
Link ID/Name |
For a local MAC address, this field displays the AC's link ID on the VSI. For a remote MAC address, this field displays the tunnel interface name. |
Flags |
MAC address entry type: · D—Dynamically learned entry. · B—Entry learned from BGP EVPN routes. · L—Local entry. |
Next hop |
IP address of the remote VTEP. If the MAC address entry is a local entry, a hyphen (-) is displayed. |
display evpn routing-table
Use display evpn routing-table to display the EVPN routing table for a VPN instance.
Syntax
display evpn routing-table vpn-instance vpn-instance-name [ count ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters.
count: Displays the number of entries in the routing table. If you do not specify this keyword, the command displays detailed information about the routing table.
Examples
# Display the EVPN routing table for VPN instance vpn1.
<Sysname> display evpn routing-table vpn-instance vpn1
VPN instance name: vpn1 Local L3vni: 7
IP address Nexthop Outgoing interface NibID
10.1.1.11 1.1.1.1 Vsi-interface3 0x18000000
10.1.1.12 2.2.2.2 Vsi-interface3 0x18000001
# Display the number of EVPN route entries in the routing table for VPN instance vpn1.
<Sysname> display evpn routing-table vpn-instance vpn1 count
Total number of entries: 2
Table 13 Command output
Field |
Description |
Local L3vni |
L3 VXLAN ID associated with the VPN instance. |
NibID |
Next hop ID. |
evpn encapsulation
Use evpn encapsulation to create an EVPN instance and enter its view, or enter the view of an existing EVPN instance.
Use undo evpn encapsulation to restore the default.
Syntax
evpn encapsulation vxlan
undo evpn encapsulation
Default
No EVPN instance exists.
Views
VSI view
Predefined user roles
network-admin
Parameters
vxlan: Specifies VXLAN encapsulation.
Usage guidelines
Before you can configure EVPN settings, you must create an EVPN instance.
Examples
# Create an EVPN instance and enter its view.
<Sysname> system-view
[Sysname] vsi aaa
[Sysname-vsi-aaa] evpn encapsulation vxlan
[Sysname-vsi-aaa-evpn-vxlan]
export route-policy
Use export route-policy to apply an export routing policy to EVPN on a VPN instance.
Use undo export route-policy to restore the default.
Syntax
export route-policy route-policy
undo export route-policy
Default
No export routing policy is applied to EVPN on a VPN instance.
Views
EVPN view
Predefined user roles
network-admin
Parameters
route-policy: Specifies a routing policy by its name, a case-sensitive string of 1 to 63 characters.
Usage guidelines
You can specify an export routing policy to filter advertised routes or modify their route attributes for EVPN.
If you execute this command multiple times, the most recent configuration takes effect.
An export routing policy specified in VPN instance view applies to IPv4 VPN, IPv6 VPN, and EVPN. An export routing policy specified in EVPN view applies only to EVPN. Export routing policy configuration in EVPN view takes precedence over that in VPN instance view.
Examples
# Apply export routing policy poly-1 to EVPN on VPN instance vpn1.
<Sysname> system-view
[Sysname] ip vpn-instance vpn1
[Sysname-vpn-instance-vpn1] address-family evpn
[Sysname-vpn-evpn-vpn1] export route-policy poly-1
Related commands
route-policy (Layer 3—IP Routing Command Reference)
l3-vni
Use l3-vni to configure an L3 VXLAN ID for a VSI interface.
Use undo l3-vni to remove the L3 VXLAN ID for a VSI interface.
Syntax
l3-vni vxlan-id
undo l3-vni
Default
No L3 VXLAN ID is configured for a VSI interface.
Views
VSI interface view
Predefined user roles
network-admin
Parameters
vxlan-id: Specifies a VXLAN ID in the range of 0 to 16777215.
Usage guidelines
On distributed EVPN gateways, you must configure L3 VXLAN IDs for the gateways to differentiate traffic of different VPN instances.
Examples
# Configure the L3 VXLAN ID as 1000 for VSI-interface 100.
<Sysname> system-view
[Sysname] interface vsi-interface 100
[Sysname-Vsi-interface100] l3-vni 1000
mac-advertising disable
Use mac-advertising disable to disable MAC address advertisement and withdraw advertised MAC addresses.
Use undo mac-advertising disable to restore the default.
Syntax
mac-advertising disable
undo mac-advertising disable
Default
MAC address advertisement is enabled.
Views
EVPN instance view
Predefined user roles
network-admin
Usage guidelines
The MAC information and ARP information advertised by the VTEP overlap. To avoid duplication, use this command to disable MAC address advertisement and withdraw the MAC addresses advertised to remote VTEPs.
Examples
# Disable MAC address advertisement and withdraw advertised MAC addresses for an EVPN instance.
<Sysname> system-view
[Sysname] vsi aaa
[Sysname-vsi-aaa] evpn encapsulation vxlan
[Sysname-vsi-aaa-evpn-vxlan] mac-advertising disable
peer next-hop-invariable
Use peer next-hop-invariable to configure the device to not change the next hop of routes advertised to an EBGP peer or peer group.
Use undo peer next-hop-invariable to configure the device to use its address as the next hop of routes advertised to an EBGP peer or peer group.
Syntax
peer { group-name | ipv4-address [ mask-length ] } next-hop-invariable
undo peer { group-name | ipv4-address [ mask-length ] } next-hop-invariable
Default
The device uses its address as the next hop of routes advertised to EBGP peers or peer groups.
Views
BGP EVPN address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters.
ipv4-address: Specifies a peer by its IPv4 address.
mask-length: Specifies a mask length in the range of 0 to 32. To specify a subnet, you must specify both the ipv4-address and mask-length arguments.
Usage guidelines
This command is exclusive with the peer next-hop-local command.
The next hop in BGP EVPN routes is the IP address of the originating VTEP. By default, the device replaces the next hop of IBGP routes with its address when advertising the routes to an EBGP peer. If the device is a transport network device, it will modify the next hop of BGP EVPN routes. For VTEPs to learn one another's IP address, you must configure the device to not change the next hop of routes advertised to EBGP peers.
Examples
# Configure the device to not change the next hop of routes advertised to EBGP peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family l2vpn evpn
[Sysname-bgp-default-evpn] peer 1.1.1.1 next-hop-invariable
Related commands
peer next-hop-local (Layer 3—IP Routing Command Reference)
policy vpn-target
Use policy vpn-target to enable route target filtering for BGP EVPN routes.
Use undo policy vpn-target to disable route target filtering for BGP EVPN routes.
Syntax
policy vpn-target
undo policy vpn-target
Default
Route target filtering is enabled for BGP EVPN routes.
Views
BGP EVPN address family view
Predefined user roles
network-admin
Usage guidelines
When route target filtering is enabled for BGP EVPN routes, the EVPN routing table accepts only EVPN routes of which the export route target attribute matches the local import route target attribute. If the device must save all BGP EVPN routes, use the undo policy vpn-target command to disable route target filtering for BGP EVPN routes.
Examples
# Disable route target filtering for BGP EVPN routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family l2vpn evpn
[Sysname-bgp-default-evpn] undo policy vpn-target
route-distinguisher
Use route-distinguisher to configure an RD for an EVPN instance.
Use undo route-distinguisher to restore the default.
Syntax
route-distinguisher { route-distinguisher | auto }
undo route-distinguisher
Default
No RD is configured for an EVPN instance.
Views
EVPN instance view
Predefined user roles
network-admin
Parameters
route-distinguisher: Specifies an RD, a string of 3 to 21 characters. The RD cannot be all zeros and can use one of the following formats:
· 16-bit AS number:32-bit user-defined number. For example, 101:3.
· 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number. For example, 65536:1. The AS number must be equal to or greater than 65536.
auto: Automatically generates an RD in the N:VXLAN ID format. The initial value of N is 1. If N:VXLAN ID is already in use, the system increases the value of N by 1 until the RD is available.
Usage guidelines
EVPN uses MP-BGP to advertise EVPN routes for automatic VTEP discovery, MAC reachability information advertisement, and host route advertisement. MP-BGP uses the RD to differentiate EVPN routes of different EVPN instances.
Examples
# Configure 22:1 as the RD of an EVPN instance.
<Sysname> system-view
[Sysname] vsi aaa
[Sysname-vsi-aaa] evpn encapsulation vxlan
[Sysname-vsi-aaa-evpn-vxlan] route-distinguisher 22:1
rr-filter
Use rr-filter to create a route reflector (RR) reflection policy.
Use undo rr-filter to restore the default.
Syntax
rr-filter ext-comm-list-number
undo rr-filter
Default
An RR does not filter reflected EVPN routes.
Views
BGP EVPN address family view
Predefined user roles
network-admin
Parameters
ext-comm-list-number: Specifies an extended community attribute list by its number in the range of 1 to 199.
Usage guidelines
This command enables an RR to reflect only received EVPN routes that match the attributes in the specified extended community attribute list.
If a cluster contains multiple RRs, you can configure different reflection policies on the RRs for load sharing among the RRs.
For more information about the extended community attribute list, see Layer 3—IP Routing Configuration Guide.
Examples
# Configure a reflection policy for the device to reflect BGP EVPN routes that match extended community attribute list 10.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] address-family l2vpn evpn
[Sysname-bgp-default-evpn] rr-filter 10
Related commands
ip extcommunity-list (Layer 3—IP Routing Command Reference)
vpn-target (EVPN instance view)
Use vpn-target to configure route target attributes for an EVPN instance.
Use undo vpn-target to delete route target attributes for an EVPN instance.
Syntax
vpn-target { vpn-target&<1-8> | auto } [ both | export-extcommunity | import-extcommunity ]
undo vpn-target { vpn-target&<1-8> | auto | all } [ both | export-extcommunity | import-extcommunity ]
Default
An EVPN instance does not have route target attributes.
Views
EVPN instance view
Predefined user roles
network-admin
Parameters
vpn-target&<1-8>: Specifies a space-separated list of up to eight route targets. Each route target is a string of 3 to 21 characters in one of the following formats:
· 16-bit AS number:32-bit user-defined number. For example, 101:3.
· 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number. For example, 65536:1. The AS number must be equal to or greater than 65536.
auto: Automatically generates a route target in the format of BGP AS number:VXLAN ID.
both: Uses the specified route targets as both import and export targets. If you do not specify the both, export-extcommunity, or import-extcommunity keyword, the both keyword applies.
import-extcommunity: Uses the specified route targets as import targets.
export-extcommunity: Uses the specified route targets as export targets.
all: Specifies all route targets.
Usage guidelines
EVPN uses MP-BGP to advertise EVPN routes for automatic VTEP discovery, MAC reachability information advertisement, and host route advertisement. MP-BGP uses route target attributes to control the advertisement and acceptance of EVPN routes.
A VTEP sets the export target attribute for EVPN routes before advertising the routes to remote VTEPs. The VTEP checks the export target attribute of EVPN routes from remote VTEPs and imports only EVPN routes of which the export target attribute matches the local import target attribute.
Examples
# Configure import route targets 10:1, 100:1, and 1000:1 for an EVPN instance.
<Sysname> system-view
[Sysname] vsi aaa
[Sysname-vsi-aaa] evpn encapsulation vxlan
[Sysname-vsi-aaa-evpn-vxlan] vpn-target 10:1 100:1 1000:1 import-extcommunity
vpn-target (EVPN view)
Use vpn-target to configure route target attributes for EVPN on a VPN instance.
Use undo vpn-target to delete route target attributes for EVPN on a VPN instance.
Syntax
vpn-target vpn-target&<1-8> [ both | export-extcommunity | import-extcommunity ]
undo vpn-target { all | vpn-target&<1-8> [ both | export-extcommunity | import-extcommunity ] }
Default
On a VPN instance, EVPN does not have route target attributes.
Views
EVPN view
Predefined user roles
network-admin
Parameters
vpn-target&<1-8>: Specifies a space-separated list of up to eight route targets. Each route target is a string of 3 to 21 characters in one of the following formats:
· 16-bit AS number:32-bit user-defined number. For example, 101:3.
· 32-bit IP address:16-bit user-defined number. For example, 192.168.122.15:1.
· 32-bit AS number:16-bit user-defined number. For example, 65536:1. The AS number must be equal to or greater than 65536.
both: Uses the specified route targets as both import and export targets. If you do not specify the both, export-extcommunity, or import-extcommunity keyword, the both keyword applies.
import-extcommunity: Uses the specified route targets as import targets.
export-extcommunity: Uses the specified route targets as export targets.
all: Specifies all route targets.
Usage guidelines
A VTEP sets the export target attribute for EVPN routes before advertising the routes to remote VTEPs. The VTEP checks the export target attribute of EVPN routes from remote VTEPs and imports only EVPN routes of which the export target attribute matches the local import target attribute.
Route target attribute configuration made in VPN instance view applies to IPv4 VPN, IPv6 VPN, and EVPN. Route target attribute configuration made in EVPN view applies only to EVPN. Route target attribute configuration in EVPN view takes precedence over that in VPN instance view.
Examples
# Configure export target 3:3 and import target 4:4 for EVPN on VPN instance vpn1.
<Sysname> system-view
[Sysname] ip vpn-instance vpn1
[Sysname-vpn-instance-vpn1] address-family evpn
[Sysname-vpn-evpn-vpn1] vpn-target 3:3 export-extcommunity
[Sysname-vpn-evpn-vpn1] vpn-target 4:4 import-extcommunity