I have a hex PoE where the uplink to the rest of my home network occasionally (but regularly) drops from 1G to 100M - I'm assuming this is the ethernet autonegotiation doing its thing and the connection isn't quite up to par. This connection is also the PoE power source for the main switch at the house.
If I unplug and reconnect the physical cable, the link comes back up at 1000M every time. It stays that way for anywhere from a few days to a few weeks, which makes it pretty hard to troubleshoot.
What I'd like to have is a way to reset the autonegotiation / ethernet portion of the interface so that it re-negotiates the link speed as if it were dis/reconnected... but WITHOUT actually disconnecting the interface, because this removes power from the device and causes a reboot which is far more disruptive.
Please don't suggest re-wiring the house so that it's not the same interface providing power and flaky on the link speed - I already know how to "fix" it that way but I'm hoping there is a command somewhere in the mikroTik OS that will force a renegotiation. Dealing with a couple of seconds of interruption and a link flap is completely acceptable for my use case
I guess I should have been much more focused with my question... I'll try again, please pretend I never provided any additional context above.
"Is there a way to force an ethernet autoneg "re-negotiation" via the CLI, specifically WITHOUT physically disconnecting/reconnecting the cable from the router?"
EDIT: I know it's frustrating to get one word answers, but really, you give nothing to go on. If you want to do this automatically, that can also be arranged (if you're willing to live with some interruption in connectivity.)
I'd much rather suggest that you try to find out what's causing link re-negotiation. It might just be a matter of replugging all the connectors repeatedly ten times. Reterminating connections. If you have a keystone, stripping 1cm from each wire and repunching, etc.
Specifically, the "jump" between 100 Mb and 1 Gb (electrically) is that for 100 Mb speed only 4 wires are used.
For 1 Gb ALL 8 wires are needed.
On 100 MbPoE it was common (and Mikrotik still largely uses it) so-called "Mode B" where the 4 wires delivering the PoE are the 4 ones not used, 4,5 and 7,8. (Mode A use the same cables used for signal on 100 Mb, 1,2 and 3,6).
If one of 1,2,3,6 wires are not connected properly, you should have no-link.
If any of 4,5,7,8 are not connected properly you should have the down-negotiation from 1 Gb to 100 Mb.
I would first experiment what happens forcing the connection at 1 Gb.
And check what the built in cable test tool in the Mikrotik has to say.
Then, as Lurker888 suggested try disabling the interface and re-enable it, though I have no idea if this also flips the PoE and so it would make the connected devices power down/reboot.
troubleshooting the reversion to 100M is a separate, ongoing problem. I work for a very large router and switch manufacturer so I was able to borrow a very nice (and very expensive) fluke cable tester in addition to the utility built into mikrotik (which, by the way, is awesome -- we should do this!) No diagnostic tool I've been able to get my hands on suggests that the cable/connections aren't good. And given that it's sometimes multiple weeks between when it connects (ALWAYS at 1Gbps) and then degrades back to 100M makes it nearly impossible to troubleshoot "live".
I was looking for some set of commands that would allow me to automate a simple watcher python script that more or less says:
"check the link status. if it's not currently 1Gbps, [[do something that fixes it]] and email the boss"
The [[do something]] is what I was looking for..... the enable / disable might do the trick, I can confirm that at least on my router this does NOT bounce the PoE, which is awesome.
What I ended up doing instead was explicitly removing the advertised 1Gbps capability
If disabling also turns off power, changing the advertised speeds to not include 1G half and 1G full then applying, the changing back to include 1G half and 1G full will cause an RB760iGS running 7.19.4 to renegotiate first to 100Mb full then to 1Gb Full.
# test cable-diagnostics tdr interface gi1/0/1
TDR test started on interface Gi1/0/1
A TDR test can take a few seconds to run on an interface
Use 'show cable-diagnostics tdr' to read the TDR results.
# show cable-diagnostics tdr interface gi1/0/1
TDR test last run on: September 13 20:40:19
Interface Speed Local pair Pair length Remote pair Pair status
--------- ----- ---------- ------------------ ----------- --------------------
Gi1/0/1 1000M Pair A 7 +/- 10 meters Pair B Normal
Pair B 7 +/- 10 meters Pair A Normal
Pair C 7 +/- 10 meters Pair D Normal
Pair D 7 +/- 10 meters Pair C Normal
Unfortunately the MikroTik built-in cable test isn't what it used to be...
I presume it still delivers the test results available from switch chips, but for the usual router devices it only shows a "link ok" status and completely broken cable pairs, bit those nice length estimates.