Configuring VLAN

Post new topic   Reply to topic    DD-WRT Forum Index -> X86 based Hardware
Author Message
seneka21
DD-WRT Novice


Joined: 12 Nov 2022
Posts: 32

PostPosted: Wed Apr 10, 2024 0:36    Post subject: Configuring VLAN Reply with quote
Hi,

I use an activated DD-WRT r55678 (dd-wrt_x64_full_vga_2GB) firmware.

Despite multiple hours spent on various guides search and trial - error attempts I didn't manage to create a working VLAN on eth1 (for safety reasons - IoT network).

The Networking configuration settings as in the attached picture (default settings).

It may be helpful to mention that the command "nvram show | grep vlan.*ports"
returns "size: 21553 bytes (109519 left)
vlan3ports=1"

I would be grateful if smn could give me some help in this - preferably through command line.



VLAN Configuration.png
 Description:
 Filesize:  458.39 KB
 Viewed:  2597 Time(s)

VLAN Configuration.png


Sponsor
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2151
Location: WV, USA

PostPosted: Wed Apr 10, 2024 4:10    Post subject: Reply with quote
A screenshot of your Switch Config tab would also be useful. Did you set that up?
_________________
- Linksys EA8500: I-Gateway, WAP/VAP 5ghz only. Features: VLANs, Samba, WG, Entware - r60xxx
- Linksys EA8500: 802.11s Secondary w/VLAN Trunk over 5ghz - r60xxx
- Linksys MX4300: 802.11s Primary w/VLAN Trunk over 5ghz. 2.4ghz WAP/VAP only - r60xxx
- Linksys MX4300: (WAP/VAP (7)) Multiple VLANs over single trunk port. Entware/Samba r60xxx
- Linksys MR7350: WDS Station for extended Ethernet r60xxx
- Linksys MR7500, MX8500: None in production. Just testing. r60xxx
- OSes: Fedora 40, 10 RPis (2,3,4,5), 23 ESP8266s: Straight from Amiga to Linux in '95, never having owned a Windows PC.
- Forum member #248
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3976
Location: Germany

PostPosted: Wed Apr 10, 2024 7:45    Post subject: Reply with quote
x86 do not have a "switch config" tab because they do not have a switch...
VLANs can be easily configured on x86...
See sticky

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1283409#1283409

Quote:
a second variant to tag the WAN port
In this example it is not done by the switch but by the processor.


It is for the WAN port, but you can also use any other port - it doesn't matter.

unbridge eth1
create VLAN tag for eth1 (eth1.x)

do whatever you want with eth1.x
it is usually recommended to work with bridges

create a new bridge br1
bridge eth1.x with br1
create a DHCP server for br1

etc

you can also omit the bridge and configure the DCHP server directly for eth1.x.

_________________
Quickstart guides:

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

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.5 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP
seneka21
DD-WRT Novice


Joined: 12 Nov 2022
Posts: 32

PostPosted: Wed Apr 10, 2024 16:22    Post subject: Reply with quote
Dear ho1Aetoo and lexridge thank you a lot.

By following your instructions I have done some configurations in Networking tab in order to attach any device on physical port Eth1 to VLAN7.(attached picture)

Although everything seems to me OK none of the devices connected on physical port Eth1 gets online.

I have tried a lot to find a way around with no success Sad

I rely on your expertise and your goodwill for some further help:-)

Have a nice day



networking VLAN.png
 Description:
 Filesize:  566.78 KB
 Viewed:  2561 Time(s)

networking VLAN.png


ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3976
Location: Germany

PostPosted: Wed Apr 10, 2024 16:36    Post subject: Reply with quote
Everything looks right.

A few notes:

disable STP on br1
enable net isolation on br1
delete the additional DHCP server for br0

Which IP address range does the normal LAN network have?
(hopefully a different one than br1)

second question do the devices connected to eth1 get IP addresses in the range 192.168.107.1/24?

and finally the price question, is there a device connected to eth1 that is capable of VLAN7 tagging?

this is a tagged VLAN
only devices that can handle IEEE 802.1q, such as managed switches or other routers, can be connected to a tagged port.

If you want to connect a normal end device to the port that is not capable of tagging, then it will not work.
But then you don't need a tagged VLAN... then you can delete eth1.7 again and bridge eth1 with br1.

_________________
Quickstart guides:

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

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.5 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2151
Location: WV, USA

PostPosted: Wed Apr 10, 2024 16:58    Post subject: Reply with quote
ho1Aetoo wrote:
x86 do not have a "switch config" tab because they do not have a switch...

Duh! I knew that. Wasn't paying enough attention when I posted. Sorry for the bad information.

