OpenWrt Forum Archive

Topic: WRT54GL: Broken WAN port, possible to use LAN port instead?

The content of this topic has been archived on 7 Jan 2015. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

I have got a WRT54GL, Version 1.1, and after a storm, some LAN ports (1 and 3) and the WAN port seem to be defective (I simply get no link). LAN ports 2 and 4 are still working as a charm (how this can happen beats me wink ), WiFi is still working, the Webinterface is there, etc. Therefore, it would be great if I could get the router to use one of the LAN ports for WAN instead---one LAN port is enough for me (I'll use a switch anyway), but I'd hate to have to buy a new router...

Is this at all possible? If it is, does anyone by any chance have any pointers on how this could be achieved? I searched the firmware (just upgraded the router to the latest X-Wrt), but I couldn't find anything...

Thanks for any input,
finr.

Yeah, that's possible. It can be configured by changing the vlan0 and vlan1 options in the switch section in /etc/config/network.

Using UCI (example is for a WRT54GL v1.1 and OpenWrt Kamikaze):

uci set network.eth0.vlan0="2 5*"
uci set network.eth0.vlan1="0 5"
uci commit network && reboot

After a reboot LAN (vlan0, eth0.0) is LAN 2 now and WAN (vlan1, eth0.1) is LAN 4.

The mapping is a bit strange, because it's in reverse order sad

WAN   = Switch port 4
LAN 1 = Switch port 3
LAN 2 = Switch port 2
LAN 3 = Switch port 1
LAN 4 = Switch port 0

(Last edited by forum2006 on 18 Nov 2007, 16:15)

Yes, thank you very much, you just saved me 60 bucks smile!

For some reason the uci settings did not work for me (seems it did not store the changes), but setting the same stuff using the WebIf everything works great smile.

Thanks again!

finr wrote:

For some reason the uci settings did not work for me (seems it did not store the changes), but setting the same stuff using the WebIf everything works great smile.

You may forgotten to commit the UCI changes with 'uci commit network'.

Hm, no, I double-checked the commands. What was puzzling is that my router doesn't even have a file /etc/config/network. Well, anyway, I'm glad that I was able to revive the router smile

Just an update, I tried using the UCI commands and fudged it with not using "" quotes on a remote router and had a heck of a time explaining to a non-techy how to put it into fail safe mode (holding reset button for 2 seconds after the DMZ light powers up).

Anyhow, in the latest Kamakazie (7.09) you can edit it in the configuration file /etc/config/network

config switch eth0
        option vlan0    "0 1 2 3 5*"
        option vlan1    "4 5"

much easier then commands.

The discussion might have continued from here.