OpenWrt Forum Archive

Topic: vlan config in latest snapshot

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm trying out the Feb 16 snapshot and I'm having trouble getting the vlans set up.  I am using STA mode, so I do not want to bridge the wifi to the eth. Also, this is on a Linksys wrtsl54g

In my old setup, I had:

#### VLAN configuration
config switch eth0
        option vlan0    "0 1 2 3 5u"
        option vlan1    "4 5"

#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

#### LAN configuration
config interface lan
        option ifname   "eth0"
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

#### WAN configuration
config interface        wan
        option ifname   "eth1"
        option proto    dhcp
       
#### WiFi configuration
config interface wifi
        option ifname   "wl0"
        option proto    dhcp
        option defaultroute 1

However, the snapshot uses a different vlan setup:

#### VLAN configuration
config switch eth0
        option enable 1

config switch_vlan eth0_0
       config devide "eth0"
       config vlan 0
       config ports "1 2 3 4 5u"

....

I can't figure out how to set up the vlans the same as kamikaze 8.09.  I've tried a couple of combinations, but I always end up disabling the network, and reflashing is getting old.  Can someone point me in the right direction?

cptdondo wrote:

config switch_vlan eth0_0
       config devide "eth0"
       config vlan 0
       config ports "1 2 3 4 5u"

This is completely wrong... device, vlan, ports are options and device is misspelled.

config switch_vlan eth0_0
       option device "eth0"
       option vlan 0
       option ports "1 2 3 4 5u"

~ JoW

OOPS! Sorry, I was typing from my notes.  I can't connect to my AP without networking, so I was retyping.  Clearly not enough coffee.

Yes, the config file shows what you wrote, and I'd like for it to separate port 4, which is the wifi, from 0-3, which are the hardwire ports.

I can't figure out how to break the bridge - do I even need to mess with vlans?  Every time I try to change the network config, I end up reflashing, and the AP is built into a vehicle, so it's a major PITA.

How do I migrate my working 8.09 config to the latest snapshot?

(Last edited by cptdondo on 20 Feb 2010, 17:06)

You misunderstand something. Wifi is _not_ a vlan. In /etc/config/wireless, there is an "option network" in the "wifi-iface" section which specifies the interface the wifi should be attached to. It points to "lan" by default and the default lan interface is configured as bridge - therfore the wireless interface is added as port to the existing br-lan bridge.

To properly do what you intend, remove the "option ifname" in the network "config interface wifi" declaration and change "option network" in wireless to "wifi", then wl0 will be "attached" to your defined "wifi" interface as soon as it is up and running.

~ JoW

The discussion might have continued from here.