MPLS manipulation action in tc(8) Linux MPLS manipulation action in tc(8) (NAME) tc-mpls - mpls (SYNOPSIS) tc ... action mpls { POP | PUSH | MODIFY | dec_ttl } [ CONTROL ] POP := pop protocol MPLS_PROTO PUSH := { push | mac_push } [ protocol MPLS_PROTO ] [ tc MPLS_TC ] [ ttl MPLS_TTL ] [ bos MPLS_BOS ] label MPLS_LABEL MODIFY := modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ] CONTROL := { reclassify | pipe | drop | continue | pass | goto chain CHAIN_INDEX } (DESCRIPTION) mpls (encapsulation) (decapsulation) POP PUSH MODIFY DEC_TTL . POP ethertype MPLS ( IPv4 MPLS ) . MPLS ethertype MAC . PUSH MODIFY MPLS . PUSH MPLS_LABEL . DEC_TTL TTL MPLS . (OPTIONS) pop (decapsulation). . push (encapsulation). MPLS MAC . label . mac_push (encapsulation). MPLS MAC . label . modify (replace). MPLS . label tc ttl . dec_ttl TTL MPLS. label MPLS_LABEL MPLS MPLS . MPLS_LABEL ( '0x' ). protocol MPLS_PROTO . push mpls_uc mpls_mc ( mpls_uc ). pop . modify . tc MPLS_TC (TC) MPLS 0 7. 0 . ttl MPLS_TTL TTL MPLS 0 255. . bos MPLS_BOS (bottom of stack) MPLS . TC ( ) . CONTROL . reclassify . pipe . drop . continue . pass qdisc . . (EXAMPLES) IP eth0 123 MPLS eth1 : #tc qdisc add dev eth0 handle ffff: ingress #tc filter add dev eth0 protocol ip parent ffff: flower \ action mpls push protocol mpls_uc label 123 \ action mirred egress redirect dev eth1 unicast MPLS eth0 eth1 : #tc qdisc add dev eth0 handle ffff: ingress #tc filter add dev eth0 protocol mpls_uc parent ffff: flower \ action mpls pop protocol ipv4 \ action mirred egress redirect dev eth1 123 TTL 64 MPLS . eth1 : #tc qdisc add dev eth0 ingress #tc filter add dev eth0 ingress matchall \ action mpls mac_push label 123 ttl 64 \ action vlan push_eth \ dst_mac 02:00:00:00:00:02 \ src_mac 02:00:00:00:00:01 \ action mirred egress redirect dev eth1 MPLS 123 . MPLS eth1 : #tc qdisc add dev eth0 ingress #tc filter add dev eth0 ingress protocol mpls_uc \ flower mpls_label 123 mpls_bos 1 \ action vlan pop_eth \ action mpls pop protocol teb \ action mirred egress redirect dev eth1 (SEE ALSO) tc(8), tc-mirred(8), tc-vlan(8) iproute2 22 May 2019 MPLS manipulation action in tc(8)