VLAN manipulation action in tc(8) Linux VLAN manipulation action in tc(8) (NAME) tc-vlan - vlan (SYNOPSIS) tc ... action vlan { pop | pop_eth | PUSH | MODIFY | PUSH_ETH } [ CONTROL ] PUSH := push [ protocol VLANPROTO ] [ priority VLANPRIO ] id VLANID MODIFY := modify [ protocol VLANPROTO ] [ priority VLANPRIO ] id VLANID PUSH_ETH := push_eth dst_mac LLADDR src_mac LLADDR CONTROL := { reclassify | pipe | drop | continue | pass | goto chain CHAIN_INDEX } (DESCRIPTION) vlan (encapsulation) (decapsulation) 802.1Q POP PUSH MODIFY . POP VLAN . PUSH MODIFY VLANID VLANPROTO . vlan . pop_eth . VLAN . push_eth . MAC ( MAC ). . (OPTIONS) pop (decapsulation) . push (encapsulation). id . modify (replace). 802.1Q . id . pop_eth . : VLAN . push_eth . Ethertype . : MAC . dst_mac src_mac . id VLANID VLAN ( VLAN ID) . VLANID ( '0x' ). protocol VLANPROTO VLAN . 802.1Q 802.1ad . priority VLANPRIO VLAN . 0 7 . dst_mac LLADDR MAC . src_mac LLADDR MAC . CONTROL . reclassify . pipe . drop . continue . pass qdisc . . (EXAMPLES) ICMP eth0 10.0.0.2 VLAN 123 : #tc qdisc add dev eth0 handle ffff: ingress #tc filter add dev eth0 parent ffff: pref 11 protocol ip \ u32 match ip protocol 1 0xff flowid 1:1 \ match ip src 10.0.0.2 flowid 1:1 \ action vlan push id 123 pop : VLAN eth0 : #tc qdisc add dev eth0 handle ffff: ingress #tc filter add dev $ETH parent ffff: pref 1 protocol 802.1Q \ u32 match u32 0 0 flowid 1:1 \ action vlan pop reclassify pop_eth push_eth tc-mpls(8) . (SEE ALSO) tc(8), tc-mpls(8) iproute2 12 Jan 2015 VLAN manipulation action in tc(8)