WRT1900ACS problem setting VLAN

Hi all!

I am struggling to find a problem with my VLAN configuration. I want to configure separate VLAN network (id 100) to use with IP cameras. I followed this guide, but it doesn't work for me. When I connect computer to LAN port of newly created network, I don't get any IP assigned, neither can I ping VLAN router address (192.168.100.1) if I assign IP to myself manually. But I can ping it from main network (id 1) LAN port. I'm using OpenWRT version 20.

Here are my configuration files:

/etc/config/network

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

config globals 'globals'
        option ula_prefix 'fdd9:b956:b853::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.11.1'
        option ifname 'eth0.1'

config interface 'vlan100'
        option type 'bridge'
        option ifname 'eth0.100'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.100.1'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth1.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth1.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan 'eth0_1'
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option description 'main network'
        option ports '0 1 3 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'
        option vid '2'

config switch_vlan 'eth0_100'
        option device 'switch0'
        option vlan '100'
        option vid '100'
        option description 'IP cameras'
        option ports '0t 2 5t'

config interface 'wg0'
        option proto 'wireguard'
        option private_key 'xxxx'
        list addresses '10.10.11.1/24'
        option listen_port '51820'

config wireguard_wg0
        option public_key 'xxxx'
        option persistent_keepalive '25'
        list allowed_ips '10.10.11.2/32'
        option description 'Urban kompjuter'

config wireguard_wg0
        option description 'Urban Phone'
        list allowed_ips '10.10.11.3/32'
        option public_key 'xxxx'
        option persistent_keepalive '25'

/etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone 'lan'
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option network 'lan wg0'
        list device 'vpns+'

config zone 'vlan100'
        option name 'vlan100'
        option network 'vlan100'
        option input ACCEPT
        option output ACCEPT
        option forward REJECT

config zone 'wan'
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        option network 'wan 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 src_ip 'fc00::/6'
        option dest_ip 'fc00::/6'
        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
        option name 'Support-UDP-Traceroute'
        option src 'wan'
        option dest_port '33434:33689'
        option proto 'udp'
        option family 'ipv4'
        option target 'REJECT'

config include
        option path '/etc/firewall.user'

config include 'miniupnpd'
        option type 'script'
        option path '/usr/share/miniupnpd/firewall.include'
        option family 'any'
        option reload '1'

config include 'bcp38'
        option type 'script'
        option path '/usr/lib/bcp38/run.sh'
        option family 'IPv4'
        option reload '1'

config rule
        option src '*'
        option target 'ACCEPT'
        option proto 'udp'
        option name 'Allow-Wireguard'
        option dest_port '51820'

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

config redirect
        option target 'DNAT'
        option name 'Plex server'
        option src 'wan'
        option src_dport '32400'
        option dest 'lan'
        option dest_ip '192.168.11.93'
        option dest_port '32400'

/etc/config/dhcp


config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option confdir '/tmp/dnsmasq.d'

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

config dhcp 'vlan100'
        option interface 'vlan100'
        option start '100'
        option leasetime '24h'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option ra_management '1'
        option limit '100'

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'

Any help would be appreciated!

You've been trying to set up a swconfig style configuration, but mvebu in 21.02 uses the dsa framework. Follow the dsa guide in the wiki.

1 Like

Yeah, but I'm still on davidc502 20.02 build and I would not like to change that yet unless someone can confirm wifi performance in newer build is on par with davicc502 build.

Your device is a dual-firmware one, you can just upgrade and try - if you don't like it, use luci-app-advanced-reboot to switch (back) to your untouched old installation.

I already did and wifi performance was not what I wanted. Unless there are some significant improvements in latest build, I wouldn't like to go through that hassle again.

Ufff, after too many hours I managed to solve the issue. I tried the same config on 19.07 and there it didn't work either. Than I randomly got the idea to try some other vlan id. So I changed id from 100 to 10 and now it works on both builds. That's all I changed, no idea how this is possible.

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