Encapsulation defines the matching criteria that map a VLAN, a range of VLANs, class of service (CoS) bits, Ethertype, or
a combination of these to a service instance. VLAN tags and CoS can be a single value, a range, or a list. Ethertype can be
a single type or a list of types.
Different types of encapsulations are default, dot1ad, dot1q, priority-tagged, and untagged. On the Cisco ASR 1000 Series
Router, priority-tagged frames are always single-tagged. Valid Ethertypes (type) are ipv4, ipv6, pppoe-all, pppoe-discovery,
and pppoe-session.
Encapsulation classification options also include:
-
inner tag CoS
-
inner tag VLAN
-
outer tag CoS
-
outer tag VLAN
-
outer tag Ethertype (VLAN type)--VLAN type is always matched. If you do not specify an alternative, the default is 0x8100
for dot1q and 0x88a8 for dot1ad.
-
payload Ethertype--Any Ethertype tag after the VLAN tag
When you configure an encapsulation method, you enable flexible service mapping, which allows you to map an incoming packet
to an EFP based on the configured encapsulation.
The default behavior for flexible service mapping based on outer 802.1q and 802.1ad VLAN tag values is nonexact, meaning
that when the EFP encapsulation configuration does not explicitly specify an inner (second) VLAN tag matching criterion, the
software maps both single-tagged and double-tagged frames to the EFP as long as the frames fulfill the criteria of outer VLAN
tag values. The command-line interface (CLI) does allow you to specify exact mapping with the
exact keyword. If this keyword is specified, the EFP is designated as single-tagged-frame-only and double-tagged frames are not
classified to that EFP.
Using the CLI
encapsulation command in service-instance configuration mode, you can set encapsulation criteria. You must configure one encapsulation
command per EFP (service instance). After you have configured an encapsulation method, these commands are available in service
instance configuration mode:
The table below shows the supported encapsulation types.
Table 1. Supported Encapsulation Types
Command
|
Description
|
encapsulation
dot1q
vlan-id
[,
vlan-id [-
vlan-id ]]
|
Defines the matching criteria to be used to map 802.1q frames ingressing on an interface to the appropriate EFP. The options
are a single VLAN, a range of VLANs, or lists of VLANs or VLAN ranges. VLAN IDs are 1 to 4094.
|
encapsulation
dot1q
vlan-id
second-dot1q
vlan-id
[,
vlan-id [-
vlan-id ]]
|
Double-tagged 802.1q encapsulation. Matching criteria to be used to map QinQ frames ingressing on an interface to the appropriate
EFP. The outer tag is unique and the inner tag can be a single VLAN, a range of VLANs or lists of VLANs or VLAN ranges.
|
encapsulation
dot1q
{any |
vlan-id [,
vlan-id [-
vlan-id ]]}
etype
ethertype
|
Ethertype encapsulation is the payload encapsulation type after VLAN encapsulation.
Ethertype encapsulation matches any or an exact outermost VLAN or VLAN range and a payload ethertype.
Valid values for
ethertype are
ipv4 ,
ipv6 ,
pppoe-discovery ,
pppoe-session , or
pppoe-all .
|
encapsulation
dot1q
vlan-id
cos
cos-value
second-dot1q
vlan-id
cos
cos-value
|
CoS value encapsulation defines match criteria after including the CoS for the S-Tag and the C-Tag. The CoS value is a single
digit between 1 and 7 for S-Tag and C-Tag.
You cannot configure CoS encapsulation with the
encapsulation
untagged command, but you can configure it with the
encapsulation
priority-tagged command. The result is an exact outermost VLAN and CoS match and second tag. You can also use VLAN ranges.
|
encapsulation
dot1q
any
|
Matches any packet with one or more VLANs.
|
encapsulation
dot1q
vlan-type
|
Specifies the value of the VLAN protocol type, which is the tag protocol identifier (TPID) of an 802.1q VLAN tag. If there
is more than one tag, this command refers to the outermost tag. By default the TPID is assumed to be 0x8100. Use this command
to set the TPID to other supported alternatives: 0x88A8, 0x9100, 0x9200.
|
encapsulation
dot1ad
|
Defines the matching criteria to be used to map 802.1d frames ingressing on an interface to the appropriate EFP.
|
encapsulation
untagged
|
Matching criteria to be used to map native Ethernet frames (without a dot1q tag) entering an interface to the appropriate
EFP.
Only one EFP per port can have untagged encapsulation. However, a port that hosts EFP matching untagged traffic can also
host other EFPs that match tagged frames.
|
encapsulation
default
|
Configures the default EFP on an interface, acting as a catch-all encapsulation for all packets without a configured encapsulation.
All packets are seen as native. If you enter the
rewrite command with encapsulation default, the command is rejected.
Only one default EFP per interface can be configured. If you try to configure more than one default EFP, the command is rejected.
|
encapsulation
priority-tagged
|
Specifies priority-tagged frames. A priority-tagged packet has VLAN ID 0 and a CoS value of 0 to 7.
|
If a packet entering or leaving a port does not match any of the encapsulations on that port, the packet is dropped, resulting
in filtering on both ingress and egress. The encapsulation must match the packet on the wire to determine filtering criteria.
On the wire refers to packets ingressing the router before any rewrites and to packets egressing the router after all rewrites.