[Dnsmasq-discuss] Return multiple address in specific order for multihomed hosts
Hi, I use DNSmasq to provide DNSH/DHCP to multiple subnets and have many with hosts which are multihomed in several of these subnets. The dnsmasq servers themselves have an interface in all subnets. If a client looks up a hostname for a host not in its primary subnet, it gets a list of all addresses for that host in a random order. Is it possible instead to specify an address/subnet as the "best" one for a multihomed host? So that instead of getting all addresses when the host is not in the client subnet it could be limited to a single address/subnet? In my case this would be the external facing one for which I know there is an allowed network path to reach. As an example, I have two clusters managed this way, they are not allowed to speak to each other over the private internal trusted cluster network but can by traversing the external facing firewalls for each. If I look up my login nodes on cluster A from a node in cluster A I correctly get the internal private cluster addresses: [griznog@smsx10srw-srcf-d15-36 ~]$ host login login.clusterA has address 10.1.1.6 login.clusterA has address 10.1.1.8 login.clusterA has address 10.1.1.7 login.clusterA has address 10.1.1.9 But if I look up login nodes for A from cluster B which has no access to Cluster A private subnet I get [griznog@smsx11qph-srcf-f5-09 ~]$ host login.clusterA login.clusterA has address 10.1.1.7 login.clusterA has address 14.14.14.56 login.clusterA has address 14.14.14.59 login.clusterA has address 10.1.1.8 login.clusterA has address 10.1.1.9 login.clusterA has address 14.14.14.57 login.clusterA has address 10.1.1.6 login.clusterA has address 14.14.14.58 What I'd like to be able to do is make that return only the external facing addresses, e.g., login.clusterA has address 14.14.14.56 login.clusterA has address 14.14.14.57 login.clusterA has address 14.14.14.58 login.clusterA has address 14.14.14.59 All hosts use the dnsmasq interface in their respective private subnets to do name lookups. I think what I want to be able to do is somehow "rank" a subnet so that if a request comes in for an address and there isn't an answer in the available subnet only the first and highest ranked subnet will get returned. Is this (or another method of handling this) possible? Best, griznog ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Determine wireless SSID
Hi Donald, it is kind of possible. But usually there is another way to solve your situation. First of all, you want to assign guests different addresses. Why would you want that? I think you want to separate them from internal network. Good design. However, that means they should be coming from different network device. Just need to map device request is coming from to different range and tag. Or maybe better, have separate instances listening just on given interface. For example have guest network have VLAN 1, internal VLAN 2. Run dnsmasq with bind-interfaces, interface=eth0.1 and so on. Another instance with interface=eth0.2, etc. It would separate physically guests from home users, would allow firewall separation as well. Possibly just one direction. It would not be simple setup I am afraid. Requires a lot of configuration outside dnsmasq. I guess you are looking for some simple configuration. I am afraid I do not know simpler setup. Is this somehow simplified in OpenWRT for example? Cheers, Petr On 1/11/19 10:58 PM, Donald Muller wrote: > This is probably not possible but I thought I would ask. > > Is it possible for DNSMASQ to determine the SSID for a DHCP request? I would > like to be able to assign different values for devices using the guest > network. DNSMASQ is running on my QNAP NAS while I have a Netgear wireless > router providing the wireless connectivity. > > Thanks > > - > "Everyone is entitled to his own opinion, but not to his own facts." - Daniel > Patrick Moynihan > > > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > -- Petr Menšík Software Engineer Red Hat, http://www.redhat.com/ email: pemen...@redhat.com PGP: 65C6C973 ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Reverse of option 121
On Mon, Jan 28, 2019 at 06:44:22PM +0100, Daniel Huhardeaux wrote: > Hi, > > I have a setup where 3 VLANs are involved and stateless-static-route are > sended for one of them. Some devices can be part of one or another of this > VLANs. > > Problem is that if a device was connected to the VLAN who sended the > static-routes, when switching to one of the other VLAN the static-routes are > still there. > > Is there a way to remove static routes via a dhcp option ? Opposite of > option 121 ? > > Thanks for any hint > On Linux with NetworkManager are all routes over a device deleted whenever the device is disconnected. So when you have a disconnect upon VLAN hop-over you are fine. Upon connect happens another DHCP including option 121 static routes. Groeten Geert Stappers -- Leven en laten leven ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Reverse of option 121
Hi, I have a setup where 3 VLANs are involved and stateless-static-route are sended for one of them. Some devices can be part of one or another of this VLANs. Problem is that if a device was connected to the VLAN who sended the static-routes, when switching to one of the other VLAN the static-routes are still there. Is there a way to remove static routes via a dhcp option ? Opposite of option 121 ? Thanks for any hint -- Daniel ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss