Distribute four ports on two networks fails

Hi,
I installed openwrt-21.02 on a WRT1900ACS v2 and would like to assign ports 1,2 to the 192.168.0 network and ports 1,2 to the 192.168.1 network. I have the following network configuration for this:

        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 'fd74:9af1:b8fc::/48'
                         
config device                
        option name 'br-lan0'
        option type 'bridge' 
        list ports 'lan1'    
        list ports 'lan2'   
                         
config device                
        option name 'br-lan1'
        option type 'bridge'   
        list ports 'lan3'      
        list ports 'lan4'           
                                      
config interface 'lan0'               
        option device 'br-lan0'
        option proto 'static'

In the GUI I see at LAN1

"Error: Network device is not present"
How can I distribute two networks to the four ports using two bridges?

Thanks

DianiBeach

multiple bridged networks

1 Like

Thanks for the link. I'll work through it and get back to you with the result.

Okay, handling by this description the result is the same. On the new generated interfaces LAN0 appears the message "Network device is not present".

Here is the config:

# uci show network
network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fdbf:1af2:5c22::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='lan3' 'lan4'
network.lan1=interface
network.lan1.device='br-lan'
network.lan1.proto='static'
network.lan1.ipaddr='192.168.1.1'
network.lan1.netmask='255.255.255.0'
network.lan1.ip6assign='60'
network.@device[1]=device
network.@device[1].name='wan'
network.@device[1].macaddr='c6:41:1e:33:b4:3b'
network.wan=interface
network.wan.device='wan'
network.wan.proto='dhcp'
network.wan6=interface
network.wan6.device='wan'
network.wan6.proto='dhcpv6'
network.@device[2]=device
network.@device[2].type='bridge'
network.@device[2].name='br-office'
network.@device[2].ports='lan1' 'lan2'
network.LAN0=interface
network.LAN0.proto='static'
network.LAN0.device='br-office'
network.LAN0.ipaddr='192.168.0.50'
network.LAN0.netmask='255.255.255.0'

and the status of the interfaces

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq state UP qlen 1024
    link/ether c4:41:1e:33:b4:3b brd ff:ff:ff:ff:ff:ff
    inet6 fe80::c641:1eff:fe33:b43b/64 scope link 
       valid_lft forever preferred_lft forever
3: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether c4:41:1e:33:b4:3b brd ff:ff:ff:ff:ff:ff
4: lan3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether c4:41:1e:33:b4:3b brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether c4:41:1e:33:b4:3b brd ff:ff:ff:ff:ff:ff
6: lan1@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether c4:41:1e:33:b4:3b brd ff:ff:ff:ff:ff:ff
7: wan@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
    link/ether c6:41:1e:33:b4:3b brd ff:ff:ff:ff:ff:ff
8: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:25:9c:14:9a:0a brd ff:ff:ff:ff:ff:ff
9: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:25:9c:14:9a:09 brd ff:ff:ff:ff:ff:ff
10: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether c4:41:1e:33:b4:3b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fdbf:1af2:5c22::1/60 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::c641:1eff:fe33:b43b/64 scope link 
       valid_lft forever preferred_lft forever
12: br-office: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether da:95:fd:89:4e:0e brd ff:ff:ff:ff:ff:ff

I have following network devices:

root@OpenWrt:~# ubus list network.interface.*
network.interface.lan0
network.interface.lan1
network.interface.loopback
network.interface.wan
network.interface.wan6 paste code here
root@OpenWrt:~# ifstatus lan0
{
        "up": false,
        "pending": false,
        "available": false,
        "autostart": true,
        "dynamic": false,
        "proto": "static",
        "device": "br-office",
        "data": {

        },
        "errors": [
                {
                        "subsystem": "interface",
                        "code": "NO_DEVICE"
                }
        ]
}

