Control word
CLI reference:/interface/vpls/mpls/interface
VPLS connects remote sites into one Ethernet broadcast domain through pseudowires (PW) over a packet switched network (PSN). VPLS encapsulation adds overhead, so every interface of the label switched path must carry a larger packet than the customer sends.
Each Ethernet chipset has a hardware limit on the largest packet it can send. Some Ethernet interfaces support only one VLAN tag: their maximum packet size without the Ethernet header and checksum (L2MTU) is 1504 bytes. That is not enough for a VPLS-encapsulated full-size Ethernet frame: 1500 bytes of payload, 14 bytes of Ethernet header, 4 bytes of control word and 8 bytes of two labels make 1526 bytes. See MTU in RouterOS for the L2MTU of RouterBOARD devices.
Not all RouterBOARD devices support an L2MTU large enough for an encapsulated packet without fragmentation. For these cases, RouterOS supports pseudowire fragmentation and reassembly (RFC 4623) with the 4-byte control word (CW).
How the control word works
RouterOS uses the control word to fragment and reassemble packets inside the VPLS tunnel. The control word sits between the pseudowire label and the payload and adds 4 bytes of overhead. When an encapsulated frame does not fit the MPLS MTU of the outgoing interface, the sending router splits it into fragments, and the remote router reassembles them.
RouterOS does not reorder fragments that arrive out of order. Out-of-order fragments are dropped.
The pw-control-word parameter of /interface/vpls and
/routing/bgp/vpls controls the control word:
default: LDP-signalled and BGP-signalled VPLS use the control word. Cisco-style VPLS (cisco-static-id) does not.enabled: always use it.disabled: never use it.
Set the same value on both ends. If only one end has disabled, the pseudowire still runs, but that end
sends frames without the control word and does not fragment them.

The control word has five fields:
- 0000: 4 bits, always 0. An IPv4 packet starts with 4 and an IPv6 packet with 6, so a router that looks past the label stack, for example to balance ECMP traffic, does not take the pseudowire payload for an IP packet (RFC 4385).
- Flags: 4 bits.
- Frag: 2 bits, show whether the payload is a whole frame, the first, a middle or the last fragment.
- Len: 6 bits, the length of the payload and the control word when that is less than 64 bytes, so that the receiving router can remove the Ethernet padding of a short packet. Otherwise 0.
- Seq: 16 bits, a sequence number to detect lost or reordered packets. The value 0 means that the packet has no sequence number.
The RFC makes the generation and processing of sequence numbers optional. RouterOS numbers the packets of a pseudowire.
Example: VPLS over a path with a 1500-byte MPLS MTU
The example continues the LDP-signalled part of the VPLS example, without its BGP-signalled part: it
uses the pseudowire of customer A between R2 and R4 (a-r4 on R2, a-r2 on R4), with the test addresses
192.168.10.2 on R2 and 192.168.10.4 on R4. The path from R2 to R4 goes through R3.
Set the MPLS MTU of the uplinks of R2 and R4 to 1500 bytes, as on a link whose L2MTU allows no more. On R2:
/mpls/interface
add interface=ether3 mpls-mtu=1500
On R4:
/mpls/interface
add interface=ether2 mpls-mtu=1500
With the control word (the default), a 1500-byte packet with the "do not fragment" flag still crosses the pseudowire: the routers fragment and reassemble the encapsulated frame. From R4:
[admin@MikroTik] > /ping 192.168.10.2 size=1500 do-not-fragment count=3
SEQ HOST SIZE TTL TIME STATUS
0 192.168.10.2 1500 64 886us
1 192.168.10.2 1500 64 900us
2 192.168.10.2 1500 64 822us
sent=3 received=3 packet-loss=0% min-rtt=822us avg-rtt=869us
max-rtt=900us
Disable the control word on both ends of the pseudowire. On R4:
/interface/vpls/set a-r2 pw-control-word=disabled
On R2:
/interface/vpls/set a-r4 pw-control-word=disabled
Now the 1500-byte packets are lost:
[admin@MikroTik] > /ping 192.168.10.2 size=1500 do-not-fragment count=3
SEQ HOST SIZE TTL TIME STATUS
0 192.168.10.2 timeout
1 192.168.10.2 timeout
2 192.168.10.2 timeout
sent=3 received=0 packet-loss=100%
The largest IP packet that still passes is 1478 bytes: with 14 bytes of Ethernet header and 8 bytes of two labels, it fills the 1500-byte MPLS MTU.
[admin@MikroTik] > /ping 192.168.10.2 size=1478 do-not-fragment count=3
SEQ HOST SIZE TTL TIME STATUS
0 192.168.10.2 1478 64 772us
1 192.168.10.2 1478 64 1ms83us
2 192.168.10.2 1478 64 789us
sent=3 received=3 packet-loss=0% min-rtt=772us avg-rtt=881us
max-rtt=1ms83us
Set pw-control-word=default on both ends to use the control word again.