Command Line Reference
Ethernet Switching
QinQ Configuration
7 min
qinq configuration show interface vlan stack \[command] show interface vlan stack \[purpose] view the vlan stack function configuration of the interface \[view] system view \[ use cases ] sonic# show interface vlan stack port original vlan customer vlan service vlan remark tc uplink port \ ethernet1 0 1 100 n/a ethernet7 ethernet4 2 n/a 100 n/a n/a total entries 2 show interface qinq protocol \[command] show interface qinq protocol \[ interface name ] \[purpose] view the qinq protocol configuration of the interface \[view] system view \[ use cases ] sonic# show interface qinq protocol 1 name protocol \ ethernet1 0x88a8 qinq protocol \[command] qinq protocol value no qinq protocol \[purpose] configure the tpid \[parameter] parameter description value 4 bit hexadecimal integer form, default value is 0x8100 \[view] interface view \[usage scenario] inbound direction in the inbound direction, the "qinq protocol" command is used for identifying vlan information in received packets if an interface receives qinq tagged packets and you don't want to modify the vlan information in the packet, the configuration should match the tpid (tag protocol identifier) of the incoming packet this means the tpid configuration should be consistent with the tpid used in the received packets outbound direction in the outbound direction, the "qinq protocol" command is used to modify the tpid value in outgoing packets \[ use cases ] sonic(config)# interface ethernet 1 sonic(config if 1)# qinq protocol 0x88a8 qinq enable \[command] qinq enable \[purpose] enable basic qinq functionality on the interface \[view] interface view \[usage scenario] when the port enable switch is activated, all traffic entering the device from this port will be tagged with an additional layer corresponding to the port vlan id (pvid) if the packet does not have a vlan tag, it will be encapsulated with a layer corresponding to the pvid vlan if the packet already carries a vlan tag, an additional layer corresponding to the pvid vlan will be added \[ use cases ] sonic(config)# interface ethernet 1 sonic(config if 1)# qinq enable vlan stack {tagged|untagged} \[command] vlan stack {tagged|untagged} vlan id stack id \[remark dot1p dot1p value ] \[remark tc tc value ] no vlan stack untagged no vlan stack tagged \[purpose] configure the vlan stack function of the interface \[parameter] parameter description tagged interface received messages with vlan tag need to be overlaid as a two layer vlan untagged interface receives messages without vlan tags that require stacking two layer vlans vlan id vlan id of interface received with vlan tag packets or inner vlan id after qinq encapsulation of packets without vlan tag stack id specify the outer vlan tag after stacking dot1p value modify the 802 1p priority of the outer vlan tag tc value modify the priority of packets for local processing \[view] interface view \[usage scenario] vlan stacking is a layer 2 technology that allows the encapsulation of user packets with an outer vlan tag based on the user's vlan id this helps differentiate between different users' packets \[ use cases ] sonic(config)# interface ethernet 1 sonic(config if 1)# qinq protocol 0x88a8 sonic(config if 1)# switchport access vlan 101 sonic(config if 1)# vlan stack tagged 100 101 remark dot1p 4 remark tc 4
