DTAG

Double Tagging

DTAG

Double tagging (Q-in-Q): set a port’s double-tag mode, and its outer-tag TPIDs. Type the sub-commands in full (case does not matter). dtag alone means dtag show. Without <pbmp>, all Ethernet ports are used. mode, tpid, addTpid and deleteTpid without a value only show. TPIDs can be hex (0x8100) or decimal.

show and the forms without a value are read-only. Changing a mode or a TPID changes how ports parse and add VLAN tags, behind SONiC’s back (SONiC sets port TPIDs from PORT|<name>|tpid).

dtag show [<pbmp>]

One line per port with its double-tag mode (none (disabled), internal (service provider) or external (customer)), whether it adds or removes the customer tag, and its TPID. Read-only.

Hardware-validated

drivshell> dtag show ce0
port 0:ce0        double tag mode none (disabled), tpid 0x8100
dtag mode <pbmp> [none | internal | external] [addInnerTag | removeInnerTag]

Set the double-tag mode: internal for a provider (network-facing) port, external for a customer port, none to turn it off. addInnerTag and removeInnerTag add or strip the customer tag. Without a mode it shows. Changes the ASIC.

Unvalidated

drivshell> dtag mode ce0 external
dtag tpid <pbmp> [<tpid>]

Show or set the port’s outer TPID. Changes the ASIC when a value is given.

Hardware-validated

drivshell> dtag tpid ce0
port 0:ce0        tpid 0x8100
dtag addTpid <pbmp> [<tpid>]

Accept an additional outer TPID on the ports. Without a value it shows the current TPID. Changes the ASIC when a value is given.

Unvalidated

drivshell> dtag addTpid ce0 0x88a8
dtag deleteTpid <pbmp> [<tpid> | all]

Stop accepting one TPID, or with all every TPID. all is not in the built-in help. Changes the ASIC when a value is given.

Unvalidated

drivshell> dtag deleteTpid ce0 0x88a8

Built-in help

Usage:
    dtag show <pbmp>
    dtag mode <pbmp> none|internal|external [addInnerTag|removeInnerTag]
    dtag tpid <pbmp> hex-value
    dtag addTpid <pbmp> hex-value
    dtag deleteTpid <pbmp> hex-value