Mesh with Batman and DHCP per vlan, only one VLAN get an ip

Hello Everyone,

I've recently installed and configure 2 * Unifi LR-6. One directly connected to the router (called mesh-lr6-gw) and on as a mesh node (called mesh-lr6-node1). My problem is certainly very simple (with the knowledge..)

I tried to set-up the VLAN part, and I were able to make it partially work (mesh is okay, batman too, and sometime one vlan among the both work).

While the mesh-lr6-gw, get an IP from the DHCP for each vlan interface, the mesh-lr6-node1 don't, why ? What is wrong with my set-up ? It seems like only one of the both bat get an ip. Sometime the vlan 300, sometime the 400. Is it related with the mac which is the same for both vlan (see ip a below) ? What are the good practice to solve that ? In such a way that only the router has dhcp server (one per vlan) and that each mesh node get multiple ips (one per vlan) ?

mesh-lr6-node1 - /etc/config/network

config device                     
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'
        list ports 'bat0.300'
        list ports 'bat0.400'

# iot
config interface 'iot'
        option device 'br-lan.300'
        option proto 'dhcp'

config bridge-vlan
        option device 'br-lan'
        option vlan '300'
        list ports 'eth0:t'
        list ports 'bat0.300'

# office
config interface 'office'
        option device 'br-lan.400'
        option proto 'dhcp'

config bridge-vlan
        option device 'br-lan'
        option vlan '400'
        list ports 'eth0:t'
        list ports 'bat0.400'

mesh-lr6-gw - /etc/config/network

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'
        list ports 'bat0.300'
        list ports 'bat0.400'

# iot
config interface 'iot'
        option device 'br-lan.300'
        option proto 'dhcp'

config bridge-vlan
        option device 'br-lan'
        option vlan '300'
        list ports 'eth0:t'
        list ports 'bat0.300'


# office
config interface 'office'
        option device 'br-lan.400'
        option proto 'dhcp'

config bridge-vlan
        option device 'br-lan'
        option vlan '400'
        list ports 'eth0:t'
        list ports 'bat0.400'

mesh-lr6-node1 - ip a:

root@lr6-node1:~# 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 1500 qdisc fq_codel master br-lan state UP qlen 1000
    link/ether 24:5a:4c:99:a8:c5 brd ff:ff:ff:ff:ff:ff
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 24:5a:4c:99:a8:c5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe99:a8c5/64 scope link 
       valid_lft forever preferred_lft forever
8: br-lan.300@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 24:5a:4c:99:a8:c5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.208/24 brd 192.168.100.255 scope global br-lan.300
       valid_lft forever preferred_lft forever
    inet6 fe80::265a:4cff:fe99:a8c5/64 scope link 
       valid_lft forever preferred_lft forever
9: br-lan.400@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 24:5a:4c:99:a8:c5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.110.209/24 brd 192.168.110.255 scope global br-lan.400
       valid_lft forever preferred_lft forever
    inet6 fe80::265a:4cff:fe99:a8c5/64 scope link 
       valid_lft forever preferred_lft forever
10: bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN qlen 1000
    link/ether e6:7c:1e:18:12:ae brd ff:ff:ff:ff:ff:ff
    inet6 fe80::e47c:1eff:fe18:12ae/64 scope link 
       valid_lft forever preferred_lft forever
11: bat0.300@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether e6:7c:1e:18:12:ae brd ff:ff:ff:ff:ff:ff
12: bat0.400@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether e6:7c:1e:18:12:ae brd ff:ff:ff:ff:ff:ff
15: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 24:5a:4c:99:a8:c5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe99:a8c5/64 scope link 
       valid_lft forever preferred_lft forever
16: wlan0-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 26:5a:4c:99:a8:c5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::245a:4cff:fe99:a8c5/64 scope link 
       valid_lft forever preferred_lft forever
17: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2304 qdisc noqueue master bat0 state UP qlen 1000
    link/ether 26:5a:4c:99:a8:c5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::245a:4cff:fe99:a8c5/64 scope link 
       valid_lft forever preferred_lft forever

mesh-lr6-gw - ip a:

root@lr6-gw:~# 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 1500 qdisc fq_codel master br-lan state UP qlen 1000                                         
    link/ether 24:5a:4c:99:f4:15 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000                                                                    
    link/ether 24:5a:4c:99:f4:15 brd ff:ff:ff:ff:ff:ff
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000                                                      
    link/ether 24:5a:4c:99:f4:15 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe99:f415/64 scope link
       valid_lft forever preferred_lft forever
8: br-lan.300@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000                                           
    link/ether 24:5a:4c:99:f4:15 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.156/24 brd 192.168.100.255 scope global br-lan.300                                                                     
       valid_lft forever preferred_lft forever
    inet6 fe80::265a:4cff:fe99:f415/64 scope link
       valid_lft forever preferred_lft forever
9: br-lan.400@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000                                           
    link/ether 24:5a:4c:99:f4:15 brd ff:ff:ff:ff:ff:ff
    inet 192.168.110.156/24 brd 192.168.110.255 scope global br-lan.400                                                                     
       valid_lft forever preferred_lft forever
    inet6 fe80::265a:4cff:fe99:f415/64 scope link
       valid_lft forever preferred_lft forever
10: bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN qlen 1000                                                  
    link/ether ee:92:c1:53:0e:b5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::ec92:c1ff:fe53:eb5/64 scope link
       valid_lft forever preferred_lft forever
11: bat0.300@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000                                
    link/ether ee:92:c1:53:0e:b5 brd ff:ff:ff:ff:ff:ff
12: bat0.400@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000                                
    link/ether ee:92:c1:53:0e:b5 brd ff:ff:ff:ff:ff:ff
13: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2304 qdisc noqueue master bat0 state UP qlen 1000                                          
    link/ether 26:5a:4c:99:f4:15 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::245a:4cff:fe99:f415/64 scope link
       valid_lft forever preferred_lft forever

Notes:

  • I'm tagging the eth0 on both nodes, since there will be a manageable switch connected to the lr6-node1.
  • on the lr6-node1 i ran the ip a command thanks to connecting the node to a router.

Really hope that someone can help me ?

just in case: this topic follow another one with a question concerning the hardware selection for my mesh set-up Home set-up with OpenWrt and Ubiquiti
Laurent