WAN interface no longer negotiating at 2.5Gbps

Started by FullyBorked, August 07, 2022, 02:59:02 PM

Previous topic - Next topic
I noticed after the update my WAN port is no longer negotiated at 2.5Gbps.  Before the upgrade it correctly negotiated but didn't display the speed in the UI.  Not sure where to start troubleshooting this.  My network card in question is an X550T, my other 10G connections seem to have negotiated correctly.




ix1: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: WAN_XFi     
options=48538b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,NOMAP>
        ether
        inet 73.*.*.* netmask 0xfffff800 broadcast 255.255.255.255
        groups: WAN_Group
        media: Ethernet autoselect (1000baseT <full-duplex,rxpause,txpause>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>





I think the FreeBSD change you are referencing is:

https://github.com/opnsense/src/commit/9eed130b298f72da

It talks about "sysctl" to enable 2.5/5G autoneg which is disabled by default for [reasons].

The documentation side of this looks rather poor.


Cheers,
Franco

Yea this is over my head here.  Might have to have some better explanation somewhere, it doesn't' really point to how to actually change anything.  I was able to manually set the duplex under the WAN interface to get back to 2.5Gbps, but this is really a stop gap and will probably bite me in the future if I forget. 

I'm a bit confused how there was any interoperability with switches.  Would think the switch wouldn't negotiate a speed that the nic couldn't support.  So I'm not quite following the choice of change here. 

Regardless I'm up and going for now. 

Can you dump the following here?

# sysctl hw.ix.advertise_speed

It should say 15 (or 0xf) according to the code.

Adding bit 0x10 adds 2.5G auto-neg and 0x20 adds 5G auto-neg.

Enabling all would be to set it to 63 (or 0x3f). You can do this from the tunables GUI and recheck from the command line.


Cheers,
Franco



Right, um, sure. Driver is drunk. oO

Try 63 anyway to see if autoneg is working then if you can. It would be helpful to know this for the future.


Thanks,
Franco

So do I use the int or the hex code in the tunable? 

Since the sysctl returns a plain "0" I'd try the decimal.


Cheers,
Franco

Hmm, the tunable doesn't seem to affect anything, still auto negotiating at 1000 and still showing zero in the terminal.  I've attached a screenshot maybe I'm doing something wrong.  Does this require a reboot?

I have not tested other values, but I can confirm that a decimal value of 16 does allow 2.5G negotiation on my X550 NIC.

So it does require a reboot for the value to be set, however even with 63 being set I'm still auto negotiating at 1000Gbps.  Anything else I can try or provide that might help? 

I suppose it prefers the lower values for "reasons". So to set a single bit to "automatic" makes it a forced negotiation of 2.5G just like selecting it in the interface. It's really weird.


Cheers,
Franco