Packet encapsulation on ACs depends on the user access mode, which can be either VLAN or Ethernet. The default user access mode is VLAN.
Packet Encapsulation Type |
Description |
---|---|
VLAN |
The header of each Ethernet frame sent between CEs and PEs carries a VLAN tag, known as the provider-tag (P-Tag). This is a service delimiter identifying users on an ISP network. |
Ethernet |
Ethernet frame headers do not contain P-Tags. If the frame header contains a VLAN tag, it is an inner VLAN tag called the user-tag (U-Tag). A CE does not add the U-Tag to an Ethernet frame; instead, the tag is carried in a packet before the packet is sent to the CE. A U-Tag informs the CE to which VLAN the packet belongs, and is meaningless to PEs. |
The PW ID and PW encapsulation type together uniquely identify a PW. The PW IDs and PW encapsulation types configured on both end PEs of a PW must be the same. The packet encapsulation types on PWs can be raw or tagged. By default, packets are encapsulated in tagged mode.
Packet Encapsulation Type |
Description |
---|---|
Raw |
Packets transmitted over a PW cannot carry P-Tags. If a PE receives a packet with the P-Tag from a CE, the PE strips the P-Tag and adds double labels (outer tunnel label and inner VC label) to the packet before forwarding it. If a PE receives a packet with no P-Tag from a CE, the PE directly adds double labels (outer tunnel label and inner VC label) to the packet before forwarding it. The PE determines whether to add the P-Tag to a packet, depending on the configuration, before sending it to a CE. The PE is not allowed to rewrite or remove an existing U-Tag. |
Tagged |
Packets transmitted over a PW must carry P-Tags. If a PE receives a packet with the P-Tag from a CE, the PE directly adds double labels (outer tunnel label and inner VC label) to the packet before forwarding it. If a PE receives a packet with no P-Tag from a CE, the PE adds a null P-Tag and double labels (outer tunnel label and inner VC label) to the packet before forwarding it. The PE determines whether to rewrite, remove, or preserve the P-Tag of a packet, depending on the configuration, before forwarding it to a CE. |
Encapsulation modes of packets transmitted over ACs and PWs can be used together. The following uses Ethernet + raw encapsulation (without U-Tag) and VLAN + tagged encapsulation (with U-Tag) as examples to describe the packet exchange process.
Ethernet + raw encapsulation (without U-Tag)
In Figure 1, ACs use Ethernet encapsulation and PWs use raw encapsulation. Packets transmitted from CEs to PEs do not carry U-Tags.
The packet exchange process is as follows:
CE1 sends a Layer 2 packet without a U-Tag or P-Tag to PE1.
PE1 searches the corresponding VSI for a forwarding entry and selects a tunnel and a PW to forward the packet based on the found forwarding entry.
PE2 receives the packet from PE1 and decapsulates the packet by removing the Layer 2 encapsulation header added by PE1 and the inner VC label of the packet (the outer tunnel label has been popped out at the penultimate hop).
PE2 sends the original Layer 2 packet to CE2.
The process of sending a packet from CE2 to CE1 works similarly.
VLAN + tagged encapsulation (with U-Tag)
In Figure 2, ACs use VLAN encapsulation and PWs use tagged encapsulation. Packets transmitted from CEs to PEs carry U-Tags and P-Tags.
The packet exchange process is as follows:
CE1 sends a packet encapsulated at Layer 2 and carrying both a U-Tag and a P-Tag to PE1.
PE1 receives the packet but does not process either tag. PE1 retains the U-Tag because it treats the U-tag as service data.
PE2 receives the packet from PE1 and decapsulates the packet by removing the Layer 2 encapsulation header added by PE1 and the inner VC label of the packet (the outer tunnel label has been popped out at the penultimate hop).
PE2 forwards the original Layer 2 packet to CE2. The packet carries the U-Tag and P-Tag.
The process of sending a packet from CE2 to CE1 works similarly.
The system processes packets according to their AC interface and PW encapsulation types.
Two PW encapsulation modes can be used: Ethernet encapsulation (raw mode) and VLAN encapsulation (tagged mode).
PW Encapsulation Type |
Processing Logic |
---|---|
VLAN encapsulation |
Do not process the P-Tag carried in a packet. |
Ethernet encapsulation |
If a P-Tag is carried in a packet, delete the P-Tag from the packet. If no P-Tag is carried in a packet, do not process the packet. |
AC Interface Type |
Processing Logic |
---|---|
GE, XGE, 25GE, MultiGE, 40GE, 100GE, or Eth-Trunk interface |
Do not process the packet. |
VLANIF interfaces |
If a P-Tag is carried in a packet, rewrite the P-Tag. If no P-Tag is carried in a packet, add a P-Tag to the packet. |
VLAN stacking sub-interface |
If a P-Tag is carried in a packet, delete the P-Tag from the packet. If no P-Tag is carried in a packet, do not process the packet. |
VLAN mapping sub-interface |
If a P-Tag is carried in a packet, rewrite the P-Tag. If no P-Tag is carried in a packet, add a P-Tag to the packet. NOTE:
The added or replaced tag is the VLAN tag on the interface where VLAN mapping is not performed. |
Dot1q sub-interface |
Do not process the packet. |
QinQ sub-interface |
Do not process the packet. |