Assign WAN Port To LAN Switch

In DD-WRT under Client or AP modes -- where the wired Ethernet WAN port is not used -- the port may be assigned to the LAN switch with a simple GUI checkbox selection of "Assign WAN port to switch."

Can this be done in OpenWRT? If yes, how does one do it?

Yes, you simply need to change the switch configuration accordingly (remove the wan portfrom the wan vlan and adding it untagged to the lan one). Unless you really need the port, I'd usually suggest to ignore it though.

1 Like

yes change switch connfiguration
In AP mode WAN port is required unless you are using radio as uplink

make a network bridge with all the physical ports and name it wan
make Lan network withonly wirelss interface in it

check for the relevant changes in firewall.sh
done

Thank you slh and arjunet. I want to assign the WAN port to the LAN switch only because it can be done. As an exercise. Is there any reason not to do this?

Can anyone give me detailed directions on what sequence of commands (settings) to use? Moreover, I am completely ignorant of the methods and syntax of the command line mode. Can anyone direct me to a router command line 101?

Yes you can do that ..if it is what you want to achieve

It depends on your hardware. Some hardware has a separate Ethernet port on the CPU that goes directly to the WAN port on the back of the router. In that case you would go to the network configuration, physical settings, and move the WAN ethernet port from the wan network to the lan network.

In other cases, especially gigabit routers, all the ports on the back go through a hardware switch. There you would go to the Network-Switch page and turn off the WAN port in the WAN VLAN, and turn it on (untagged) in the LAN VLAN with the other LAN ports.

DDwrt tries to simplify configuration by giving the user preset "modes" for common use cases. OpenWrt is more toward total flexibility. You can set anything to do anything, even if that is going to totally break it. You can add or edit a file anywhere in the filesystem rather than having only a "nvram" database.

If you're using command line, the most direct approach is to edit the config files. Search the OpenWrt wiki and find the UCI pages. These explain the options possible in each file.

Please understand the question before answering it. OP needs to use the WAN port as a LAN port. They do not need to configure all the ports as WAN. There is a marked difference in the config.

There are two reasons not to do this, unless you really need the fifth port to be usable as an additional LAN port.

  • you can get it wrong, soft-bricking the device or creating a number of subtile problems that might haunt you for quite a while
  • if the WAN port is a dedicated ethernet interface and not connected to the same hardware switch as the LAN ports, you'd need to bridge it with the switch - this would required the data going through the SOC's CPU for the bridging to work, creating a serious bottleneck in terms of performance

If you are aware of the consequences, the technical implications (dedicated interface vs switch port) and actually need an additional LAN port, there's no reason not to do this - but it shouldn't be done "just 'cause" by a beginner.

dumb AP examples, but read and heed the above.

Thank you for taking the time with the caveats. I'll take my time. Nevertheless I live by the precept "no guts, no glory." After all, how does one move from beginner to experienced without doing what can be done even if it need not be done? This stuff should be not all that hard. I mean, really, how arcane can it be?

A month of serious study and experimentation should be more than enough to graduate beyond the clueless novice level. This isn't rocket science. At least it does not appear to be. I was building DEC PDP11s and LSI-11s linked on fiber-optic serial highways which were in turn connected to CAMAC equipment long before the Internet was a gleam in Al Gore's eye. (My lame attempt at humor, sorry.)

It's not rocket science, but you probably learn a lot by going to the Network > Switch page on LuCi and posting a screenshot, we can tell you how your device is wired up by that.

This is a good beginner project. Log in to the router on wifi so that if you misconfigure the Ethernet you would still be able to connect.

If you do have a separate eth port and thus a software bridge, connect whatever uses the least bandwidth to that port.

@dkwalton hi , please go through the link once

there is nothing wrong if you dont need any WAN concept and making a custum project having only LAN

"Ask and you shall receive." Thank you arjuniet.

1 Like

YES! That is seriously good advice. Logging n via WiFi so as to maintain a connection. See, I should have thought of that if I knew what I were doing. Bits and pieces make a whole.

1 Like