Port 4 add to Wan

Hello, I am trying to get Port 4 on my router to forward WAN leases too.
Not sure if that is done via Vlans or if there is another way to do this via Luci.

Thank you

The details here depend on your hardware. Also note that your upstream network may not provide any additional leases. Specifically, many IPv4 residential connections only offer a single ISP issued/IP address to the subscriber. So even though your OpenWrt config can be setup to effectively be a simple switch between the wan and port 4 (and the router's logical wan network interface), the device connected to port 4 may not get an address. (this isn't typically an issue if the upstream network is providing RFC1918 addresses as would be found in a home network).

But, we can certainly show you how it's done.

Let's gather the necessary info:

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network

You can bridge more devices into wan after making that a bridge BUT you will not be able to bridge wan and LAN this way.

root@OpenWrt:~# ubus call system board
{
        "kernel": "6.6.110",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Linksys E7350",
        "board_name": "linksys,e7350",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "24.10.4",
                "revision": "r28959-29397011cc",
                "target": "ramips/mt7621",
                "description": "OpenWrt 24.10.4 r28959-29397011cc",
                "builddate": "1760891865"
        }
}
root@OpenWrt:~#

I understand what you are saying but for what I am trying to build, the device in front of the openWRT router has DHCP enable and I should be able to get at least 20 more leases from it. My issue is trying to send traffic from that Modem/router down the line using a single cable without using a switch. Thanks for the help on this.

Please use the "Preformatted text </>" button for logs, scripts, configs and general console output (red circle; this works best in the 'Markdown' composer view in the blue oval):

Screenshot 2025-10-20 at 8.14.14 PM

Essentially you want to use a new router as a bridge and the other router providing DHCP service aka Wired bridge aka dumb AP

Yes, and apologies for not using the pre-formatted text -I will used it next time posting code. Thank you

Do you want the devices connected to ports lan1-lan3 to be routed via the E7350? In other words, should those devices be on a separate subnet (as a function of the routing on the E7350) than the upstream network that connects to the wan (and "passes through" to port lan4)?

The router is a Linksys E7350. Just flashed to 24.10.4. No configurations or anything yet. My plan is to used it for a lab network, but I need a second WAN IP ( from the modem/router) at a different location (downstairs) for testing, instead of using a switch.
The picture describes exactly what I am trying to do.

I understood the intent of bridging the wan port and port lan4 from the initial discussion. My followup was just to ensure that you plan to use the E7350's other 3 lan ports for a separate network (and not simply as a bridged AP/switch).

That said, please post the network config file (in text form, using the </> code formatting) here and I'll show you how to achieve this (it requires the use of bridge-vlans).

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdfc:f794:1111::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config device
        option name 'lan1'
        option macaddr '80:69:1a:1a:X:X'

config device
        option name 'lan2'
        option macaddr '80:69:1a:1a:X:X'

config device
        option name 'lan3'
        option macaddr '80:69:1a:1a:X:X'

config device
        option name 'lan4'
        option macaddr '80:69:1a:1a:X:X'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'wan'
        option macaddr '80:69:XX:1a:XX:b1'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

Yes, I will used the other three ports from the DHCP server on the regular configuration.

Add the wan port to the existing br-lan:

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'wan'

Add two bridge-vlans:

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan3:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '2'
        list ports 'lan4:u*'
        list ports 'wan:u*'

Edit the lan interface to use device br-lan.1:

config interface 'lan'
        option device 'br-lan.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

And edit the wan/wan6 interface to use br-lan.2:

config interface 'wan'
        option device 'br-lan.2'
        option proto 'dhcp'

config interface 'wan6'
        option device 'br-lan.2'
        option proto 'dhcpv6'

Restart and you'll have ports lan1-3 on the standard lan, and port lan4 will essentially be a switch-port for the wan.

1 Like

Hello, After looking at your code, I was able to configure the router the way I needed.

I did everything via Luci, and is working.
Unfortunately, I did not use the terminal to accomplish this - somehow the code to edit the interfaces did not work for me -
root@OpenWrt:~# config device -ash: config: not found root@OpenWrt:~#
I believe there is something that I am missing to configure this router via the Terminal, also I looked online and it seems that people are afraid of the terminal. I am not an expert, but to me is all about learning. If you can share where one can got about learning the different commands. That would be AWESOME, also really appreciate you helping on this. Man your rock!!!! :sweat_smile:

Glad it is working.

The config guidance was in the form of the raw config file syntax, not commands to enter into the CLI. I personally do most my my edits using the vi text editor and then I can make those exact changes. You can use the CLI using the UCI commands instead (equally valid, and has some potential advantages, too), but those have different syntax.

The CLI and/or direct file editing is certainly something that requires a bit more comfort vs the GUI. Those who use OpenWrt and/or Linux regularly probably jump right to the text based options, while those newer to the platform(s) may prefer the GUI.

For the UCI config commands, it's well documented here:

Like I said, I directly edit the config files the vast majority of the time. For that, any tutorial on the vi text editor will be useful for the actual navigation of the editor itself.

And from the perspective of the specific changes I recommended, it's also documented in general, but my experience with the platform makes it second nature. It can be for you, too, as you play around and learn, just like with any other new set of skills.

Meanwhile:

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

Man you are god sent. :smiling_face_with_sunglasses:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.