Enable Mellanox ConnectX-3 SFP+ 10G Interfaces in OpenWRT

post-thumb

Photo by klmax from iStock

Table of Contents

After I had finished my review of the Gowin R86S-U4, I was sent a question on how to enable the 10G SFP+ interfaces in OpenWRT since they are not enabled out of the box. I have not used OpenWRT in the past even though I have been aware of its existence for a long time. This seemed like a good opportunity to try out OpenWRT to see how to enable the SFP+ interfaces.

The R86S-U4 has Mellanox ConnectX-3 interfaces so I began searching if those drivers could be enabled. I found some older information which seemed to be a manual compiling and installation of the driver, but later I realized they are available in the software package manager, which is awesome.

Note

The way you enable the interfaces should be the same on other systems which use Mellanox ConnectX-3 (or earlier) hardware.

Check Interfaces

On the R86S-U4 model, if I go to the “Network > Interfaces” page and click on the “Devices” tab, you will see three eth interfaces listed. Those are the 2.5G Ethernet interfaces. There should be two more interfaces listed for the SFP+ 10G interfaces.

Enable Mellanox ConnectX-3 Interfaces

Download Software Package

Now go to the “System > Software” page and click on the “Update lists…” button so you can see the available package list.

Enable Mellanox ConnectX-3 Interfaces

In the “Filter” box, type kmod-mlx4-core to find the package you need to install. Click the “Install…” button.

Enable Mellanox ConnectX-3 Interfaces

Check Interfaces (Again)

On the “Devices” tab of the “Network > Interfaces” page, you will now see two additional interfaces eth3 and eth4, which are the 10G SFP+ interfaces.

Enable Mellanox ConnectX-3 Interfaces

Add New Interface

Click on the “Interfaces” tab while you are still on the “Network > Interfaces” page. You will see your existing interfaces, which may be only LAN and WAN by default on a new installation but you may have other interfaces configured already.

Click the “Add new interface…” button to set up the new SFP+ interfaces.

Enable Mellanox ConnectX-3 Interfaces

Enter a “Name” and select “Static address” for the “Protocol”. This configuration is for the interface itself so it does not mean all of the attached devices on that interface have to be static IP addresses. A single device or a network switch may be connected to each interface on your OpenWRT system.

For the “Device”, select one of the SFP+ interfaces you wish to add. Then click “Create interface”.

Enable Mellanox ConnectX-3 Interfaces

Next simply add the “IPv4 address” of your interface such as 192.168.200.1 as shown in the screen shot. Generally .1 is used as the interface IP.

For the “IPv4 netmask”, this determines the size of the network you can have on that interface. Many home users choose to use 255.255.255.0 (or /24 in CIDR notation) since that allows for up to 254 devices the network. You can create a larger network depending on the netmask you are using.

I find that 254 addresses per network is plenty since I have partitioned my network using multiple VLANs each having 254 available IP addresses.

Enable Mellanox ConnectX-3 Interfaces

Before clicking “Save”, go to the “DHCP Server” tab. Then press the “Set up DHCP Server” button.

Enable Mellanox ConnectX-3 Interfaces

You will several options appear but you can leave the default values unless you want to use a wider range of IP addresses for DHCP clients. The “Start” and “Limit” boxes define how many addresses DHCP can be used. If you plan to set up various services on one or more servers, you may want to use some of the remaining IP addresses for static IPs.

Click the “Save” button when you are finished.

Enable Mellanox ConnectX-3 Interfaces

Save and Apply Changes

You will notice on the “Interfaces” page that the new interface is listed and says there are pending changes. Click the “Save and Apply” button to apply the interface changes.

Enable Mellanox ConnectX-3 Interfaces

Once the interface is enabled, you will see the interface information as well as the amount of data being transmitted and received.

Enable Mellanox ConnectX-3 Interfaces

That is all you need to do in order to enable the Mellanox SFP+ 10G interfaces on your OpenWRT system!

comments powered by Disqus