HowTo Install MLNX_OFED for ConnectX-4/ConnectX-5 via ISO Image

Version 4

    This post describes the basic procedure for installing MLNX_OFED for Ubuntu.




    MLNX_OFED can be installed by running the mlnxofedinstall script. The installation script performs the following:

    • Discovers the currently installed kernel
    • Uninstalls any software stacks that are part of the standard operating system distribution or another vendor's commercial stack
    • Installs the MLNX_OFED_LINUX binary RPMs (if they are available for the current kernel)
    • Identifies the currently installed InfiniBand and Ethernet network adapters and automatically upgrades the firmware
    • Removes all previously installed MLNX_OFED packages and re-installs from scratch. You will be prompted to acknowledge the removal of the old packages.



    MLNX_OFED Download

    1. Verify that the system has a Mellanox network adapter (HCA/NIC) installed.

    # lspci -v | grep Mellanox




    2. Download the ISO image of the desired OS to your host. à Products à Software à InfiniBand/VPI Drivers à Mellanox OFED Linux (MLNX_OFED) à Download.

    The image name format is: MLNX_OFED_LINUX-<ver>-<OS label><CPUarch>.iso.



    MLNX_OFED Installation


    1. Log into the installation machine as root.


    2. Copy the downloaded ISO to /root.


    3. Mount the ISO image to your machine:

    # mkdir /mnt/iso

    # mount -o loop /root/MLNX_OFED_LINUX-4.0- /mnt/iso

    # cd /mnt/iso

    4. Run the installation script:

    # ./mlnxofedinstall

    5. Reboot once installation is completed successfully.


    To change the interface type from InfiniBand to Ethernet, refer to:


    6.  Run the ibdev2netdev utility to display all associations between the Ethernet devices and the IB devices/ports:

    # ibdev2netdev    

    mlx5_0 port 1 ==> ens13f0 (Up)

    mlx5_1 port 1 ==> ens13f1 (Down)

    7. Set the IP address:

    # ifconfig ens13f0 netmask


    8. Verify that the network configuration is set correctly:

    # ifconfig –a


    ens13f0   Link encap:Ethernet  HWaddr 7c:fe:90:6f:38:fe

              inet addr: Bcast: Mask:

              inet6 addr: fe80::7efe:90ff:fe6f:38fe/64 Scope:Link

              UP BROADCAST RUNNING MULTICAST MTU:1500  Metric:1

              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

              TX packets:8 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:1000

              RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)