encapsulation

Use encapsulation to configure a frame match criterion for an Ethernet service instance.

Use undo encapsulation to remove a frame match criterion from an Ethernet service instance.

Syntax

encapsulation default

encapsulation { tagged | untagged }

encapsulation s-vid vlan-id [ only-tagged ]

encapsulation s-vid vlan-id-list

undo encapsulation

Default

An Ethernet service instance does not contain a frame match criterion.

Views

Ethernet service instance view

Predefined user roles

network-admin

Parameters

default: Matches all traffic that does not match any other Ethernet service instance on the interface. On an interface, you can configure this criterion only in one Ethernet service instance.

tagged: Matches all frames that have an 802.1Q VLAN tag.

untagged: Matches all frames that do not have an 802.1Q VLAN tag.

s-vid vlan-id: Matches frames that are tagged with the specified outer VLAN ID. The vlan-id argument specifies a VLAN ID in the range of 1 to 4094. If the outer VLAN is not the PVID, the matching result does not differ, whether or not you specify the only-tagged keyword. If the outer VLAN is the PVID, the matching result depends on whether or not the only-tagged keyword is specified.

only-tagged: Matches only PVID-tagged frames. To match both untagged frames and PVID-tagged frames, do not specify this keyword.

s-vid vlan-id-list: Specifies a space-separated list of up to eight outer VLAN items. Each item specifies an outer VLAN ID or a range of outer VLAN IDs in the format of vlan-id1 to vlan-id2. The value range for VLAN IDs is 1 to 4094.


[NOTE: ]

NOTE:

The outer VLAN refers to the C-VLAN for a single-tagged frame and the S-VLAN for a double-tagged frame.


Usage guidelines

The match criterion in each Ethernet service instance on an interface must be unique.

An Ethernet service instance can contain only one match criterion. To change the match criterion, you must remove the original criterion first. When you remove the match criterion in an Ethernet service instance, the association between the service instance and the VSI is removed automatically.

VLAN access mode is not supported by an Ethernet service instance if the Ethernet service instance uses any of the following match criteria:

An SDN transport network uses a controller to deploy and manage SPBM networks. If you change the matching outer VLAN ID on a BEB, you must also modify the VLAN ID set by the Set-Field action on the controller.

Examples

# Configure service instance 1 on FortyGigE 1/0/1 to match frames that have an outer VLAN ID of 111.

<Sysname> system-view
[Sysname] interface fortygige 1/0/1
[Sysname-FortyGigE1/0/1] service-instance 1
[Sysname-FortyGigE1/0/1-srv1] encapsulation s-vid 111