As I am having issue related to this topic:
I am looking for a software work around to this problem.
What I am trying to achieve is to restart one particular ethernet port on the router's built-in switch.
/etc/init.d/network restart restarts the port but that command also restarts all other ports and even both Wi-Fi radios.
My question is how to actually restart only one ethernet port in OpenWRT?
I am on Linksys WRT3200ACM and 22.03.0 OpenWRT.
Wouldn't that take down the LAN though which is trying to be avoided? I can't check right now but maybe
ifconfig ethX down/up might do it.
Since the port is connected to a switch chip, it is unlikely that you can bounce that port individually. I may be wrong here, but in general, that level of control is not exposed through the switch chip to the OS and then to the userland.
Thanks guys but none of the above brings stuck port to live.
Any other suggestions i may try?
Are you saying that you have some other issue that you want to restart one port to fix?
If so, have you check the cable?
No, i have only issue reported in this thread:
I tried to disable/enable with ip link set lan1 down && ip link set lan1 up, not working...
With unplug/plug the Ethernet cable :
Mon Dec 13 21:36:05 2021 kern.info kernel: [ 354.868699] br-lan: port 1(lan1) entered disabled state
Mon Dec 13 21:36:05 2021 kern.info kernel: [ 354.876696] mv88e6085 f1072004.mdio-mii:00 lan1: configuring for phy/gmii link mode
Mon Dec 13 21:36:05 2021 kern.info kernel: [ 354.889119] 8021q: adding VLAN 0 to HW filter on device lan1
Mon Dec 13 21:37:39 2021 kern…
The issue is happening on different ports. Actually on all 4 of them. The one I am experecing the 'stuck' port the most is the one with Raspberry Pi device which i restart the most. This way the port of that deivce gets stuck the most. But of course i had replaced the for tests at the very begginig when i notices the problem. That did not resolve the problem.
OK...interesting...this must be a DSA device or something since they could address a "lan1". Also,
ip is a raw Linux command. I see your issue.
I'm not sure that's a supported OpenWrt feature.
one supported command. Ill have to search; I recall other threads of users wanting to restart a single port. Did you try this command instead:
(instead of restart?)
I will definitely try this one next time the port will stuck. Thanks a lot for your input.
does not do much in my case. I have tried to invoked that command couple of times in a row. Port is still dead after this command.
I have just noticed that even
does not work every single time. Sometimes i have to invoke this command 2-3 times and then port is back to live.
If there is no way to restart single port, perhaps there is a way to restart just the built in switch without having to restart Wi-Fi interfaces also?
Did you ever find a way to do this?