# Adaptive Forward Erasure Correction (FEC) for VPN tunnels

The FEC feature helps to control errors in data transmission over an unreliable or noisy communication channel.

Requirements:

- The FEC feature is supported on engine version 7.2 and later.
- When FEC is configured for a VPN tunnel, the gateways at both ends of the tunnel must support the FEC implementation. If this condition is not met the FEC configuration is ignored.
- The FEC feature should not be used if packet loss is caused due to traffic congestion.
- The FEC feature is not suitable for bulk data transmissions, and should not be used with applications which already implement end to end FEC like feature.

When FEC is enabled, the engine sends a combination of M data packets, N correction packets, and metadata information in a data set through a link to the destination. This allows recovering up to N missing data packets within one set of data and correction packets.

Important: It is recommended to only use this feature as a last resort option for the critical application traffic that is highly sensitive to packet loss, when no better links are available. Note that when the feature is enabled, it increases the network bandwidth usage for the traffic selected for FEC and can cause traffic congestion making things worse if packet loss is due to congestion.
The FEC feature can be enabled by:

1. Selecting what QoS classes are enabled for FEC. For more details, refer to the Create Link Usage Profile elements topic.
2. (Optional) Controlling what link types must be used for FEC. For more details, refer to the Create Link Usage Profile elements topic.
3. Using the configured Link Usage Profile in the engine configuration. For more details, refer to the Select a Link Usage Profile element for an Secure SD-WAN Engine topic.
4. Selecting the QoS class in the access rule to match the traffic for FEC. For more details, refer to the Use QoS Class elements to apply custom link selection options to traffic topic.

Note:

- The maximum transmission unit (MTU) size for the connections subjected to FEC is slightly smaller than the MTU size with the normal VPN tunnel. The ICMP fragmentation needed message is generated by the engine when needed.
- When engine configuration includes FEC, but engine version does not support FEC, the FEC settings are ignored, and warning is displayed during the policy installation.
- The configuration done must match in both the tunnel endpoint engines to achieve symmetric FEC for both sent and received packets of the critical connections.
- The FEC configuration is interpreted on the sender side and recipient side adjusts itself to the configuration.
- The FEC correction packets have the same QoS class as the data packets in the set. When it comes to interface used to send out ESP packets, potential DSCP marking is applied to correction packets. Also, the correction packets are included in the QoS processing and in the interface statistics.
- The correction packets are counted as traffic inside VPN tunnel.
- The tunnel statistics still reflect the tunnel itself and FEC does not change the tunnel statistics. However, the application health is reported as the application determines it.