What's new

Unplug device's LAN cable, wait 1 sec and re-plug.

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Torson

Senior Member
RT-AX56U @384.17 unattended but happily running at a remote location.

I use a 3rd party device to reboot the router if certain network conditions are not met. Now, there supposedly is a way to control that device through a cloud hosted site (in addition to other options.)

The first cloud configuration requirement is stated in the subject line - Unplug device's LAN cable, wait 1 sec and re-plug.
I know the router's switch port the device is attached too. Also know that robocfg is a thing of the past and can't figure a way to do that with ethctl.

Any suggestions, please (remote and unattended are the key words?)
 
RT-AX56U @384.17 unattended but happily running at a remote location.

I use a 3rd party device to reboot the router if certain network conditions are not met. Now, there supposedly is a way to control that device through a cloud hosted site (in addition to other options.)

The first cloud configuration requirement is stated in the subject line - Unplug device's LAN cable, wait 1 sec and re-plug.
I know the router's switch port the device is attached too. Also know that robocfg is a thing of the past and can't figure a way to do that with ethctl.

Any suggestions, please (remote and unattended are the key words?)

Try

e.g. Port 1 (eth4 - interfaces are reversed)
Code:
ethctl eth4 phy-power down

sleep 1

ethctl eth4 phy-power up
Syslog should show
Code:
kernel: eth4 (Ext switch port: 3) (Logical Port: 11) (phyId: 3) Link DOWN.
kernel: eth4 (Ext switch port: 3) (Logical Port: 11) (phyId: 3) Link Up at 1000 mbps full duplex
 
That sounds promising, moreso ethctl mentioned in the link is available in the current router's firmware - thank you. I'll give it a try and post the result.
 
@Martineau - your suggestion is verified and works - thank you!
Code:
asmin@RT-AX56U:/tmp/home/root# ethctl phy-map
eth0:   Up <s:o:m:e:M:A:C:_> <IntSw P0, Logical 00> PHY_ID <0x0007f008:0x08: On-chip 1G GPHY> Cfg: ANG.1G; Up 1G
eth1:   Up <s:o:m:e:M:A:C:_> <ExtSw P0, Logical 08> PHY_ID <0x20000000:0x00: On-chip 1G GPHY> Cfg: ANG.1G; Up 100M
eth2:   Up <s:o:m:e:M:A:C:_> <ExtSw P1, Logical 09> PHY_ID <0x20000001:0x01: On-chip 1G GPHY> Cfg: ANG.1G; Up 100M
eth3: Down <s:o:m:e:M:A:C:_> <ExtSw P2, Logical 10> PHY_ID <0x20000002:0x02: On-chip 1G GPHY> Cfg: ANG.1G; Down
eth4: Down <s:o:m:e:M:A:C:_> <ExtSw P3, Logical 11> PHY_ID <0x20000003:0x03: On-chip 1G GPHY> Cfg: ANG.1G; Down
asmin@RT-AX56U:/tmp/home/root# ethctl eth1 phy-power down
asmin@RT-AX56U:/tmp/home/root# ethctl phy-map
eth0:   Up <s:o:m:e:M:A:C:_> <IntSw P0, Logical 00> PHY_ID <0x0007f008:0x08: On-chip 1G GPHY> Cfg: ANG.1G; Up 1G
eth1: Down <s:o:m:e:M:A:C:_> <ExtSw P0, Logical 08> PHY_ID <0x20000000:0x00: On-chip 1G GPHY> Cfg: ANG.1G; Down
eth2:   Up <s:o:m:e:M:A:C:_> <ExtSw P1, Logical 09> PHY_ID <0x20000001:0x01: On-chip 1G GPHY> Cfg: ANG.1G; Up 100M
eth3: Down <s:o:m:e:M:A:C:_> <ExtSw P2, Logical 10> PHY_ID <0x20000002:0x02: On-chip 1G GPHY> Cfg: ANG.1G; Down
eth4: Down <s:o:m:e:M:A:C:_> <ExtSw P3, Logical 11> PHY_ID <0x20000003:0x03: On-chip 1G GPHY> Cfg: ANG.1G; Down
asmin@RT-AX56U:/tmp/home/root# ethctl eth1 phy-power up
asmin@RT-AX56U:/tmp/home/root# ethctl phy-map
eth0:   Up <s:o:m:e:M:A:C:_> <IntSw P0, Logical 00> PHY_ID <0x0007f008:0x08: On-chip 1G GPHY> Cfg: ANG.1G; Up 1G
eth1:   Up <s:o:m:e:M:A:C:_> <ExtSw P0, Logical 08> PHY_ID <0x20000000:0x00: On-chip 1G GPHY> Cfg: ANG.1G; Up 100M
eth2:   Up <s:o:m:e:M:A:C:_> <ExtSw P1, Logical 09> PHY_ID <0x20000001:0x01: On-chip 1G GPHY> Cfg: ANG.1G; Up 100M
eth3: Down <s:o:m:e:M:A:C:_> <ExtSw P2, Logical 10> PHY_ID <0x20000002:0x02: On-chip 1G GPHY> Cfg: ANG.1G; Down
eth4: Down <s:o:m:e:M:A:C:_> <ExtSw P3, Logical 11> PHY_ID <0x20000003:0x03: On-chip 1G GPHY> Cfg: ANG.1G; Down
On eth1 there is a light controller unresponsive when the interface shows 'down' - as expected - hence the statement 'verified'.
For the cloud part on the other interface, that doesn't work - to be determined. However, the 'thank you' stands :)
 
...for continuity, if anyone runs into a similar issue...

The 'ethctl eth1 phy-power down' command indeed powers the router interface down - then the router restarts due to lack of connectivity to the device and after the reboot it's business as usual.

However, to put the 3rd party device in the required state as in "Unplug device's LAN cable, wait 1 sec and re-plug" the solution, as described in @JDB's link did the trick: 'ethctl eth1 media-type 10FD' - and then back to 100FD.

Thank you all!
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top