I have a device with a WiFi access point (USB dongle) and an ethernet port that connects to a switch and then lots of other devices. I want my balena device to to DHCP and DNS for all ethernet AND WiFi clients. I could not figure out how to put 2 different interfaces on the same subnet so I have a subnet with dnsmasq instance for each interface.
WiFi AP config:
[connection] id=balena-hotspot uuid=36060c57-aebd-4ccf-aba4-ef75121b5f77 type=wifi autoconnect=true interface-name=wlp0s20u4 permissions= secondaries= [wifi] band=bg mac-address-blacklist= mac-address-randomization=0 mode=ap seen-bssids= ssid=somehotspotssid [wifi-security] group= key-mgmt=wpa-psk pairwise= proto=rsn psk=some-password [ipv4] address1=10.42.0.1/24 dns=127.0.0.1; dns-search= method=manual [ipv6] addr-gen-mode=stable-privacy dns-search= method=auto
dnsmasq \ --address=/#/10.42.0.1 \ --dhcp-range=10.42.0.1,10.42.0.254 \ --dhcp-option=option:router,10.42.0.1 \ --interface=wlp0s20u4 \ --bind-interfaces \ --except-interface=lo \ --conf-file \ --no-hosts \ --log-facility=-
[connection] id=pci-eth-1 type=ethernet interface-name=enp3s0 permissions= secondaries= [ethernet] mac-address-blacklist= [ipv4] address1=192.168.30.1/24 dns=127.0.0.1; dns-search= method=manual [ipv6] addr-gen-mode=stable-privacy dns-search= method=auto
dnsmasq \ --address=/#/192.168.30.1 \ --dhcp-range=192.168.30.1,192.168.30.254 \ --dhcp-option=option:router,192.168.30.1 \ --interface=enp3s0 \ --bind-interfaces \ --except-interface=lo \ --conf-file \ --no-hosts \ --log-facility=-
When I connect to the WiFi AP, dnsmasq on the balena device will allocate a 10.42.0.X IP. Unfortunatley I cannot then ping any ethernet device running on 192.168.30.X. Similarly, ethernet devices cannot ping WiFI devices.
- If there some way to only have 1 dnsmasq instance that manages both the eth and wifi interfaces? Then I would not need to communicate accross two subnets.
- Can I create some sort of bridge between these two subnets so every device can access every other device?
Thanks so much for any advice!