OpenWrt on Ubiquiti EdgeRouter X SFP with working SFP module

ER-X-SFP OpenWRT21 DSA Distributed Network Switch

The EdgeRouter X-SFP is a quite powerful dualcore (880Mhz, 256MB RAM, 256MB flash) device powered by a MediaTek MT7621AT SoC.

OpenWrt 21 (snapshot) comes with support for the SFP slot (attached to the switch port eth5 via RGMII).

Note: it won’t work with OpenWrt 19!

Custom build#

As of April 2021 it requires a custom build to get SFP support on the device. I’ve used the snapshot 1db4681617b9aef724c9ccf15e62ba2a91d52564 and basic testing shows full functionality including VLANs.

No additional patches or manual config flags are required – it works right out of the box.

To flash the device from stock firmware to OpenWrt a minimal/short-receipt tar image is required (upgrade via ssh) as described on the device page.

Pre-build image#

A ready-to-use image is also available (config).

  • Download
  • sha256: 83cc438be254ff69e245c76d527204177b8973cb71c4ae0d50675204c91e8a0d

DSA Distributed Network Switch#

Recent kernels (e.g. 5.4 from OpenWrt 21) are using the DSA Distributed Network Switch architecture to provide a unified interface for switch configurations. Keep in mind to use a single bridge with VLAN filtering enabled when using multiple VLANs!

References#

  • Ubiquiti ER-X-SFP: add all the bits to enable SFP port eth5 #2901
  • phy: at803x: Select SFP interface mode that both sides supports #3584
  • OpenWrt forums discussion about SFP support
  • Kernel DSA Architecture and Design