Configuring a Dot1q Termination Sub-interface
Context
When a VPN connects to an ISP network through a sub-interface, the sub-interface needs to remove VLAN tags of the packets that the VPN has sent to the ISP network. When each packet that CEs send to PEs carries one VLAN tag, the sub-interface terminates the single VLAN tag. This sub-interface is called Dot1q termination sub-interface.
Procedure
- Configure an IPv4 address for a sub-interface.
- On the PE device, run:
system-view
The system view is displayed.
- Run:
interface interface-type interface-number
The interface view is displayed.
- Run:
port link-type { hybrid | trunk }
The port link-type is set.
- Run:
quit
Return to the system view.
- Run:
interface interface-type interface-number.subinterface-number
The view of the sub-interface connecting the PE to the CE is displayed.
- Run:
ip address ip-address { mask | mask-length }
An IPV4 address is configured for the sub-interface.
- Run:
dot1q termination vid low-pe-vid [ to high-pe-vid ]
Dot1q termination is configured on the sub-interface.
After a VLANIF interface is configured, the corresponding VLAN cannot be configured as a VLAN for Dot1q termination sub-interfaces or an outer VLAN for QinQ termination sub-interfaces.
- Run:
arp broadcast enable
The sub-interface is enabled to forward ARP broadcast packets.
- On the PE device, run:
- Configure an IPv6 address for a sub-interface.
- On the PE device, run:
system-view
The system view is displayed.
- Run:
ipv6
IPv6 packet forwarding is enabled.
- Run:
interface interface-type interface-number
The interface view is displayed.
- Run:
port link-type { hybrid | trunk }
The port link-type is set.
- Run:
quit
Return to the system view.
- Run:
interface interface-type interface-number.subinterface-number
The view of the sub-interface connecting the PE to the CE is displayed.
- Run:
ipv6 enable
The IPv6 function is enabled on the interface.
- Run:
ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }
An IPV6 address is configured for the sub-interface.
- Run:
dot1q termination vid low-pe-vid [ to high-pe-vid ]
Dot1q termination is configured on the sub-interface.
After a VLANIF interface is configured, the corresponding VLAN cannot be configured as a VLAN for Dot1q termination sub-interfaces or an outer VLAN for QinQ termination sub-interfaces.
- Run:
ipv6 nd ns multicast-enable
The sub-interface is enabled to sending NS multicast packets.
- On the PE device, run: