How can I change my router's lan port to wan port?

I'm using TP link TL-WR840N v2 router. Somedays ago during storm my router's wan port got damaged and it's not working. My other lan ports are okay.

I want to make one of lan ports to wan port. How can I do that? I installed OpenWrt in my router by firmware upgrading last night. I'm still novice/new in OpenWrt. So your kind helping will be much appreciable.

Is it just the WAN port that got damaged, or the SoC itself?

If the other ports are working, you can reconfigure the switch using LuCI. Take note of the settings of the WAN port in the switch-configuration section, copy them to the port you want to use, and remove all settings from the "old" WAN port.

That's probably not the complete case; but I'm glad some ports are still working for you!

On the web GUI in Network > Switch just assign another port to WAN.

  • Simply choose another port
  • Turn its VLAN 1 to off
  • Turn its VLAN 2 to untagged
  • Save & Apply
  • Done!
1 Like

that's the options Im seeing in my case.
In lan3 I have connected a cable to connect and configure openwrt to my pc.

Now, I want to use lan3 as my new wan port what to do?

If you're not seeing anything in the "2" row, you've got some basic configuration problems to start. What you're showing there doesn't connect the CPU "WAN" sub-interface to any ports at all.

Typically, with a single-Interface SoC, I'd expect something like what lleachii posted. If you match his screenshot, to you "magically" have your WAN back?

1 Like

thats the thing im also worring.

where is the "WAN" in my config

https://forum.archive.openwrt.org/viewtopic.php?id=16148

I read this post.
But how can i configure /etc/config/network ??
where is it?

If you don't know where is /etc/config/network then you probably shouldn't touch it. Editing config files manually can easily break things if you don't know what you are doing. Using uci commands is a bit safer.

Aside from the WAN port that is not showing, did you try just swapping one LAN port from VLAN1 to VLAN2 as @lleachii explained and see if it works?

1 Like

I selected another port. (lan1)

  • Turned its VLAN 1 to off
  • Turned its VLAN 2 to untagged

then plugged my net cable into lan1 but lan1 isnt working as wan -_-

Should be 2.

I advise not taking support advice from an 11 year old archived post.

  • You shouldn't have to create WAN.
  • Where is your previous WAN setting?
  • Can you show the picture?
1 Like

Also, does it show as plugged in the GUI? There is a chance that the port annotation in the GUI is the opposite of the labels on the case.

1 Like

its the default setting. (In LAN#\3 I have connected a cable to connect and configure OpenWRT to my pc.)

then I changed the configuration like it's told in the above reply. ( I tried to use LAN1 as my new wan)

It doesn't show a plugged cable!

Incorrect!! VLAN 1 is originally configured as the LAN. See Network > Interfaces.

My instructions stated to make/use a VLAN 2.

Have you tried resetting the router to defaults?

On this model the WAN port has its own connection to the CPU. The network settings are:
WAN : eth0
LAN: eth1.1

Now the eth0 port is burned out, so is go to Network--WAN--Physical settings and connect it to eth1.2 (create a new interface at the bottom) instead. This sends WAN traffic toward the switch with a tag of 2.

You must have a VLAN 2 in the switch and have that VLAN connected tagged to the CPU. In other words both VLANs are tagged to the CPU, but untagged to the physical port(s) you want them to appear on. Have only one VLAN on each physical port. It needs to be off on the other VLANs.

I inserted my broadband cable into LAN1 but still, no blink in led that... broadband cable is plugged into the router

It should be pointed out that if lightning hit your installation hard enough to damage the router, the modem was also likely damaged.

And I would not count on everything else on the router still working. All the Ethernet cables go into the same chip, the AR9344, which is also the CPU, the switch, and the wifi.

Switch configuration looks good now but you must also attach the WAN network to eth1.2, which did not exist before. The default is to use eth0, which leads directly to the blue "WAN" port and doesn't involve the switch.

2 Likes

I did reset the router in the first place. But didn't solve.

what did you mean by that? i made VLAN 2 and made LAN1 off in VLAN1 and untagged in VLAN2

And did you also create a WAN Interface in Network > Interfaces?

1 Like