Add support for MikroTik RB5009UG

root@RB5009:~# ethtool sfp
Settings for sfp:
        Supported ports: [ TP ]
        Supported link modes:   1000baseX/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  1000baseX/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Link detected: no
root@RB5009:~# ethtool -s sfp speed 1000 duplex full autoneg off
root@RB5009:~# ethtool sfp
Settings for sfp:
        Supported ports: [ TP ]
        Supported link modes:   1000baseX/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  1000baseX/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Auto-negotiation: off
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Link detected: no

hi everybody maybe you are need this packages for work no ?

you are not the packages in my build @segal_72 sorry

i can send if you want tomorrow

tell me if you want a supp package like vpn etc

thanks for all for this router is very powerfull :wink:

1 Like

Would be a shame not being there with this weather. Hope tomorrow will be same :wink:

1 Like

Hi, great work there

do you think it would be possible to have HSGMII mode on SFP+ ? (to use ONU 2.5Gbps)

Thanks

1 Like

i tell 2 tame samething, but no reply, i think no one try it yet

Hey Guys, I noticed last night doing iperf testing that some intervlan routing is not hitting 1gbps line rate. Enabling software flow offloading resolved it, but that confused me since I figure this thing would have plenty of power to do it without. The CPU was not even sweating during the test. Any insight on this? Anything I can provide to help diagnose?

I also noticed I can't adjust ring buffers with ethtool, ethtool -g reports it is unsupported , is this expected for this hardware?

Lastly I had some issues with bonding see my post here, not sure if maybe we need to patch bonding.sh for this device? Race condition with bridges containing a vlan on a bond - #3 by wulfy23

Who knows the ssh command to switch the Rb5009 OpenWrt from wan P1 to wan sfp? I can't use port1 (p1) because it's still a WAN I would like it to switch to Lan.

1 Like

Yes i think create vlan 802.1q with id and modifs first the sfp of wan in edit

I has found this link but i don't understand

So i has configurate like that what is wrong ?!



config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix ‘XXXXXXX’

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'p2'
	list ports 'p3'
	list ports 'p4'
	list ports 'p5'
	list ports 'p6'
	list ports 'p7'
	list ports 'p8'
	list ports 'sfp'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.2.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'sfp'

config device
	option type '8021q'
	option ifname 'sfp'
	option vid '832'
	option name 'sfp.832'

config interface 'wan'
	option proto 'dhcp'
	option device 'sfp.832'
	option broadcast '1'
	option vendorid 'sagem'
	option reqopts '1 15 28 51 58 59 90'
	option sendopts ‘XXXXX’

config interface 'wan6'
	option proto 'dhcpv6'
	option device 'sfp.832'
	option reqaddress 'none'
	option reqprefix 'auto'
	option defaultreqopts '0'
	option sendopts ‘XXXXXXX’
	option noclientfqdn '1'
	option noacceptreconfig '1'

@moeller0 @dlakelan do you has idea for type of command for verify if my sfp is well connected ? @robimarko you has linked type on and mine off of my sfp putty dmesg you know why ?

Sorry no first hand experience with SFPs (my router has a SFP cage, but for a VDSL2 link SFP modules are IMHO not very attractive, the existing ones run hot and do not offer a lot of DSL diagnostics*).

*) Most of the time such diagnostics are irrelevant, but when problems come up it is always worth checking that the link is stable and reliable.

2 Likes

Hi moeller thanks for the response i m in vdsl2

But for the moment not internet with sfp

If i return to routeros the sfp work

I think is a problem with sfp not recognize like a wan

While I somewhat agree I successfully run off one of them since more than a year. But yeah, rather kludgy as there has not been much traction in supporting them with anything other than some highly proprietary gear (e.g. a Cisco router in my case).

2 Likes

I understand why SFP modules are attractive for many. That is why I tried to qualify the above as my opinion only.

1 Like

@sumo your sfp module work on rb5009 ? Or other mikrotik i has compil with ethtool-full and kmod-eth

These sources were posted in the MikroTik forum

(here: https://forum.mikrotik.com/viewtopic.php?t=183588#p915516 )
Does it help with anything?

Ok i will check :muscle:

There is no magic involved. All your ports are sitting on the same switch. So reconfiguring your port layout is trivial.

Just move the ports between the device sections. I configured port 8 to be WAN, e.g.:

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'p1'
	list ports 'p2'
	list ports 'p3'
	list ports 'p4'
	list ports 'p5'
	list ports 'p6'
	list ports 'p7'
	list ports 'sfp'

[...]

config interface 'wan'
	option device 'p8'
	option proto 'dhcp'

See how OpenWrt's configuration settings pre-set it, you can play with that yourself:

1 Like

i will try your configuration but we have a sfp connected to router rb5009

i keep informed i has possibily to connect by pppoe or dhcp :slight_smile:
thnaks

I have 2 RB 5009 with sfp, only the one with routerOS gets internet ... I checked how the bridge was designed ... but I can't find the equivalent for OpenWrt.

1 Like

Exactly we has package kmod-sfp and ethtool-full but cannot internet on OpenWrt why

?

We have try multiples configuration a long day but always not isp recognize internet :confused:

And my fai not segal use vlan 835 in pppoe and 832 to dhcp

I put p8.835 ?

Doesnt work

But with p1 i has a traffic like this

No, I don't think so. Last I checked nothing much relevant was in there.

Here you go with the only rb5009 specific stuff:

mvpp2/mvpp2_main.c:
static unsigned rb5009_port_map[] = {
        9 | PM_BIT_RGMII, 7, 6, 5, 4, 3, 2, 1, 10 | PM_BIT_SFP_PLUS, -1
};

struct mvpp2_port_config rb5009_port_config[] = {
        {
                .sfp = 0,
                .sw_num = 0,
                .port_map = rb5009_port_map,
                .ops = NULL,
        },
};

struct mvpp2_port_config rb5006_port_config[] = {
        {
                .sfp = 1,
                .sw_num = -1,
                .port_map = NULL,
                .ops = &mvpp2_sfp_ops,
        },
        {
                .sfp = 0,
                .sw_num = -1,
                .port_map = NULL,
                .ops = &phy_qca8081_ops,
        },
};

static struct mvpp2_port_config *get_port_cfg(int id) {
        static struct mvpp2_port_config *cfg = NULL;
        if (cfg == NULL) {
                if (is_type("5009")) {
                        cfg = rb5009_port_config;
                }
                else if (is_type("5006")) {
                        cfg = rb5006_port_config;
                }
        }
        return cfg + id;
}

static void mvpp2_board_specific(struct mvpp2_port *port) {
        if (port->cfg->sfp) {
                extern void init_rb5009_sfp_signals(struct phy *phy);
                init_rb5009_sfp_signals(&port->sw.phy);
        }
        if (port->cfg->ops) {
                port->sw.phy.ops = port->cfg->ops;
        }
}

Unfortunately, that init_rb5009_sfp_signals() function seems not part of any of those sources :disappointed:.