`

Yes, there seems to be an issue doing something as simple as

/etc/config/network
root@mamba:/etc/config# cat 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 'auto'

config device
	option name 'lan1'
	option macaddr '94:10:3e:85:b5:25'

config device
	option name 'lan2'
	option macaddr '94:10:3e:85:b5:25'

config device
	option name 'lan3'
	option macaddr '94:10:3e:85:b5:25'

config device
	option name 'lan4'
	option macaddr '94:10:3e:85:b5:25'

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

config interface 'lan10'
	option device 'br-lan10'
	option proto 'static'
	option ipaddr '192.168.10.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'br-lan20'
	option type 'bridge'
	list ports 'lan3'
	list ports 'lan4'

config interface 'lan20'
	option device 'br-lan20'
	option proto 'static'
	option ipaddr '192.168.20.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config device
	option name 'wan'
	option macaddr '94:10:3e:85:b5:25'

config interface 'wan'
	option device 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'

appears to be broken. If you take a look at dmesg you should see the issue RE: VLAN 1, guess you have to knock it down. Check the output of

root@mamba:/etc/config# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan20		7fff.000000000000	no
br-lan10		7fff.94103e85b525	no		lan2
							lan1
root@mamba:/etc/config# brdige vlan
/bin/ash: brdige: not found
root@mamba:/etc/config# bridge vlan
port              vlan-id  
lan2              1 PVID Egress Untagged
lan1              1 PVID Egress Untagged
br-lan10          1 PVID Egress Untagged
br-lan20          1 PVID Egress Untagged

Using either of the followup VLAN configurations should get you to the same place.

For example this sets up correctly

Summary
root@mamba:/etc/config# cat 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 packet_steering '1'
	option ula_prefix 'fde2:1857:9a33::/48'

config device
	option name 'wan'
	option macaddr '94:10:3e:85:b5:25'

config interface 'wan'
	option device 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option device 'wan'
	option proto 'dhcpv6'

config device
	option name 'lan1'
	option macaddr '94:10:3e:85:b5:25'
	option mtu '9200'

config device
	option name 'lan2'
	option macaddr '3a:4a:51:2e:90:a0'
	option mtu '9200'

config device
	option name 'lan3'
	option macaddr '94:10:3e:85:b5:25'
	option mtu '9200'

config device
	option name 'lan4'
	option macaddr '94:10:3e:85:b5:25'
	option mtu '9200'

config device
	option name 'brch0'
	option type 'bridge'
	list ports 'lan1'
#	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'
	option stp '1'
	option igmp_snooping '1'
	option igmpversion '3'
	option mldversion '2'
	option mtu '9200'

config device
	option name 'brch1'
	option type 'bridge'
	list ports 'lan2'

config bridge-vlan
	option device 'brch0'
	option vlan '1'
	list ports 'lan3:u'
	list ports 'lan4:u*'
	option alias 'vmgmt'

config bridge-vlan
	option device 'brch0'
	option vlan '10'
	list ports 'lan1:u*'
#	list ports 'lan2:u'
#	list ports 'lan3:u*'
#	list ports 'lan3:t*'
#	list ports 'lan3:t'
	list ports 'lan3:*'
#	list ports 'lan4:u*'
#	list ports 'lan4:t*'
	list ports 'lan4:t'
	option alias 'lan'
	option mtu '9200'

config interface 'lan'
	option proto 'static'
	option ipaddr '192.168.10.1'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option device 'brch0.lan'
	option mtu '9200'

config bridge-vlan
	option device 'brch0'
	option vlan '20'
#	list ports 'lan4:u'
	list ports 'lan4:t'
	option alias 'voip'

config bridge-vlan
	option device 'brch1'
	option vlan '90'
	list ports 'lan2:u'
	option alias 'iot'

config bridge-vlan
	option device 'brch1'
	option vlan '4094'
	list ports 'lan2:t*'
	option alias 'sink'
#	option local '0'

config interface 'iot'
	option proto 'static'
	option ipaddr '192.168.90.1'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option device 'brch1.iot'

config bridge-vlan
	option device 'brch0'
	option vlan '30'
	list ports 'lan1:t'
	option alias 'ap'

config interface 'ap'
	option proto 'static'
	option ipaddr '192.168.30.1'
	option netmask '255.255.255.0'
	option ip6assign '64'
	option device 'brch0.ap'

config bridge-vlan
	option device 'brch0'
	option vlan '50'
#	list ports 'lan4:u'
	list ports 'lan4:t'
	option alias 'VCAM1'

config interface 'windscribevpn'
	option proto 'none'
	option device 'tun0'

root@mamba:/etc/config# brctl show
bridge name	bridge id		STP enabled	interfaces
brch0		7fff.94103e85b525	yes		lan4
							wap1
							wlan0
							lan3
							wap0
							wlan1
							lan1
brch1		7fff.3a4a512e90a1	no		wiot0
							wiot1
root@mamba:/etc/config# bridge vlan
port              vlan-id  
lan4              1 PVID Egress Untagged
                  10
                  20
                  50
lan3              1 Egress Untagged
                  10 PVID Egress Untagged
lan1              10 PVID Egress Untagged
                  30
brch0             1
                  10
                  20
                  30
                  50
brch1             90
                  4094
wlan0             10 PVID Egress Untagged
wlan1             10 PVID Egress Untagged
wap0              30 PVID Egress Untagged
wiot0             90 PVID Egress Untagged
wap1              30 PVID Egress Untagged
wiot1             90 PVID Egress Untagged

I'll continue one piece. The bridge "Br-Office" should have two interfaces (LAN1, LAN2). That is not by the case:

type or # brctl show
bridge name     bridge id               STP enabled     interfaces
br-office               8000.000000000000      no
br-home         7fff.c4411e33b43b               no              lan4
                                                                                     lan3

Create does not work either:

# brctl addif br-office lan1
brctl: bridge br-office: Resource busy

I have also tried unsuccessfully to restore the Bridge and then add the interfaces:

# brctl delbr br-office
brctl addbr br-office
# brctl addif br-office lan1
brctl: bridge br-office: Resource busy

Any ideas from your side that could help?

I see we were on a similar way. But I also see, you configure lan1to lan4 with a MAC same as at WAN. Is it so desired?

I just started with the default OOTB config, i.e.

cd /etc/config
mv network networkBAK
reboot

in the case of the mamba it is just generated, in the real world I set them to something else.

Yes, I have noticed it

mv88e6085 f1072004.mdio-mii:00: p3: hw VLAN 1 already used by port 0 in br-home

I will try it as suggested with vlans.

Thanks to you

Use lowercase for all names. LuCI should be changed to not uppercase them, it causes confusion.

Good morning too you,

I realized now this solution [https://openwrt.org/docs/guide-user/network/dsa/dsa-mini-tutorial#multiple_networks_using_vlans] and now it is running well. Thanks for your support.

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