Include a subnet

I currently only have LAN3 in the guest bridge.
But it works as it should

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

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

config globals 'globals'
        option ula_prefix 'fd8d:35f8::/48'

config atm-bridge 'atm'
        option vpi '1'
        option vci '32'
        option encaps 'llc'
        option payload 'bridged'
        option nameprefix 'dsl'

config dsl 'dsl'
        option annex 'b'
        option tone 'av'
        option ds_snr_offset '0'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan4'

config device
        option name 'lan1'
        option macaddr '08:96:D7:'

config device
        option name 'lan2'
        option macaddr '08:96:D7:EA'

config device
        option name 'lan3'
        option macaddr '08:96:D'

config device
        option name 'lan4'
        option macaddr '08:96:D7:EA:'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.0.30'
        option gateway '192.168.0.1'
        list dns '192.168.0.1'
        option delegate '0'

config device
        option name 'dsl0'
        option macaddr '08:96:D7:EA'

config device
        option type 'bridge'
        option name 'br-guest'
        option bridge_empty '1'
        option ipv6 '0'
        option mtu '1500'
        list ports 'lan3'

config interface 'guest'
        option proto 'static'
        option device 'br-guest'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'

Ah... one port should be fine. I think that problems may occur if you use more than one port -- AFAIK, you can only have a single base bridge device on the switch. Also, if you ever want to create a trunk port for a VLAN aware AP or managed switch, you'll need to use bridge-vlan methods anyway. Therefore, the way I'd recommend setting it up is as follows:

All ports in the bridge:

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

Create bridge-vlans for the two networks:

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan4:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '2'
        list ports 'lan3:u*'

delete br-guest:

and then edit the lan and guest network interfaces to use br-lan.1 and br-lan.2, respectively:

config interface 'lan'
        option device 'br-lan.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.0.30'
        option gateway '192.168.0.1'
        list dns '192.168.0.1'
        option delegate '0'

config interface 'guest'
        option proto 'static'
        option device 'br-lan.2'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'

Meanwhile, since either method should now produce a working config for you...

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:

Hello
First of all, thank you for your support.
I now have it running according to your config..

But I would like to set LAN 1,2,3 as guest access on the Fritzbox
and LAN 4 as a connection to the Fritzbox 7590
Currently WiFi and Lan2 work as guest access.

Here is my config:

cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd8d:35f8'

config atm-bridge 'atm'
        option vpi '1'
        option vci '32'
        option encaps 'llc'
        option payload 'bridged'
        option nameprefix 'dsl'

config dsl 'dsl'
        option annex 'b'
        option tone 'av'
        option ds_snr_offset '0'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan4:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '2'
        list ports 'lan3:u*'

config device
        option name 'lan1'
        option macaddr '08:96:D7:E'

config device
        option name 'lan2'
        option macaddr '08:96:D7:E'

config device
        option name 'lan3'
        option macaddr '08:96:D7:EA:'

config device
        option name 'lan4'
        option macaddr '08:96:D7:EA'

config interface 'lan'
        option device 'br-lan.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.0.30'
        option gateway '192.168.0.1'
        list dns '192.168.0.1'
        option delegate '0'
        option dns_metric '0'

config interface 'guest'
        option proto 'static'
        option device 'br-lan.2'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        list dns '192.168.0.1'

config device
        option name 'br-lan.1'
        option type '8021q'
        option ifname 'br-lan'
        option vid '1'
        option ipv6 '0'

config device
        option name 'br-lan.2'
        option type '8021q'
        option ifname 'br-lan'
        option vid '2'
        option ipv6 '0'

Sure.

Just edit your two bridge-vlans so that they look like this:

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan4:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '2'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan3:u*'

Also, delete these:

Restart and try it.

Thanks alot
I'm slowly starting to understand the configuration.
Sorry for the many questions but it helped me a lot to implement my project.

I would like to thank you for your great support.

This solved my problem.

Thanks !!!!

1 Like

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