[SOLVED] Odd issue with VLANS

I have OpenWrt installed on a Ubiqiuti EdgeRouter X and I have Several VLANs configured on my Firewall (1, 10, 20, 100), These VLANs work as expected.

I have created a new VLAN (30). This new VLAN is not functioning at all it seems even though I have Configured VLAN Identically to the other VLANs (Other than the IP Scheme)

My Primary Switch is a TP-Link TL-SG1016PE, and the Vlans are Tagged on this VLAN Identically to the other VLANs, Each port on the switch that has a WAP or Managed switch connected to it is tagged with every VLAN, and Port 16 (Uplink) is also tagged with all the VLANS.

On Port 2 I have attached a TL-SG105E 5 Port Managed Switch, Port 5 is the Uplink Port and the Required VLANS are configured on this switch, Configuring PVID of 20 on Port 4 Works as Expected but when Configuring PVID of 30 on Port 4 We get no communication with that VLAN, I have even tried configuring PVID of port 2 of the Primary switch to 30 and We get no communication, But Setting PVID to 10, or 20 works as expected. This tells me that the issue somehow lies in the configuration of VLAN 30 on the firewall.

On port 3 of the Primary switch is connected a UAP-AC-PRO that I have flashed OpenWrt on, it appears that we are getting no Communication on any VLAN other than VLAN 1, but I want to focus on the firewall side if things at the moment, once Switch configuration for VLAN 30 is working as expected we can focus on the AP.

Let's start by looking at your ER-X config:

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:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
cat /etc/config/firewall
root@OpenWrt:~# ubus call system board
{
	"kernel": "5.15.134",
	"hostname": "OpenWrt",
	"system": "MediaTek MT7621 ver:1 eco:3",
	"model": "Ubiquiti EdgeRouter X",
	"board_name": "ubnt,edgerouter-x",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.0",
		"revision": "r23497-6637af95aa",
		"target": "ramips/mt7621",
		"description": "OpenWrt 23.05.0 r23497-6637af95aa"
	}
}

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 'fde2:80de:3b21::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1'
	list ports 'eth2'
	list ports 'eth3'
	list ports 'eth4'
	option stp '1'

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

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

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

config bridge-vlan
	option device 'br-lan'
	option vlan '10'
	list ports 'eth1:t'
	list ports 'eth2:t'
	list ports 'eth3:t'
	list ports 'eth4:t'

config bridge-vlan
	option device 'br-lan'
	option vlan '20'
	list ports 'eth1:t'
	list ports 'eth2:t'
	list ports 'eth3:t'
	list ports 'eth4:t'

config bridge-vlan
	option device 'br-lan'
	option vlan '100'
	list ports 'eth1:t'
	list ports 'eth2:t'
	list ports 'eth3:t'
	list ports 'eth4:t'

config interface 'Stephen'
	option proto 'static'
	option device 'br-lan.10'
	option ipaddr '192.168.10.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

config interface 'TrentGeneva'
	option proto 'static'
	option device 'br-lan.20'
	option ipaddr '192.168.20.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

config bridge-vlan
	option device 'br-lan'
	option vlan '1'
	list ports 'eth1:u*'
	list ports 'eth2:u*'
	list ports 'eth3:u*'
	list ports 'eth4:u*'

config interface 'Private'
	option proto 'static'
	option device 'br-lan.1'
	option ipaddr '192.168.0.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

config interface 'Guests'
	option proto 'static'
	option device 'br-lan.100'
	option ipaddr '172.16.16.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

config interface 'Joshua'
	option proto 'static'
	option device 'br-lan.30'
	list dns '192.168.0.8'
	list dns '192.168.0.9'
	list ipaddr '192.168.30.1/24'

config device
	option type '8021q'
	option ifname 'br-lan'
	option vid '30'
	option name 'br-lan.30'

config bridge-vlan
	option device 'br-lan'
	option vlan '30'
	list ports 'eth1:t'
	list ports 'eth2:t'
	list ports 'eth3:t'
	list ports 'eth4:t'

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

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option filter_aaaa '0'
	option filter_a '0'
	option confdir '/tmp/dnsmasq.d'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config dhcp 'Stephen'
	option interface 'Stephen'
	option start '100'
	option limit '150'
	option leasetime '12h'

config dhcp 'TrentGeneva'
	option interface 'TrentGeneva'
	option start '100'
	option limit '150'
	option leasetime '12h'

config dhcp 'Private'
	option interface 'Private'
	option start '100'
	option limit '150'
	option leasetime '12h'

config dhcp 'Guests'
	option interface 'Guests'
	option start '100'
	option limit '150'
	option leasetime '12h'

config dhcp 'Joshua'
	option interface 'Joshua'
	option start '100'
	option limit '150'
	option leasetime '12h'

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

config defaults
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option synflood_protect '1'
	option drop_invalid '1'

config zone 'lan'
	option name 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'
	list device 'vpns+'
	list network 'lan'
	list network 'Stephen'
	list network 'TrentGeneva'
	list network 'Private'
	list network 'Guests'
	list network 'Joshua'

config zone 'wan'
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	list network 'wan'
	list network 'wan6'

config forwarding
	option src 'lan'
	option dest 'wan'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

config rule 'oc'
	option name 'Allow-OpenConnect'
	option src 'wan'
	option dest_port '4443'
	option proto 'tcp udp'
	option target 'ACCEPT'

