This article explains how to view and configure the FEC mode of a network interface under Linux.
1. View FEC Mode
        Run the following command to display interface information, including the current FEC mode:
        ethtool <devname>
        Notes:
         <devname> refers to the network interface name (e.g., eth0, ens1f0), which can be listed using:
        ifconfig
         If the output shows "Not reported" for FEC mode, the NIC automatically adapts to the peer FEC setting and does not support manual configuration or explicit reading.
2. Configure FEC Mode
        a. To set the FEC mode for a specific interface:
        ethtool --set-fec <devname> encoding <fecmode>
Important: The FEC mode must be the same at both ends of the link to ensure normal communication.
        Available FEC modes can be checked via:
        ethtool -h
        Common options:
        • auto – automatic negotiation
        • off – disable FEC
        • rs – Reed-Solomon FEC
        • baser – Base-R FEC
        b. To verify the configured and actual running FEC mode:
        ethtool --show-fec <devname>
        The output will show both the configured FEC mode and the real‑time running FEC mode of the interface.
        Moduletek Limited is at your service.
        For further inquiries about the above content, please contact us at: sales@moduletek.com