_________________
- Linksys EA8500: I-Gateway, WAP/VAP 5ghz only. Features: VLANs, Samba, WG, Entware - r60xxx
- Linksys EA8500: 802.11s Secondary w/VLAN Trunk over 5ghz - r60xxx
- Linksys MX4300: 802.11s Primary w/VLAN Trunk over 5ghz. 2.4ghz WAP/VAP only - r60xxx
- Linksys MX4300: (WAP/VAP (7)) Multiple VLANs over single trunk port. Entware/Samba r60xxx
- Linksys MR7350: WDS Station for extended Ethernet r60xxx
- Linksys MR7500, MX8500: None in production. Just testing. r60xxx
- OSes: Fedora 40, 10 RPis (2,3,4,5), 23 ESP8266s: Straight from Amiga to Linux in '95, never having owned a Windows PC.
- Forum member #248
seneka21
DD-WRT Novice


Joined: 12 Nov 2022
Posts: 32

PostPosted: Wed Apr 10, 2024 19:04    Post subject: Reply with quote
ho1Aetoo wrote:
Everything looks right.

A few notes:

disable STP on br1
enable net isolation on br1
delete the additional DHCP server for br0

Which IP address range does the normal LAN network have?
(hopefully a different one than br1)

second question do the devices connected to eth1 get IP addresses in the range 192.168.107.1/24?

and finally the price question, is there a device connected to eth1 that is capable of VLAN7 tagging?

this is a tagged VLAN
only devices that can handle IEEE 802.1q, such as managed switches or other routers, can be connected to a tagged port.

If you want to connect a normal end device to the port that is not capable of tagging, then it will not work.
But then you don't need a tagged VLAN... then you can delete eth1.7 again and bridge eth1 with br1.


Firstly I applied your remarks with no success Sad .Moreover it may be helpful to mention that:
1. My normal LAN network have basic IP address 192.168.1.1/24 starting at 192.168.1.2 with Maximum DHCP Users 240. The br1 Network have basic IP address 192.168.107.1/24 starting at 192.168.107.2 with Maximum DHCP Users 240.
2. The IoT network on eth1 is based upon an ASUS RT-AC68U with factory firmware configured as Access Point with factory default settings.
3. The smart devices, connected through the aforementioned AP, are mostly of the sonoff smart switch type, Alexa echo dot, and some wifi capable devices like A/Cs and kitchen appliances. So I cant be sure if they are capable of tagging or not.

Secondly I followed the alternative proposed solution by bridging eth1 with br1 (1st Picture) which seem to work i.e. I cannot ping from one virtual network to the other.(2nd Picture)

I feel really indebted Very Happy

P.S. Should I denote this topic as SOLVED or smth?



1st Picture_.png
 Description:
 Filesize:  554.05 KB
 Viewed:  2534 Time(s)

1st Picture_.png



2nd Picture.png
 Description:
 Filesize:  968.92 KB
 Viewed:  2534 Time(s)

2nd Picture.png


ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3976
Location: Germany

PostPosted: Wed Apr 10, 2024 19:24    Post subject: Reply with quote
The Asus router is certainly capable of VLAN tagging.
But this is not required for such a simple configuration.
Tagging is required if you want to transport several VLANs via one port and one cable.

The GUI setting "network isolation" only becomes active when a WAN connection is established.
If there is no WAN connection, the networks are not isolated from each other.
If you want to change this, you need manual firewall settings.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1283412#1283412

This provides better isolation than the GUI switch

_________________
Quickstart guides:

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

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.5 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP
seneka21
DD-WRT Novice


Joined: 12 Nov 2022
Posts: 32

PostPosted: Thu Apr 11, 2024 16:40    Post subject: Reply with quote
Dear ho1Aetoo, thank you very much.

Your help was invaluable in order to increase the safety in my network.
As for any additional firewall settings that you have mentioned in previous post, according to my limited experience, it would be more like opening up a can of worms Smile

In any case I got a lot of useful knowledge about VLANs, tagging, bridges etc.

Thanks once more!
broca
DD-WRT User


Joined: 10 May 2022
Posts: 144
Location: Texas, USA

PostPosted: Sun Apr 05, 2026 3:49    Post subject: Reply with quote
This post is like a gold mine to me. I am in the exact situation as @seneka21 two years ago - tryig to figure out how to use VLAN to create an IoT network and isolated it from my home network. I also tried couple things, but the IoT devices are unable to reach internet and I can't get to the IPCam and NVR from the home network.

Moreover, I would appreciate some help from @ho1Aetoo to locate all the reference documents mentioned in the post. When I follow the link, they all said "The topic or post you requested does not exist".

@seneka21, how is your IoT network working so far? I would love to hear the most current status from you.

Best,