Looking at the Config, I believe I see what I did, I have made the Changes in LUCI and the output of network config is now as follows.

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 'fde2:80de:3b21::/48'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1'
	list ports 'eth2'
	list ports 'eth3'
	list ports 'eth4'
	option stp '1'

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

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

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

config bridge-vlan
	option device 'br-lan'
	option vlan '10'
	list ports 'eth1:t'
	list ports 'eth2:t'
	list ports 'eth3:t'
	list ports 'eth4:t'

config bridge-vlan
	option device 'br-lan'
	option vlan '20'
	list ports 'eth1:t'
	list ports 'eth2:t'
	list ports 'eth3:t'
	list ports 'eth4:t'

config bridge-vlan
	option device 'br-lan'
	option vlan '100'
	list ports 'eth1:t'
	list ports 'eth2:t'
	list ports 'eth3:t'
	list ports 'eth4:t'

config interface 'Stephen'
	option proto 'static'
	option device 'br-lan.10'
	option ipaddr '192.168.10.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

config interface 'TrentGeneva'
	option proto 'static'
	option device 'br-lan.20'
	option ipaddr '192.168.20.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

config bridge-vlan
	option device 'br-lan'
	option vlan '1'
	list ports 'eth1:u*'
	list ports 'eth2:u*'
	list ports 'eth3:u*'
	list ports 'eth4:u*'

config interface 'Private'
	option proto 'static'
	option device 'br-lan.1'
	option ipaddr '192.168.0.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

config interface 'Guests'
	option proto 'static'
	option device 'br-lan.100'
	option ipaddr '172.16.16.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

config bridge-vlan
	option device 'br-lan'
	option vlan '30'
	list ports 'eth1:t'
	list ports 'eth2:t'
	list ports 'eth3:t'
	list ports 'eth4:t'

config interface 'Joshua'
	option proto 'static'
	option device 'br-lan.30'
	option ipaddr '192.168.30.1'
	option netmask '255.255.255.0'
	list dns '192.168.0.8'
	list dns '192.168.0.9'

After making the above changes, the PVID setting for VLAN 30 is still not functioning, odd.

I don't see any problems here, but a few comments...

DNS entries in local network interface stanzas don't do anything... you can remove them. (they only have an effect for the upstream/wan network stanza).

If you want those DNS values advertised by the DHCP server, you do this by setting option 6 in the dhcp server settings with these dns severs.

I recommend removing them from all of your local networks -- it will clean up the network file.

Next...

I don't think the above will be a problem, but since you are using bridge-vlans and have br-lan.1 assigned to the Private network and this is untagged on all 4 ports, it is probably best if you remove the device from the above lan network interface stanza.

Next:

All of your networks are assigned to the lan firewall zone and forwarding is allowed on the zone-level rule. Therefore, these networks are not actually isolated from each other. They also all have access to the router itself. I don't know if you intended this, or if you want to prevent this access from some or all of the networks. This isn't a problem at this point, but just something you might want to consider.

Now... let's look at one of your switches... can you make one of the switches have a dedicated 'access' port for the new VLAN30 (untagged + PVID). You'll want the trunk/uplink port to have VLAN30 tagged on that port. Let's see what you have there.

Did you set:

  • The uplink trunk port to contain VLAN 30 as tagged
  • VLAN 30 as an untagged member of the 'access port'
  • VLAN 30 as PVID for the access port

Screen Shot 2023-11-12 at 8.57.50 PM

Screen Shot 2023-11-12 at 8.59.00 PM

All looks good there.

When you plug a device into port 4 of that switch, what happens? Are you able to get an IP on the computer via DHCP?

nothing, no communication. Which is Odd, I have a TP-Link AP, an Aruba AP, and an Engenius AP that all function with the tagged VLANS, They are connected to the 16 Port Switch.

All Except for 30

Before going further -- have you restarted your router since making these changes? Or restarted the individual services (network, dhcp, firewall)? If not, please do that and test... if that doesn' fix the problems...

Can we disconnect the TL-SG105E from the ER-X port 2 and use it as an access port for VLAN 30? If so... we'll make the following changes:

Temporarily, make VLAN1 tagged on port eth2:

config bridge-vlan
	option device 'br-lan'
	option vlan '1'
	list ports 'eth1:u*'
	list ports 'eth2t'
	list ports 'eth3:u*'
	list ports 'eth4:u*'

Then make port eth2 untagged+PVID for VLAN30:

config bridge-vlan
	option device 'br-lan'
	option vlan '30'
	list ports 'eth1:t'
	list ports 'eth2:u*'
	list ports 'eth3:t'
	list ports 'eth4:t'

Try that? Does a computer directly connected to port eth2 get an IP?

The router Hasn't been rebooted, but I can restart services, there are users actively using the network, I have made Port 2 an access port and we are getting IP addressing, I'm going to reboot the 5 port switch and test it again.

Ok. Great. So we know the config is right on the er-x. Don’t forget to revert the recent changes so their port 2 is a trunk again.

Reconnected the switch and no go

The TL-SG1016PE is Connected to Port 1,

The Vlan Config of that Switch.
Screen Shot 2023-11-12 at 9.26.08 PM

All Vlans other than 30 Function

Screen Shot 2023-11-12 at 9.26.23 PM

Try setting up an access port on the 16 port switch.

That worked.

need to replace the 5 port.

now for the ap