swconfig - VLAN configuration via GUI - 1 CPU port

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking
Author Message
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3908
Location: Germany

PostPosted: Sat May 17, 2025 8:39    Post subject: swconfig - VLAN configuration via GUI - 1 CPU port Reply with quote
You must be registered in the forum and logged in to see the attachments!

The thread is valid for all newer firmware builds ≥ 54429

At the moment the thread is mainly for Broadcom routers with 1 CPU port, but the settings also work for other routers with 1 CPU port.

Note: on Broadcom routers the interfaces eth1 + eth2 are the WLAN radios and not LAN interfaces
The VAPs (Virtual Access Points) on this router are called wl0.1 wl0.2 etc

If you have old CLI VLAN settings then remove them first or reset the router.

It is advantageous if you have a working WLAN connection when configuring the switch.
If you lock yourself out and the LAN ports no longer work, you can still connect to the router via WiFi.

The screenshots are from egc's E2000, so the port assignment shown via "swconfig dev switch0 show" may differ on other devices.

The "switch config tab" received a small update and the CPU port is now configurable.

The screenshot shows the "default configuration"



82222222290.png
 Description:
 Filesize:  134.18 KB
 Viewed:  241603 Time(s)

82222222290.png


Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3908
Location: Germany

PostPosted: Sat May 17, 2025 8:40    Post subject: Reply with quote
Simple VLAN 7 tagging on the WAN port.
No other settings are necessary.

(change the 7 to the desired VLAN ID)



82222222291.png
 Description:
 Filesize:  145.43 KB
 Viewed:  241602 Time(s)

82222222291.png


ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3908
Location: Germany

PostPosted: Sat May 17, 2025 8:41    Post subject: Reply with quote
"assign WAN port to switch"

If you have configured the router as WAP and don't need a WAN port you can assign the WAN port to the LAN.



82222222292.png
 Description:
 Filesize:  143.4 KB
 Viewed:  241601 Time(s)

82222222292.png


ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3908
Location: Germany

PostPosted: Sat May 17, 2025 8:41    Post subject: Reply with quote
two connected WAN ports
works like a 2 port switch in front of the router

(no it is not a "dual-WAN")



82222222293.png
 Description:
 Filesize:  113.63 KB
 Viewed:  241600 Time(s)

82222222293.png


ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3908
Location: Germany

PostPosted: Sat May 17, 2025 8:42    Post subject: Reply with quote
Simple LAN side port VLAN
Port 1-3 are in VLAN1
Port 4 is in VLAN3

By default all interfaces are bridged with br0
But you can assign e.g. VLAN3 to br1 and bridge it with a guest WLAN etc.

(small hint: if the CPU ports are tagged then VLAN interfaces are created automatically)



82222222294.png
 Description:
 Filesize:  270.89 KB
 Viewed:  241599 Time(s)

82222222294.png


ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3908
Location: Germany

PostPosted: Sat May 17, 2025 8:43    Post subject: Reply with quote
Trunk-Port Link between Main-Router and Wireless-Access-Point (WAP).

The regular LAN and the guest network are transported via the Trunk-Port.
The DHCP Server and DNS Server are located on the Main-Router

Main-Router:

WAN-Port = WAN
Port 1-3 = LAN
Port 4 = Trunk

Wireless-Access-Point:

WAN-Port = LAN
Port 1-3 = LAN
Port 4 = Trunk



Main-Router.png
 Description:
 Filesize:  263.03 KB
 Viewed:  241598 Time(s)

Main-Router.png



Wireless-Access-Point.png
 Description:
 Filesize:  262.37 KB
 Viewed:  241598 Time(s)

Wireless-Access-Point.png



_________________
Quickstart guides:

use Pi-Hole as simple DNS-Server with DD-WRT

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.2 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP


Last edited by ho1Aetoo on Wed Apr 15, 2026 9:23; edited 1 time in total
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3908
Location: Germany

PostPosted: Sat May 17, 2025 8:45    Post subject: Reply with quote
Net Isolation

The settings shown in the screenshots are sufficient.

The GUI setting "Net Isolation" isolates interfaces from br0
This means that no connection between br0 <-> br1 is possible.

However, if you have created several new bridges and want a more finely controlled isolation, manual firewall settings are necessary.

As already mentioned, "Net Isolation" only isolates against br0, which means that br1 and br2 are not isolated from each other, for example

Manual firewall rules for isolation.
Insert the firewall rules in the "Diagnostics.asp" tab. (for a trunk port setup with a WAP, the rules are placed on the main router!).

Full isolation - short version
Code:
## isolate bridges from the router itself (prevents WebIF/GUI access)
iptables -I INPUT -i br1 -m state --state NEW -j REJECT
iptables -I INPUT -i br1 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br1 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br1 -p tcp --dport 53 -j ACCEPT
iptables -I INPUT -i br2 -m state --state NEW -j REJECT
iptables -I INPUT -i br2 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br2 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br2 -p tcp --dport 53 -j ACCEPT

## isolate all bridges from each other
iptables -I FORWARD -i br+ -o br+ -m state --state NEW -j REJECT

allow management access from br0 to br1+br2 - long version
Code:
## isolate bridges from the router itself (prevents WebIF/GUI access)
iptables -I INPUT -i br1 -m state --state NEW -j REJECT
iptables -I INPUT -i br1 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br1 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br1 -p tcp --dport 53 -j ACCEPT
iptables -I INPUT -i br2 -m state --state NEW -j REJECT
iptables -I INPUT -i br2 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br2 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br2 -p tcp --dport 53 -j ACCEPT

## block connections from br1 to br0
## connection from br0 to br1 possible
iptables -I FORWARD -i br1 -o br0 -m state --state NEW -j REJECT

## block connections from br2 to br0
## connection from br0 to br2 possible
iptables -I FORWARD -i br2 -o br0 -m state --state NEW -j REJECT

## block connections from br1 to br2
iptables -I FORWARD -i br1 -o br2 -m state --state NEW -j REJECT
## block connections from br2 to br1
iptables -I FORWARD -i br2 -o br1 -m state --state NEW -j REJECT



7869158582.jpg
 Description:
 Filesize:  137.96 KB
 Viewed:  241595 Time(s)

7869158582.jpg


Display posts from previous:    Page 1 of 1
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum