[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: resolv.conf misbehaving



Hi Guys,

Looks like it was a combination of a few things.

First of all (according to man "resolvconf") I had to add "dns-" hooks to
/etc/network/interfaces.

DHCP was also a little problem (like some of you pointed out).

"resolv.conf" now has both the router and Debian as nameservers automatically.

e can now do "dig fever.havannah.local" and it resolves correctly. It queries
the Debian (10.0.0.5) server by default, which I want.

However, if I do "dig -x 10.0.0.5" (the Debian server which is
fever.havannah.local) it fails to resolve simply because it queries the router
(10.0.0.2) instead of the Debian server which is 10.0.0.5. It is not even making
attempts to query the Debian server.

But if I force dig with "dig @10.0.0.5 -x 10.0.0.5" it resolves correctly.

Is it because 10.0.0.2 (router) is pushed into resolv.conf first?

Any pointers?

fever.havannah.local    =       10.0.0.5        =       Debian
router.havannah.local   =       10.0.0.2        =       router

Here is my reverse lookup file (db.10.0.0):
#############################################################################
;
; BIND reverse data file
;
$TTL	604800
@	IN	SOA	fever.havannah.local. root.havannah.local. (
			2014022314	; Serial
			 604800		; Refresh
			  86400		; Retry
			2419200		; Expire
			 604800 )	; Negative Cache TTL
;
       IN      NS	fever.havannah.local.

2       IN      PTR     zombie.havannah.local.
5	IN      PTR	fever.havannah.local.
6       IN      PTR     shotgun.havannah.local.
#############################################################################

Here is my forward lookup file (db.havannah.local)
#############################################################################

;
; BIND data file for local loopback interface
;
$TTL	604800
@	IN	SOA	fever.havannah.local. root.havannah.local (
			2014022912 	; Serial
			 604800		; Refresh
			  86400		; Retry
			2419200		; Expire
			 604800 )	; Negative Cache TTL
;
@               IN      NS	fever.havannah.local.
@               IN      MX      10 fever.havannah.local.

zombie          IN      A       10.0.0.2
fever           IN      A	10.0.0.5
shotgun         IN      A       10.0.0.6
#############################################################################

And here is my dhcpd.conf file
#############################################################################

option subnet-mask 255.255.255.0;
#
# Sample configuration file for ISC dhcpd for Debian
#
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "havannah.local";
option domain-name-servers 10.0.0.5, 10.0.0.2;

default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

# fever
subnet 10.0.0.0 netmask 255.255.255.0 {
	range 10.0.0.101 10.0.0.200;
	option routers 10.0.0.5 , 10.0.0.2;
	option domain-name-servers 10.0.0.5 , 10.0.0.2;
	}
#############################################################################

Thanks guys for helping

Danny


Reply to: