The problem:
i am facing another problem thats a bit wierd. i have a “old” voip base station that uses 100mbit rj45. but somehow it does not get an ip address. the request does not even go into the router. i have all four rj45 ports configured as br-lan and all work (tested with my laptop), but somehow… when i try to connect that base station, its somehow incompatible. anyone an idea why is that? the only difference is this 100mbit thingen, could this be the problem?
thats all i can see when i unplug and plugin the power supply of that device:
Fri Jan 12 23:04:02 2024 daemon.notice netifd: Network device 'lan2' link is down
Fri Jan 12 23:04:02 2024 kern.info kernel: [ 3921.471764] mt7530-mmio 15020000.switch lan2: Link is Down
Fri Jan 12 23:04:02 2024 kern.info kernel: [ 3921.477779] br-lan: port 3(lan2) entered disabled state
Fri Jan 12 23:04:07 2024 kern.info kernel: [ 3926.893551] mt7530-mmio 15020000.switch lan2: Link is Up - 100Mbps/Full - flow control rx/tx
Fri Jan 12 23:04:07 2024 kern.info kernel: [ 3926.902442] br-lan: port 3(lan2) entered blocking state
Fri Jan 12 23:04:07 2024 kern.info kernel: [ 3926.907681] br-lan: port 3(lan2) entered forwarding state
Fri Jan 12 23:04:07 2024 daemon.notice netifd: Network device 'lan2' link is up
Fri Jan 12 23:04:22 2024 kern.info kernel: [ 3941.363112] mt7530-mmio 15020000.switch lan2: Link is Down
Fri Jan 12 23:04:22 2024 kern.info kernel: [ 3941.369108] br-lan: port 3(lan2) entered disabled state
Fri Jan 12 23:04:22 2024 daemon.notice netifd: Network device 'lan2' link is down
Fri Jan 12 23:04:24 2024 kern.info kernel: [ 3942.948551] mt7530-mmio 15020000.switch lan2: Link is Up - 100Mbps/Full - flow control rx/tx
Fri Jan 12 23:04:24 2024 kern.info kernel: [ 3942.957397] br-lan: port 3(lan2) entered blocking state
Fri Jan 12 23:04:24 2024 kern.info kernel: [ 3942.962615] br-lan: port 3(lan2) entered forwarding state
Fri Jan 12 23:04:24 2024 daemon.notice netifd: Network device 'lan2' link is up
When i use a netgear GS108T between the voip station and the r4, it works.
I used lan2 on the r4 for the switch. For testing i used:
ethtool -s lan2 autoneg off speed 100 duplex full - now i have the same behaviour - no IP on the base station.
Same with
ethtool -s lan2 autoneg on (if switched off before)
ethtool -s lan2 advertise 0x008
Settings for lan2:
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: 100baseT/Full
Advertised pause frame use: No
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: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 2
Transceiver: external
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Link detected: yes
@ericwoud so we can continue here. Sorry, thought the old thread is the “main topic for anything related to r4”.
Can we move all those messages from the old thread to this one or just delete them? So it does not flood the other thread?
And if i can help in any way with that problem (like testing or gathering information), just let me know, would love to help.
The problem is when everything about a board is in one thread it is hard to find a specific problem later (if someone hits it too) and steps to reproduce and possible fix as different questions mixing at some time
so better make separate threads for such things (specific issues) and leave the plain board discussion (is it supporting x or y, release dates,new version etc.) in the vendor thread.
So now if some one have an issue with 100mbit/s mode on r4, he will find this thread and only related answers (except mine here :p)
Back to topic:
Outut of ethtool basicly looks good:
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Tells you your local interface supprts these modes and
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Is what the other side (your voip box) supports…these modes are intersected and the highest mode is taken
Advertised link modes: 100baseT/Full
This is applied to interface
Speed: 100Mb/s
Duplex: Full
....
Link detected: yes
And link is basicly recognized…maybe connection runs out of sync or there are crc errors at ethernet or ip layer so that link is dropped on one side…
Openwrt uses busybox to emulate iproute2 command and possible does not support all flags from it,but you got some information…and it looks good so far. See no cause why should be dropped from this side…can you see interface stats from the other side (voip box)? You do the test without the switch in between?
no, i have no connection to that base without the switch.
the base also has no wifi connection, so there is no way i can think of to gather more information.
what i could do is use the switch, try to get some information, only change the cable from base->switch to base->r4, wait a few seconds, then back to base->switch and see whats the difference. but guess that wont help much.
You need this informations in error case else it will not help to nail down the root cause
Commands look at ethernet layer,so we do not need a connection on higher layer…we want to know why the link is established and then dropped from any side
its not dropped, it is never established. the drops happen when i unplug the cable. that was to show that there is “nothing else” happening. i have dhcp on verbose, i see every request (e.g. from my mobile phone or my workstation), for testing purposes to see if the device even gets that far. it does not.
unfortunately, i guess the base station is a very bad device for such testing. and i dont have any other device with 100mbit
i gave away my raspberry pi 3b a few weeks ago. i guess that would be a good candidate for testing.
Your log above says that links gets up and after 15seconds down…i guess you talk about dhcp/ip layer…i’m still on ethernet
So posssibly link came up but have no (valid) traffic (errors,no keepalive/dhcp frames). But this is not advertising error, it is handling this advertised mode in ethernet driver.
yay, i have now my laptop connected to wifi. with that i am able to connect via ssh from my workstation to it. and the rj45-usb-c-adapter is connected. i have the same problem now on the laptop. so if anyone could tell me what i should check, i can provide that output
Look in statistics from both sides of this broken connection…if lan on r4 is clean it is possible that gmac (eth0) cannot handle 100mbit…afaik the connection between switchports and the ethernet controller (mac) is also ethernet (inside sgmii) with vlan-similar tagging
First output shows tx,but no rx (so also no errors) on your laptop…btw. wonder why ethtool talks about “packets” as it is on ethernet layer where it is called frames…not noticed before
Could you bring down the interface to reset statistics on r4 before? You still see traffic geberated over working connection before…same for eth0
If ip link set eth0/lan2 down/up does not clear the stats you should reboot to do it
crap, forgot to do ethtool to set it to 100mbit. can i somehow configure this in /etc/config/network? or do i have to use some /etc/init.d/rc.local? because otherwise when i reboot, its automatically on auto negotiation and that works with 1000, then the stats are wrong.
whats raising mainly on the router is:
TxBytes, TxPktSz65To127 and TxUnicast. They keep raising even with that “broken” connection. on the laptop, the tx_packets is slowly raising (every second 1 packet, more or less)