An EVC Layer 2 sub-interface is used as an EVC service access point, on which traffic encapsulation types and behaviors can be flexibly combined. A traffic encapsulation type and behavior are grouped into a traffic policy. Traffic policies help implement flexible Ethernet traffic access.
Context
For configuration notes about the traffic encapsulation types and behaviors, and their combinations, see EVC Service Bearing.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number.subnum mode l2
An EVC Layer 2 sub-interface is created, and its view is displayed.
- Perform one of the following steps to configure an encapsulation type:
- To configure default encapsulation, run the encapsulation default command.
- To configure dot1q encapsulation, run the encapsulation dot1q vid pevid1 [ to pevid2 ] 8021p { val8021p1 [ to val8021p2 ] } &<1-8> command.
- To configure QinQ encapsulation, run the encapsulation qinq vid pe-vid ce-vid { low-ce-vid [ to high-ce-vid ] | default } command.
- To configure untagged encapsulation, run the encapsulation untag command.
- Perform one of the following steps to configure a traffic behavior:
- To add a VLAN tag or an outer VLAN tag to each packet, run the rewrite push vid vid [ 8021p 8021p-value ] command.
- To add two VLAN tags to each packet, run the rewrite push vid vid [ 8021p 8021p-value ] ce-vid ce-vid [ ce-8021p ce-8021p-value ] command.
- To remove a VLAN tag or an outer VLAN tag from each packet, run the rewrite pop single command.
- To remove two VLAN tags from each packet, run the rewrite pop double command.
- To map a VLAN tag to another VLAN tag in each packet, run the rewrite map 1-to-1 vid pe-vid 8021p pe-8021p-value command.
- To map one VLAN tag to two VLAN tags, run the rewrite map 1-to-2 vid pe-vid [ 8021p pe–8021p-value ] ce-vid ce-vid ce–8021p ce–8021p-value command.
- To map the outer tag to a specified tag and leave the inner tag in each packet, run the rewrite map 2-to-1 vid pe-vid [ 8021p pe-8021p-value ] command.
- To map two VLAN tags to one VLAN tag in each packet, run the rewrite map 2-to-2 vid pe-vid [ 8021p pe–8021p-value ] ce-vid ce-vid [ ce–8021p ce–8021p-value ] command.
- To increase or reduce a tag value based on a specified offset in each packet, run the rewrite map offset { decrease | increase } offset-vid command.
- To swap the inner and outer VLAN tags carried in each packet, run the rewrite swap command.
- To replace the outer VLAN tag in an outgoing service packet on a PE with the VLAN tag of the corresponding Layer 2 sub-interface, run the rewrite map single outbound command.
- Run bridge-domain bd-id
The EVC Layer 2 sub-interface is added to a BD.
bd-id is the BD ID configured following the steps in Creating a Bridge Domain.
- Run commit
The configuration is committed.