[Dnsmasq-discuss] dnsmasq On Subnets - Failing
john doe
johndoe65534 at mail.com
Sat Sep 24 12:15:22 UTC 2022
Giving some hints more than an answer.
On 9/23/2022 2:20 PM, Zeta Cloud wrote:
> Hi.
>
> I'm running dnsmasq as the local DHCP server in a container/VM/jail
> intended to serve as a router for multiple VMs, and the router VM is set up
> with multiple vnics, each on a different subnet.
I'll assume that you are talking about VLAN/alias interface.
>
> vnic1: Subnet A -> 192.168.11.0 (external)
What Ip are you realy getting on this interface?
> vnic2: Subnet B -> 192.168.21.0 (internal)
> vnic3: Subnet C -> 192.168.31.0 (storage)
>
> The problem I'm having is that as soon as a VM on subnet A requests a DHCP
> address, dnsmasq will not respond to any future requests from VMs on subnet
> B or subnet C. If I restart the dnsmasq service, and if the first DHCP
> request is from subnet B, it won't respond to queries from subnet A/C. Etc.
>
Does your network topology works without dnsmasq?
> Is this peculiar to the particular version of dnsmasq-2.86? I've tried
> everything, with and without option bind-interfaces, with and without all
> interfaces explicitly listed, exclude-interfaces, etc.
>
See above point.
> Any help on this would be greatly appreciated. I've already spent 2 days
> trying to figure out what was going on. I'm trying to set up
> containers/VMs. The problem I face is that once I set up a VM on one
> subnet, VM creation fails for all other subnets. A restart of dnsmasq
> doesn't help, because then dnsmasq responds to the first and subsequent
> DHCP requests from a subnet, but stops responding to VMs on other subnets.
>
> Thanks very much.
>
Try to get this working with one internal and one external interface.
>
> My dnsmasq.conf included below for reference.
> ------------------------------------------
> dhcp-authoritative
> dhcp-lease-max=1000
> dhcp-leasefile=/var/cache/dnsmasq/dnsmasq.leases
> dhcp-rapid-commit
Remove this one for the time being.
> log-facility=/var/log/dnsmasq/dnsmasq.log
> log-queries
> log-dhcp
>
Do you see in the log why dnsmasq is not happy?
> # NAT Interface
> except-interface=net0
> no-dhcp-interface=net0
If you ignore the interface, the other flag is not realy needed.
>
> domain=zetac.lan
>
> # Subnet A
> interface=net1
> bind-interfaces
> listen-address=192.168.11.1
> dhcp-range=set:extl,192.168.11.101,192.168.11.200,12h
> dhcp-option=tag:extl,option:dns-server,192.168.11.1
> dhcp-option=option:netmask,255.255.255.0
> dhcp-option=option:domain-name,zetac.lan
>
> # Subnet B
> interface=net2
> bind-interfaces
Why do you use this opt multiple times, I would only use it once.
> listen-address=192.168.21.1
In this context, I can't say that I see the point of using the above.
> dhcp-option=tag:intl,option:dns-server,192.168.21.1
> dhcp-option=option:netmask,255.255.255.0
> dhcp-option=option:domain-name,zetac.lan
>
Do you realy need those opts?
> # Subnet B
> interface=net3
> bind-interfaces
> listen-address=192.168.31.1
> dhcp-range=set:intl,192.168.31.101,192.168.31.200,12h
> dhcp-option=tag:intl,option:dns-server,192.168.31.1
> dhcp-option=option:netmask,255.255.255.0
> dhcp-option=option:domain-name,zetac.lan
>
Same points as for the other subnet.
If I may, find a simple network example for two interfaces
(internal/external), then get dnsmasq working and build up from there.
--
John Doe
More information about the Dnsmasq-discuss
mailing list