OpenWrt Forum Archive

Topic: scrapping vlans

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

I have a Fon2 which has 2 wired NICs and I want to set it up so that they work together as a normal switch. No need for vlans or firewalls just put the two together and let all the traffic flow. I also want the device to have an IP address.

I've done a lot of reading on the openwrt site that talks about fancy setups to have multiple vlans to separate 5 port WRTs into different switches but nothing that says how to removing vlans or at least how to go back to a minimal setup.

The best I can come up with from reading through is

config switch eth0
        option vlan0 "0 1"

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

config 'interface' 'lan'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.0.33'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth0.0'

But then eth0.1 is created but doesn't do anything.

I can setup a bridge with brctl and add eth0.0 and eth0.1 to it and that allows bridging but I'm trying to test a theory that the transparent proxy I'm trying to setup is being affected by vlans, hence wanting to go back to complete scratch so I can build it up from the ground knowing exactly what is happening at each step.

Just get rid of the config switch altogether and use the ethX ports instead of ethX.x.

Unless of course you've got a router that doesn't have separate WAN and LAN ethernet, in which case you'd have them all on one network.

Do you mean just empty the file?

I am not sure if this will help you to turn your FON2 device into a 2-port switch. I have my Netgear WGT634U configured this way. Now, it behaves as a 5-port switch and I have my Asterisk PBX system hosted on this device. Please note that my WGT634U device doesn't have any WiFi card. I guess the WiFi issues are handled by /etc/config/wireless file.

Hi.

As far as I remember just removing the vlans does not work on the Fonera2 since the the underlying switch config is hard coded and traffic does is not passed to the ports anymore if the vlans are removed. You can use a bridge to create an interface over both ports. To do that, set

option ifname 'eth0.0 eth0.1'

in the lan section and remvoe the wan section. Leave the switch config as-is.

~ JoW

The discussion might have continued from here.