IPv6 MTU concepts in CDRouter
MTU Definitions
-
The layer 2 link MTU is the largest packet that can be transmitted on the layer 2 link without fragmentation, and is specified by the testvar
ipv6WanMtu
. -
The IPv6 link MTU is the largest IPv6 packet (IPv6 headers + IPv6 payload) that can be transmitted without IPv6 fragmentation on the layer 2 link, and is automatically calculated by CDRouter and configured on each stack that is created during start.
This value is calculated by taking into account the physical interface’s MTU, any VLANs configured on the interface, and the LAN/WAN mode if the mode encapsulates IPv6 packets (i.e. PPPoE/6to4). This value can be updated if the stack receives a Router Advertisement containing an MTU option, since the RA MTU option is meant to indicate the IPv6 link MTU (see RFC 4861 Section 4.6.4). The only way to adjust the IPv6 IPv6 link MTU after start has calculated it is if the node receives an RA with an MTU option.
The IPv6 link MTU can be represented by the following equation:
IPv6 link MTU = layer 2 link MTU - encapsulations - VLANs
-
The IPv6 path MTU is a per destination value, and is the largest IPv6 packet (IPv6 headers + IPv6 payload) that can be transmitted through all intermediary hops between the source and destination nodes.
Each IPv6 destination address has its own IPv6 path MTU value. The path MTU for a destination is initially assumed to be the IPv6 link MTU. This value changes based on ICMPv6 Packet Too Big messages that are sent back by IPv6 routers between the source and destination.
The Router Advertisement MTU Option
The testvar ipv6WanMtuOption
controls whether or not
CDRouter will include the MTU option in Router Advertisements it sends
on the WAN. If this testvar is enabled, CDRouter will advertise the
IPv6 link MTU. If this testvar is disabled, the MTU option will
not be advertised.
IPv6 Path MTU Considerations
A destination’s PMTU is automatically adjusted when ICMP Packet Too Big messages are received. In addition, CDRouter also uses the current PMTU value for the destination address when deciding when to fragment outgoing packets.
CDRouter uses the port specified by the testvar forwardingPort
when performing PMTU discovery during start. The
forwardingPort
testvar currently defaults to a value
of 5001
.
Example IPv6 Link MTU Calculation
Assuming the following testvars are enabled:
testvar ipv6WanMode PPPoE
testvar ipv6WanMtu 1492
testvar wanVlanId 200
The IPv6 link MTU on the WAN will be:
1492 - 8 (PPPoE encapsulation) - 4 (VLAN) = 1480