[Solved] Creating VLAN interfaces

Hi,

I'm new to OpenWRT, but I'm not new to networking. I'm a Cisco engineer.

I need to create something like multiple SVIs (switch virtual interfaces) aka VLAN interfaces in OpenWRT mostly to be used on the LAN physical interface but perhaps in the future also to be used for the wireless interfaces. So, instead of creating a subinterface of eth0 for each VLAN I think I need to create a subinterface on the bridge interface and bridge both eth0 and the wireless interface to the bridge.

So, if I were configuring this for the parent interface eth0, I would do something like this in etc/config/network:

config interface 'vlan255'
option type 'bridge'
option ifname 'eth0.255'
option proto 'static'
option ipaddr '192.168.255.1'
option netmask '255.255.255.0'

How do I configure this so that traffic arriving on VLAN255 from both interface eth0 and the wireless interface (via the SSID-to-VLAN map) could reach the IP 192.168.255.1 as the default gateway on VLAN 255? I have a VLAN capable switch that will connect to the LAN interface (eth0) of OpenWRT with a 802.1q port that will be tagging multiple VLANs out of that port.

Second question: Is there VLAN configuration available in Luci in OpenWRT? I do not see any VLAN options in Luci.

Thanks.

Check Network - Switch tab that may also explain how you can do cross VLAN traffic (each VLAN need to be tagged on the CPU interface.

1 Like

I don't have a Network > Switch tab. This device doesn't have a switch. It has one on-board Gigabit Ethernet adapter and one USB-3 based 2.5 Gigabit Ethernet adapter.

Can you use tagging on a wifi connection? I thought VLANs only worked on wired ethernet connections, not wireless.

Do you really want to tag the wireless connection? Or do you want to bridge an untagged wireless connection to a tagged wired interface?

2 Likes

Which is correct.

For the wired part there isn't anything else to do. Packets will be tagged.
As for wifi, it doesn't support vlans, so what you can do is assign an SSID to the network vlan255 (or whatever name you have for that interface).

There is, if there is a switch on your device.
Otherwise when you create a new interface you can select from the drop down list of physical interface the custom field and type there eth0.X and enter.

4 Likes

Thank you, @trendy. I was missing the last step of pressing the Enter key when typing in usb0.25

I was trying to use the mouse to select the entry that I made instead of pressing the Enter key.

1 Like

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.

@trendy

I marked your post as solution. I can't mark this thread as [SOLVED], as the option to edit the heading is not there.

1 Like

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