Manually set media link speed in Tomato for LAN port(s)?

Discussion in 'Tomato Firmware' started by Techie007, Apr 4, 2018.

  1. Techie007

    Techie007 Serious Server Member

    I have about 200 feet of outdoor, gel-filled Cat5e cable running between two Tenda AC15 routers between buildings. Both routers are being used as access points, but I'm having some real randomness in the throughput at the far location (were talking random speed drops all the way down to <1 Mb/s that come and go by the second). Turns out that the link is running at Gigabit Ethernet speed, which I did not expect given the distance and grade of the cable (it's always run 100 Mb/s with previous cables). Is there a way I can drop the link speed to 100 Mb/s Full Duplex via software without modifying my Ethernet cable?

    I'm actually using the WAN port as a bridged Ethernet port to supply the routers, but they seem to ignore the WAN port speed setting in Advanced -> Miscellaneous when in bridged WAN mode.
  2. PetervdM

    PetervdM Network Guru Member

    you might try a robocfg statement in the init script, something like "robocfg port x media 100FD mdi-x auto" where x is the port being used. "robocfg show" reveals the current port configuration.
    Techie007 likes this.
  3. PeterT

    PeterT Network Guru Member

    Could you just add in a 10 / 100 switch at either end of the cable, plug the long cable into one port and the ap into another?

    Sent from my Nexus 7 using Tapatalk
    Techie007 likes this.
  4. koitsu

    koitsu Network Guru Member

    Dropping link speed to 100mbit or even 10mbit isn't going to solve your dilemma. The maximum physical cable (thus signal) length for copper Ethernet (regardless of 10mbit, 100mbit, or gigE) is ~325 feet / 100 metres. Before doing anything, you should probably determine if you're reaching that limit -- if you're no where near that, then your problem may simply be wiring going bad, an Ethernet port going bad (on one of the two routers), or some other problem.

    If it IS due to cable length, then you're going to need an Ethernet extender (effectively a signal/attenuation booster). The cheapest/easiest way to do this is to buy a generic AC-powered switch (2-port or more) and drop it in between the two network segments (ex. router1 <--> 4-port switch <--> router2). This is a pretty common technique in SoHo and SMB environments.

    If you're using tagged VLANs across your link, then you may find the above method might break your VLAN capability. The solution there is to buy a decent 4-port managed switch that is known to work OK with 802.1Q. The problem with "generic unmanaged switches" is that not all the vendors disclose up front if they work with tagged 802.1Q frames or not. I've used HP ProCurve 8-port managed switches reliably (look for the 1810G-8 (model J9449A) or (older/deprecated) 1410-8 (model J9661A) in the United States) -- just remember they're going to cost a lot more than a non-managed generic Netgear switch. :p You don't have to use ProCurve either, you just need an actual managed switch with tagged VLAN support -- I'm sure there are many vendors out there who do this now.

    If you're using untagged VLANs then you shouldn't need a managed switch (since there's no 802.1Q header added to the Ethernet frame).

    Another possibility might be to try and shorten the Ethernet cables you're using. For example, if your topology is something like: router1 <--> 6-foot Ethernet cable <--> wall RJ45 jack <--> 320 foot Ethernet cable <--> wall RJ45 jack <--> 6-foot Ethernet cable <--> router 2 ... and you're very close to the ~325 foot limit, then replace the 6-foot cables with 3-foot or 1-foot cables. It might be "just enough" to get it working. If this works, be sure to label the cables/wall jacks so that someone doesn't come along and go "oh this cable is so short, let's use a longer one!"

    Otherwise, you need to start looking at using multimode fibre for your "long distance" run and then get some media converters (these are usually AC-powered) on both ends to convert from fibre to copper. Multimode fibre has a maximum length of about 1000 metres @ gigE speed. TP-Link makes some media converters that do gigE for about US$55 each (fibre connector is SC type).

    Be aware that robocfg doesn't always work correctly when adjusting speed and duplex on some models of onboard switches in routers. It's a utility not written by Broadcom. It's fairly hit-or-miss.
    Last edited: Apr 4, 2018
    Techie007 likes this.
  5. Techie007

    Techie007 Serious Server Member

    That's what I was looking for. Unfortunately, everything except for the "media" argument appears to work. I can enable/disable the port, turn jumbo frames on/off, but any attempt to change the speed does nothing. robocfg show continues to report 1000FD for all the ports in question after configuration.

    @PeterT: Yes, I could do that. I've kindof done that before when I used cheaper wire/had longer runs and routers would negotiate 100 Mb/s and I needed them to run at 10 Mb/s: I'd insert an old 10 Mb/s Ethernet Hub at one end to drop the speed to 10 Mb/s, and then everything would work swimmingly. However, in this case, while I will probably try that temporarily to verify that the link speed is the issue, I'll just cut an end off and recrimp it without wires 4, 5, 7, 8 to make it behave itself.

    @koitsu: If the link were significantly longer, I would look into these options (or wireless options). However, I know I am nowhere near the limits of this cable at 100 Mb/s, but near/past the limit for Cat5e at 1000 Mb/s. The router is just negotiating the wrong speed, and I don't need Gigabit Ethernet speeds here. The previous cable wasn't quite as good as this one, and it always negotiated 100 Mb/s. And before that, I had used some cheap untwisted Cat4 wire that would negotiate at 100 Mb/s but not work at all unless I inserted a hub and ran it at 10 Mb/s (or connected it to a computer and manually set the speed to 10HD). You were right about robocfg not working. Wish it would, as that would've been the perfect solution. Right now I am in the process of debugging whether the issue is the long link, or WiFi issues with this router. I bought it used and it is possible that it may have some flaw.
  6. koitsu

    koitsu Network Guru Member

    Use of CAT4 cabling (2 pairs / 4 wires) is why your previous 802.3-negotiated link was at 100mbit/full. You upgraded to CAT5 or CAT5e (doesn't matter which), which is why 802.3 autoneg is choosing gigE. Autoneg is doing the Right Thing(tm) here -- nothing is as you say "negotiating the wrong speed". Forcing 100/full won't solve anything in this particular case.

    If you're nowhere near the 325 foot / 100 metre length limit for Ethernet, then troubleshooting what's going on between the two routers is definitely the next step. If they both had reachable IP endpoints, then it would be as easy as having each ping the other and let that run for an hour or so. If no packet loss then the issue isn't with that link. Ports going bad is certainly possible.

    And yeah, now you know why I don't recommend robocfg to anyone. Any time someone mentions it I start rolling my eyes, haha.
  7. Monk E. Boy

    Monk E. Boy Network Guru Member

    Since they're both the same model and they're both access points, you could try flipping which one is in which location. If the problem changes locations then you know the problem is the new router. Otherwise you should look at something related to the link.

    1Gb uses all four pairs in a >Cat5 cable, 100Mb only uses two pair. If this cable was custom made with ends crimped on by hand its possible there's an issue with one of the pairs. It's unlikely that it would come and go like this but it's possible.

    So we're talking a long outdoor run of twisted pair cabling... is the cable run alongside any AC lines or fluorescent lights? There are installation requirements for running ethernet, and those two can introduce EM interference that will create problems without a sufficient air gap between them (this is why cable runs in drop ceilings are usually located at the top of the drop ceiling and run in bundles, so they can be kept away from interference sources). A decent connection tester can spot this but a decent connection tester is at least a couple hundred if not few hundred dollars (US).
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice