Setting ethernet link speed on TPLink not working

I am using the TP-LINK Archer C7 v5 with Gargoyle and have need to hard set the Ethernet port speed for one port. I have tried swconfig in every imaginable way but keep getting the error "Failed to set attribute:operation not permitted". The guys over at gargoyle were unable to figure this out, so suggest I go direct to the source!

Openwrt used is: 18.06.5 (Kernel 4.9.198, 4.14.151)

Here is what happens:

root@Gargoyle:~# swconfig dev switch0 port 3 show
Port 3:
mib: MIB counters
RxBroad : 341253
RxPause : 0
RxMulti : 157000
RxFcsErr : 0
RxAlignErr : 0
RxRunt : 0
RxFragment : 0
Rx64Byte : 1256392
Rx128Byte : 680716
Rx256Byte : 77643
Rx512Byte : 85377
Rx1024Byte : 74509
Rx1518Byte : 114657
RxMaxByte : 0
RxTooLong : 0
RxGoodByte : 406128106 (387.3 MiB)
RxBadByte : 0
RxOverFlow : 0
Filtered : 0
TxBroad : 40045
TxPause : 0
TxMulti : 4167
TxUnderRun : 0
Tx64Byte : 181206
Tx128Byte : 417665
Tx256Byte : 46950
Tx512Byte : 40868
Tx1024Byte : 37476
Tx1518Byte : 628892
TxMaxByte : 0
TxOverSize : 0
TxByte : 966041738 (921.2 MiB)
TxCollision : 0
TxAbortCol : 0
TxMultiCol : 0
TxSingleCol : 0
TxExcDefer : 0
TxDefer : 0
TxLateCol : 0

enable_eee: 0
igmp_snooping: 0
vlan_prio: 0
pvid: 1
link: port:3 link:up speed:10baseT full-duplex txflow rxflow auto

root@Gargoyle:~# swconfig dev switch0 port 3 set link "duplex half speed 100 autoneg off"
Failed to set attribute: Operation not supported

root@Gargoyle:~# swconfig dev switch0 port 3 set link "duplex full speed 100 autoneg off"
Failed to set attribute: Operation not supported

Cross post link: https://www.gargoyle-router.com/phpbb/viewtopic.php?f=11&t=14071

I'm pretty sure that control of this feature of the switch chip has not been implemented in swconfig thus it is not possible to force the Ethernet line speed in OpenWrt.

Also you're using a very old version but again I don't think speed selection exists in new versions either.

Forcing a speed can only decrease the speed. The auto-negotiation would increase the speed from 10 to 100 or 1000 if it could. The problem here is almost certainly that the device on the other end is only allowing 10. If you were to plug that device into a direct to CPU port on a laptop / desktop running Linux you could use ethtool to examine the advertised and actual speed.

and from the cross-post

This is a link between two routers, across a buried ethernet cable about 50 yards long. When we first installed the link (with different routers) it ran at 100, but now it always falls back to 10 after even a few seconds of traffic (if it comes up at 100 at all).

That cable is faulty (probably waterlogged), it is only going to get worse. Replace the cable or consider a wireless link. Do check for termination problems such as split pairs or open connections. It is impressive what Ethernet can still achieve even with defective wiring from the outset.

2 Likes

Or perhaps powerline adapters, if the buildings have a shared power grid.

2 Likes

Ok, Thanks everyone!

I had a feeling its a bad cable, just thought it odd that there are NO errors at 10mbps at all, workes perfect 24x7, yet absolutely refuses to go to 100. I wanted to force it to 100 and see if it worked even with some errors. I know that it used to. So there is certainly some degradation.

I hope to upgrade both ends soon.