The WAG54G is a DSL router made by Linksys. After a while it usually start dropping connexions. Hopefully there is an hardware solution: replace one of the capacitors of the WAG54G.

But if you don't have appropriate gear or don't want to do this kind of surgery, you can still try to reduce the router ethernet speed, slowing it down from 100Mb/s to 10Mb/s.

Slow down a network interface with debian

To slow down the router network we must first be able to communicate with it. To do so we will force our computer's network interface to 10Mbits/s. Caution: your computer must be directly connected to the router. If a switch is connected between your machine and your router it will continue talking to the router at 100Mbits/s.

Under debian you can change a network interface speed with ethtool.

~$ apt-get install ethtool
~$ ethtool -s eth1 autoneg off speed 10

You should now be able to ping the WAG54G router. If not, your only option is to fallback to the capacitor replacement (or buy a new router) Frown.

Force a WAG54G router to 10Mbits/s with OpenWRT

 

To change your network interface speed on OpenWRT you have to install the robocfg package.

~$ ipkg install robocfg

The show command display the current state of your network ports:

~$ robocfg show
Switch: enabled
Port 0(W): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 1(4): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
Port 2(3):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
Port 4(1): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
VLANs: BCM5325/535x enabled mac_check mac_hash
vlan0: 1 2 3 4 5t
vlan1: 0 5t
vlan2:

Set the port 1 to 10Mbits/s with:

~$ robocfg port 1 media 10FD

You can check the result immediatly:

~$ robocfg show
Switch: enabled
Port 0(W): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 1(4):  10FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
Port 2(3):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
Port 4(1): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
VLANs: BCM5325/535x enabled mac_check mac_hash
vlan0: 1 2 3 4 5t
vlan1: 0 5t
vlan2:

You just have to slow down the speed on all the router port to be able to connect to the WAG54G from your other computer. Once done you set back your computer network interface to auto-negociation.