Results 1 to 5 of 5

Thread: Name Resolution on multi-homed networks using dnsmasq?

  1. #1

    Default Name Resolution on multi-homed networks using dnsmasq?

    Hi,

    I have a DNS server (dnsmasq v2.55) at the center of three subnets: x.y.1.0/24, x.y.2.0/24 & x.y.3.0/24.

    dnsmasq does a grand job of issuing a suitable DNS server address with the DHCP option 6.
    So, machines on subnet x.y.3.0/24 are told that the DNS server is x.y.3.2,
    machines on subnet x.y.2.0/24 are told that the DNS server is x.y.2.2 and
    machines on subnet x.y.1.0/24 are told that the DNS server is at x.y.1.2.
    Even though the DNS server is the same box (although with three nics).

    Now the question is:
    How do I make dnsmasq respond similarly to name resolution requests? So that when:
    Machines from x.y.3.0/24, ping <name of DNS server> dnsmasq returns x.y.3.2,
    Machines from x.y.2.0/24, ping <name of DNS server> dnsmasq returns x.y.2.2, and
    Machines from x.y.1.0/24, ping <name of DNS server> dnsmasq returns x.y.1.2.

    Currently, the DNS server returns the IP address that is assigned in /etc/host.
    Which, of course can be changed, but via that mechanism, will always be wrong two out of three cases.

    Regards, Martin

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Name Resolution on multi-homed networks using dnsmasq?

    What you are asking for is called split horizon and AFAIK, it is not supported by dnsmasq.

    Comparison of DNS server software - Wikipedia, the free encyclopedia

    You could run 3 instances of dnsmasq. I assume each can be told to bind to only one IP address.

  3. #3

    Default Re: Name Resolution on multi-homed networks using dnsmasq?

    Quote Originally Posted by ken_yap View Post
    What you are asking for is called split horizon and AFAIK, it is not supported by dnsmasq.
    Thank you Ken,

    I feared as much. Any thoughts of dealing with it at the client end? If I know that the DNS server IP (as provided by DHCP) is the IP address for the DNS Server hostname.

    You could run 3 instances of dnsmasq. I assume each can be told to bind to only one IP address.
    Sounds messy....

    Regards,

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Name Resolution on multi-homed networks using dnsmasq?

    You could give different domain names to the three IP addresses that dnsmasq presents.

  5. #5

    Default Re: Name Resolution on multi-homed networks using dnsmasq?

    Quote Originally Posted by ken_yap View Post
    You could give different domain names to the three IP addresses that dnsmasq presents.
    Hi Ken,

    Thank you. Yes, I did try that for a while. What I found though, was that it was causing me confusion in scripts. Nothing major, but again - messy!

    What I am currently doing is getting dnsmasq to send all three IP addresses and leaving it up to the client to sort it out. So far the best I have been able to come up with.

    Regards, and once again thank-you, Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •