VLAN config on dumbAP with only one physical interface

Hi,

  • I am trying to setup VLANs on dumbAP for private network and guest network.
  • My access point does not have a switch. It contains only one physical interface (eth0).
  • AP connects to a linux box which acts as a router and a dhcp server using dnmasq.
  • I am using batman-adv for meshing.

So far I have this: (network config below)

  • br-lan is receiving an ip address via dhcp
  • clients connected to wireless (wlan_primary or wlan_guests) are not receiving ip address.
  • I can see the vlan tagged packets (vlan.20) on the linux router's vlan interface (eth0.20)
  • dhcp server (dnsmasq) sees the dhcp requests and it replies with an ip address but I don't see these packets on the AP nor are the clients getting an ip address.

Any advice?


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

config globals 'globals'

config interface 'lan'
    option type 'bridge'
    option proto 'dhcp'
    option mtu '1500'
    list ifname 'bat0'
    list ifname 'eth0'

config interface 'batadv_dummy_if'
    option proto 'batadv'
    option ifname 'dummy0'
    option mesh 'bat0'
    option mtu '1532'

config interface 'wlan0_mesh_if'
    option auto '1'
    option proto 'batadv'
    option mesh 'bat0'
    option mtu '1532'
    
config interface 'wlan_primary'
    option type 'bridge'
    option ifname 'eth0.20'

config interface 'wlan_guest'
    option type 'bridge'
    option ifname 'eth0.30'

Thanks!

Use something like eth0.10 for the LAN network, not plain eth0. Of course the machine at the other end of the cable needs to be configured for VLANs as well.

I think you just use one 'proto batadv' interface to set up a BATMAN mesh but I don't remember for sure. You can run VLANs on the mesh the same way you would an Ethernet port, e.g. ifname bat0.10

Changing to eth0.10 worked :slight_smile:

On parent node (AP connected via ethernet wire)

  • wlan_primary clients are receiving dhcp
  • wlan_guest clients are receiving dhcp

On mesh node (AP connected via batman mesh)

  • wlan_primary clients are receiving dhcp
  • wlan_guest clients are NOT receiving dhcp

My new network config file, I changed wlan_primary to bridge via lan which is eth0.10.

I can see guest clients' dhcp requests using tcpdump on the child node (mesh node) but these requests are being relayed to the parent nodes (tcpdump is empty)

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

config globals 'globals'

config interface 'lan'
    option type 'bridge'
    option proto 'dhcp'
    list ifname 'bat0.10'
    list ifname 'eth0.10'

config interface 'wlan0_mesh_if'
    option auto '1'
    option proto 'batadv'
    option mesh 'bat0'
    option mtu '1532'

config interface 'wlan_guest'
    option type 'bridge'
    list ifname 'eth0.30'
    list ifname 'bat0.30'