Hey! I have a Mikrotik hAP ac2 running OpenWrt 23.05.0-rc3, which is connected to a cheap tp-link unmanaged gigabit switch (Tp-Link TL-SG1005D), via one of its LAN ports. I recently noticed it sometimes negotiates a link of 100Mbps with it despite both devices supporting 1Gbps. Initially I tried restarting the switch and it got fixed, but after some time it reverted back to 100Mbps, and now restarting doesn't help anymore. The cable I'm using to connect them is cat 5e, and apparently the rest of devices connected to the switch are running on 1Gbps.
This is the output of ethtool
, so it seems the switch announces up to 100Mbps:
root@OpenWrt:~# ethtool lan4
Settings for lan4:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: external
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: d
Wake-on: d
Link detected: yes
And this is my network config:
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 'fddd::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config device
option name 'lan1'
option macaddr '---------'
config device
option name 'lan2'
option macaddr '---------'
config device
option name 'lan3'
option macaddr '--------'
config device
option name 'lan4'
option macaddr '---------'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ip6assign '64'
list ipaddr '192.168.1.1/24'
option delegate '0'
option ip6hint '0'
config device
option name 'wan'
option macaddr '-------'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
option peerdns '0'
list dns '127.0.0.1'
option delegate '0'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option peerdns '0'
list dns '::1'
config interface 'iot'
option proto 'static'
list ipaddr '192.168.2.1/24'
option delegate '0'
Logs when I restart my switch:
Sun Sep 10 00:31:25 2023 daemon.notice netifd: Network device 'lan4' link is up
Sun Sep 10 00:31:34 2023 daemon.notice netifd: Network device 'lan4' link is down
Sun Sep 10 00:31:34 2023 kern.info kernel: [666613.049595] qca8k-ipq4019 c000000.switch lan4: Link is Down
Sun Sep 10 00:31:34 2023 kern.info kernel: [666613.049948] br-lan: port 4(lan4) entered disabled state
Sun Sep 10 00:31:58 2023 kern.info kernel: [666636.969852] qca8k-ipq4019 c000000.switch lan4: Link is Up - 100Mbps/Full - flow control rx/tx
Sun Sep 10 00:31:58 2023 kern.info kernel: [666636.970062] br-lan: port 4(lan4) entered blocking state
Sun Sep 10 00:31:58 2023 kern.info kernel: [666636.977467] br-lan: port 4(lan4) entered forwarding state
Sun Sep 10 00:31:58 2023 daemon.notice netifd: Network device 'lan4' link is up
Does anyone have any idea why this could fail? I tried disabling autonegotiation and setting the speed to 1Gbps with full duplex but it doesn't work, the link doesn't go up. I'm also planning to buy an ethernet cable tester to see if that helps me with the troubleshooting (the cable connecting router-switch was built by me, but it always worked at ~960Mbps, so i suspect that shouldn't be the issue). Thanks in advance!