Vlan Setup in Openwrt 19.07

Hi, We are using Openwrt 19.07.

Here We are trying to configure multiple VLAN on single physical port. We bridged all those VLAN interfaces.So, Whenever configured end to end ping is not working because multiple ARP packets are generated by device.

For Suppose, My PC ipaddr is 192.168.5.55 with vlan 55 and My device ipaddr is 192.168.5.2 with Vlans 55,65,75 and they are connected through Switch. Whenever My PC is sending ARP Broadcast Packet with Vlan 55, my device is also sending Replicated ARP broadcast request with same src and dest but different VLAN such as 65, 75 to switch. Due to Replication switch is blocking the arp replies as it doesnot understand where 5.2 device is connected.

Here is my network file configuration:

config interface 'wan'                                                                          
        option type 'bridge'                                                                                  
        option proto 'static'                                                                                        
        option netmask '255.255.255.0'                                                                                 
        option ip6assign '60'                                                                                            
        option _orig_ifname 'eth1.55 eth1.65 eth1.75'                                                            
        option _orig_bridge 'true'                                                                                
        option force_link '1'                                                                                       
        option delegate '1'                                                                                            
        option macaddr '00:22:65:00:00:01'                                                                              
        option ipaddr '192.168.5.2'                                                                                      
        option vlan_filtering '1'                                                                                        
        option stp '0'

What should I do ?

Upgrade, 19.07 is EOL.

1 Like

What hardware are we talking about?

we are using At91 Sama5d2_Xplained board. Is there any known bugs wrt vlan in 19.07 ?

What is the output of

ubus call system board

Here is My output:

root@host:~#ubus call system board
{
        "kernel": "5.4.41-linux4sam-2020.04",
        "hostname": "host",
        "system": "ARMv7 Processor rev 1 (v7l)",
        "model": "Atmel SAMA5D2 Xplained",
        "board_name": "sama5d2_xplained",
        "release": {
                "distribution": "host",
                "version": "19.07.2",
                "revision": "r10947-65030d81f3",
                "target": "at91/sama5",
                "description": "host 19.07.2 Revision 5.12.99"
        }
}

This is not from the Official OpenWrt project. Please reach out to the vendor of the device and/or the maintainer of the fork that you are using for assistance.

we have got a eval board of sama5d2 xplained. the board info is furnished below. we have downloaded an image of 22.03.

even in this version we are facing same problem with vlan.

what are the options need to be set in make menuconfig or make kernel_menuconfig for proper functioning of VLAN?

root@OpenWrt:/# ubus call system board
{
        "kernel": "5.10.201",
        "hostname": "OpenWrt",
        "system": "ARMv7 Processor rev 1 (v7l)",
        "model": "Atmel SAMA5D2 Xplained",
        "board_name": "atmel,sama5d2-xplained",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.6",
                "revision": "r20265-f85a79bcb4",
                "target": "at91/sama5",
                "description": "OpenWrt 22.03.6 r20265-f85a79bcb4"
        }
}


root@OpenWrt:/# uci show network
network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.lan=interface
network.lan.ifname='eth0.55 eth0.12'
network.lan.type='bridge'
network.lan.proto='static'
network.lan.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.debug=interface
network.debug.ifname='usb0'
network.debug.type='none'
network.debug.proto='static'
network.debug.ipaddr='172.18.0.18'
network.debug.netmask='255.255.255.0'




Try upgrading to the latest official release -- 23.05.2
https://firmware-selector.openwrt.org/?version=23.05.2&target=at91%2Fsama5&id=microchip_sama5d2-xplained

Make sure you do not keep settings during the upgrade -- the config you have shown is absolutely not compatible with 23.05.

it is working in 23.05 version,
can you share us the link to download and build the whole SW

All the information can be found here:

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:

We downloaded openwrt snapshot, but we want to download openwrt 23.05 released version source code. Could you please share us the link to the repository?

Look, it's not forbidden to search for it yourself. It's really not hidden and it would have taken you fewer key strokes to search for- and find it, than typing either your inquiry or my response.

Hi,
we have build openwrt 23.05 snapshot version. we are able to load the final image into the sama5d2 xpalined board. we have configured vlan. but we are seeing the same problem we faced in 19.07 version.

but when we tested the official binary of 23.05.2 as you suggested earlier it was working fine.

what could be the difference? is there any package that need to be selected for proper operation of vlan?

root@OpenWrt:/# ubus call system board
{
        "kernel": "5.15.147",
        "hostname": "OpenWrt",
        "system": "ARMv7 Processor rev 1 (v7l)",
        "model": "Atmel SAMA5D2 Xplained",
        "board_name": "atmel,sama5d2-xplained",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05-SNAPSHOT",
                "revision": "r23719-72421d973e",
                "target": "at91/sama5",
                "description": "OpenWrt 23.05-SNAPSHOT r23719-72421d973e"
        }
}

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

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

config interface 'lan'
        option type 'none'
        option proto 'static'
        option ipaddr '193.168.1.52'
        option netmask '255.255.255.0'
        option gateway '193.168.1.1'
        option device 'br-lan'

config interface 'debug'
        option type 'none'
        option proto 'static'
        option ipaddr '172.18.0.18'
        option netmask '255.255.255.0'
        option device 'usb0'

config device
        option type '8021q'
        option ifname 'eth0'
        option vid '55'
        option name 'eth0.55'
        option ipv6 '0'
        option macaddr 'FC:C2:3D:0B:B2:E5'
        option mtu '1500'

config device
        option type '8021q'
        option ifname 'eth0'
        option vid '65'
        option name 'eth0.65'
        option mtu '1500'
        option macaddr 'FC:C2:3D:0B:B2:E5'
        option ipv6 '0'

config device
        option type 'bridge'
        option name 'br-lan'
        list ports 'eth0'
        list ports 'eth0.55'
        list ports 'eth0.65'
        option bridge_empty '1'
        option mtu '1500'
        option macaddr 'FC:C2:3D:0B:B2:E5'
        option ipv6 '0'

root@OpenWrt:/# 

Moved to the developer section since the OP is building from source.

@admin1 - are you making modifications of the source code that you download, or are you just doing a straight compile? If there are changes, you'll need to describe what those changes are and why. If it's a straight compile, it would be good to download the snapshot as available on the firmware-selector page to see if it works properly.

I can tell you. though, that this bridge is very, very wrong.

No, We are not making modifications to the source code. We downloaded snapshot, only selected luci for http access that's it and compiling staright. As you mentioned, the configurations are wrong were not configured by us. We just configured vlan though luci HTTP.

Where did the configs come from?

Things can still be misconfigured even if they are done through the web interface.

Yes, But we did same configurations in the 23.05 through HTTP it works fine. In snapshot, we did same, We are facing the issue..

But where did this bridge stanza come from? Did you configure it? It is entirely invalid and will cause problems.

A bridge is the software equivalent of an unmanaged hardware switch. It must only ever have a single network/VLAN associated with it -- here there are three. This should not have worked in any version of OpenWrt... if it did work in a previous experiment, it is likely that the testing was not sufficiently detailed as to reveal the problems that this will present.