my system:
Router Model: Micro-Star International Co., Ltd. PRO B550M-VC WIFI (MS-7C95)
Firmware Version: DD-WRT v3.0-r63790 std (02/24/26)
Kernel Version: Linux 6.12.74 #833 SMP Tue Feb 24 23:48:40 +07 2026 x86_64
1ea 4 ports 2.5G NIC for home network
1ea 2 ports 2.5G NIC for WAN and IoT
Netgear xr500 as WiFi AP connected to the IoT port (MoBo WiFi 6E not supported by DD-WRT)
TrueNAS connected to Bond0 with two 2.5G slaves using VLAN101.
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3976
Location: Germany

PostPosted: Sun Apr 05, 2026 13:32    Post subject: Reply with quote
link ..

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1315824#1315824

As I mentioned in a post earlier, you only need VLANs if you want to distribute multiple networks across a single port (e.g., LAN and IoT).

Or if, as shown in the link, a tagged VLAN is required for the WAN port.

If you don’t need a tagged WAN port or tagged LAN+IoT ports, this has nothing to do with VLANs...

I always work with bridges because they offer various advantages and are simpler.

Create a new bridge named br1.
Add an eth port to the br1 bridge.
Assign br1 a different IP address (different subnet) than br0 and add a DHCP server.
Now you can enable “net-isolation,” which isolates the bridges br0 and br1 from each other.
Masquerade must be enabled so that the bridge has internet access.

Or leave “net-isolation” disabled and add manual firewall rules.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1315826#1315826

Please note that your firmware version likely uses nftables instead of iptables.

_________________
Quickstart guides:

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

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.5 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP
broca
DD-WRT User


Joined: 10 May 2022
Posts: 144
Location: Texas, USA

PostPosted: Mon Apr 06, 2026 14:43    Post subject: Reply with quote
@ho1Aetoo,
are you saying I don't even have to use VLAN? I already have all my IPCAM, NVR, Smart TV, Smart appliances connected to my xr500 Wifi AP which is connected to a single port on my X86_64 system.
I could just unbridge that port, assign it to a new bridge with its separate DHCP server instance?

I don't think I will use net-isolation feature but manual firewall rules. How do I determine my box is using nftables or iptables? Where can I learn more about nftables?

Appreciate
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3976
Location: Germany

PostPosted: Mon Apr 06, 2026 16:13    Post subject: Reply with quote
Do I really have to write this a third time?

VLANs are needed if you want to transmit multiple network segments over a single port and a single cable, e.g., LAN + IoT + GUESTS.
I don't see anywhere in your description that you want to do something like that...
If you only want to transmit one segment per port, then you don't need VLANs.


Code:
nft list tables
nft list ruleset


https://wiki.nftables.org/wiki-nftables/index.php/Main_Page

_________________
Quickstart guides:

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

Routers
Marvell OCTEON TX2 - QHora-322 - OpenWrt 25.12.5 - Gateway
Qualcomm IPQ8065 - R7800 - dd-wrt r53562 - WAP
broca
DD-WRT User


Joined: 10 May 2022
Posts: 144
Location: Texas, USA

PostPosted: Mon Apr 06, 2026 19:40    Post subject: Reply with quote
sorry I am being redundant.

"nft list table" returned five tables, ip6 mangle, ip raw, ip mangle, ip nat and ip filter. looks like nftables in available in my DD-WRT verison. I hardly understand iptables and I relied entirely on the Firewall GUI options. I might have to learn nftables now.

I am not 100% sure what I have or need actually. I put together the following to show what my home network looks like. It evolved from a Netgear R9000 gatway. The smart thermostat, smart TVs, IPCam and NVR are my conerns.

=============================================================================
4 ports 2.5G NIC port 1 (eth2) <-LAN-> TrueHAS*
4 ports 2.5G NIC port 2 (eth3) <-LAN-> TrueNAS*
*These two ports formed Bond0 in DD-WRT with balance-alb type, layer3+4 hash and VLAN101
4 ports 2.5G NIC port 3 (eth4) <-LAN-> LinuxMint laptop and printer
4 ports 2.5G NIC port 4 (eth5) <-LAN-> Windows 11 Desktop

2 ports 2.5G NIC port 1 (eth0) <-LAN-> WAN (WAN DNS ignored, use EncryptDNS instead)
2 ports 2.5G NIC port 2 (eth1) <-LAN-> unmanaged switch
|<-LAN-> xr500 WAP #1 <-LAN-> smart TV
|<-LAN-> smart TV
|<-LAN-> BlueRay Player
|<-LAN-> xr500 WAP #2 <-LAN-> Security Cam NVR

the two xr500 has no guest network. They use the same SSID and MAC filter list. They are basically hot standby to each other to cover front and back of the house and allowing lower radio signal.

wlan0 (5g) services mainly Apple devices and two IPCams (access rarely since they are managed/report directly to the NVR wirelessly)
wlan1 (2.4g) service mainly smart appliances, smart light/power switches, and a smart thermostat that requires remote access by the power company.

Currently, I can access to all the 2.4g smart devices and the Security NVR using iOS apps via cellular network.
=================================================================================
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> X86 based Hardware 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