multi-homed server with same hostname on 2 subnets - Network DNS Dnsmasq General

Discussion about the dnsmasq DNS and DHCP server 



Keywords  NetworkDNSDiscussionForumsmultihomedserversamehostnamesubnetsDnsmasqGeneral

   Network / DNS Discussion Forums -> Network DNS Dnsmasq General Report Spam.

 
AuthorMessage
Craig Yoshioka
PostPosted: Sat Jul 21, 2012 7:44 pm    Post subject: multi-homed server with same hostname on 2 subnetsReport Spam



Hi,

I have a server using two interfaces for different subnets, with the same hostname on both. The subnets are:
192.168.0.0/24
192.168.1.0/24

I've gotten each interface to get the correct IP from dnsmasq using:
dhcp-host=eth0,myserver,192.168.0.10
dhcp-host=eth0,myserver,192.168.1.10

but when dnsmasq is asked to resolve the address of myserver it always answers with 192.168.1.10 regardless of what subnet the request came from.

What's the proper way to setup this up?

Thanks,
-Craig

Back to top
Craig Yoshioka
PostPosted: Sat Jul 21, 2012 7:49 pm    Post subject: Re: multi-homed server with same hostname on 2subnetsReport Spam



Sorry, typo the lines should have been:

dhcp-host=eth0,myserver,192.168.0.10
dhcp-host=eth1,myserver,192.168.1.10

On Jul 21, 2012, at 12:44 PM, Craig Yoshioka <craigyk-BUHhN+a2lJ4 (AT) public (DOT) gmane.org> wrote:

Hi,

I have a server using two interfaces for different subnets, with the same hostname on both. The subnets are:
192.168.0.0/24
192.168.1.0/24

I've gotten each interface to get the correct IP from dnsmasq using:
dhcp-host=eth0,myserver,192.168.0.10
dhcp-host=eth0,myserver,192.168.1.10

but when dnsmasq is asked to resolve the address of myserver it always answers with 192.168.1.10 regardless of what subnet the request came from.

What's the proper way to setup this up?

Thanks,
-Craig

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss-YFzxfK+dQ3ZKxzGo0kwUX62ZND6+EDdj (AT) public (DOT) gmane.org
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Back to top
/dev/rob0
PostPosted: Sat Jul 21, 2012 11:18 pm    Post subject: Re: multi-homed server with same hostname on 2subnetsReport Spam

On Sat, Jul 21, 2012 at 12:49:38PM -0700, Craig Yoshioka wrote:
Sorry, typo the lines should have been:

dhcp-host=eth0,myserver,192.168.0.10
dhcp-host=eth1,myserver,192.168.1.10

On Jul 21, 2012, at 12:44 PM, Craig Yoshioka <craigyk-BUHhN+a2lJ4 (AT) public (DOT) gmane.org> wrote:
I have a server using two interfaces for different subnets, with
the same hostname on both. The subnets are:
192.168.0.0/24
192.168.1.0/24

FWIW 192.168.0.0/23 are the worst possible choices because they
conflict with what most off-the-shelf routers use. If you ever need
to connect your networks to another, such as via a VPN, you might
find out why.

I've gotten each interface to get the correct IP from dnsmasq using:
dhcp-host=eth0,myserver,192.168.0.10
dhcp-host=eth0,myserver,192.168.1.10

but when dnsmasq is asked to resolve the address of myserver it
always answers with 192.168.1.10 regardless of what subnet the
request came from.

What's the proper way to setup this up?

See "-y, --localise-queries" in the dnsmasq(Cool manual.
--
http://rob0.nodns4.us/ -- system administration and consulting
Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:
Back to top
Craig Yoshioka
PostPosted: Sat Jul 21, 2012 11:41 pm    Post subject: Re: multi-homed server with same hostname on 2subnetsReport Spam

Awesome. I love dnsmasq.

BTW, re: the subnets, why would that be a problem? I have complete control over the router, I can change it, set up static routing, etc. if I ever need to connect the two subnets.


On Jul 21, 2012, at 4:18 PM, /dev/rob0 <rob0-puGfsi27rH1aa/9Udqfwiw (AT) public (DOT) gmane.org> wrote:

On Sat, Jul 21, 2012 at 12:49:38PM -0700, Craig Yoshioka wrote:
Sorry, typo the lines should have been:

dhcp-host=eth0,myserver,192.168.0.10
dhcp-host=eth1,myserver,192.168.1.10

On Jul 21, 2012, at 12:44 PM, Craig Yoshioka <craigyk-BUHhN+a2lJ4 (AT) public (DOT) gmane.org> wrote:
I have a server using two interfaces for different subnets, with
the same hostname on both. The subnets are:
192.168.0.0/24
192.168.1.0/24

FWIW 192.168.0.0/23 are the worst possible choices because they
conflict with what most off-the-shelf routers use. If you ever need
to connect your networks to another, such as via a VPN, you might
find out why.

I've gotten each interface to get the correct IP from dnsmasq using:
dhcp-host=eth0,myserver,192.168.0.10
dhcp-host=eth0,myserver,192.168.1.10

but when dnsmasq is asked to resolve the address of myserver it
always answers with 192.168.1.10 regardless of what subnet the
request came from.

What's the proper way to setup this up?

See "-y, --localise-queries" in the dnsmasq(Cool manual.
--
http://rob0.nodns4.us/ -- system administration and consulting
Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss-YFzxfK+dQ3ZKxzGo0kwUX62ZND6+EDdj (AT) public (DOT) gmane.org
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Back to top
   Network / DNS Discussion Forums -> Network DNS Dnsmasq GeneralAll times are GMT
Page 1 of 1

Related Topics

Privacy Policy