vlan (EVPN)

Specifies a VLAN, or adds or removes a range of VLANs, for an Ethernet Virtual Private Network (EVPN) instance.

Syntax

vlan VLAN-ID
no vlan VLAN-ID
vlan { add | remove } {VLAN-range }

Command Default

Disabled

Parameters

VLAN-ID
Specifies a VLAN.
add
Adds a range of VLANs to the default EVPN instance.
remove
Removes a range of VLANs from the default EVPN instance.
VLAN-range
Specifies a hyphen-delimited VLAN range.

Modes

EVPN configuration mode

Usage Guidelines

Each VLAN/BD added to an EVPN configuration is considered as an EVPN instance and is assigned a unique EVPN instance ID (EVI) internally. The EVI is calculated as shown in the following table.

Table 1. Calculating EVI values from VLAN/BD values
VLAN/BD EVI value
VLAN: 1–4096 VLAN ID
BD: 1–4096 BD ID + 4096
Important

Important

To interoperate with third-party vendors, the RTs across the interoperating devices must be the same. If third-party devices do not support automatic RT assigment, or the EVIs are not calculated as shown in the above table, the VLAN/BD instances must be configured manually to ensure that RTs across the devices are compatible.

Examples

The following example specifies a VLAN and enter VLAN configuration mode.

device# configure terminal
device(config)# evpn
device(config-evpn-default)# vlan 100
device(evpn-vlan-100)# 

The following example adds VLANs 100 through 200 to the default EVPN instance.

device# configure terminal
device(config)# evpn
device(config-evpn-default)# vlan add 100-200

The following example removes VLANs 150 through 180 from the default EVPN instance.

device# configure terminal
device(config)# evpn
device(config-evpn-default)# vlan remove 150-180