Sending hostname with DHCP

Todd Nine todd.nine at gmail.com
Fri Aug 12 15:37:03 UTC 2005


Thanks for a reply Tim! I was beginning to think no one would give me a 
hand.

I'm actually using the domain nine.homelinux.com <http://nine.homelinux.com>, 
since homelinux.com <http://homelinux.com> is a
dyndns.org<http://dyndns.org>owned domain. I chowned my
db.nine.homelinux.com <http://db.nine.homelinux.com> file to named:named and 
chmod to 744, but I am still receiving the timeout errors. My dns and dhcp 
server is my router at 192.168.0.1 <http://192.168.0.1>, so it is the 
default route and the default dns host. On my fc4 box, marge, I can get the 
name "marge.nine.homelinux.com <http://marge.nine.homelinux.com>" from the 
hostname command. Below is my /etc/resolv.conf created by the dhcp client. 


; generated by /sbin/dhclient-script
search nine.homelinux.com <http://nine.homelinux.com>
nameserver 192.168.0.1 <http://192.168.0.1>


Here is my db.nine.homelinux.com <http://db.nine.homelinux.com> file. I keep 
getting a warning about unexpected end of input near line 6 (the closing 
paren)

$ttl 38400
nine.homelinux.com <http://nine.homelinux.com>. IN SOA 
homer.nine.homelinux.com <http://homer.nine.homelinux.com>. 1123345344 (
10802
3600
604800
38400
)
nine.homelinux.com <http://nine.homelinux.com>. IN NS 
homer.nine.homelinux.com <http://homer.nine.homelinux.com>.

homer.nine.homelinux.com <http://homer.nine.homelinux.com>. IN A
192.168.0.1<http://192.168.0.1>
router.nine.homelinux.com <http://router.nine.homelinux.com>. IN CNAME 
homer.nine.homelinux.com <http://homer.nine.homelinux.com>.


And here is my named.conf. It seems everythink is correct, do you see 
anything I am missing?
// generated by named-bootconf.pl

include "/etc/rndc.key";
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

// 
// a caching only nameserver config
// 
controls {
inet 127.0.0.1 <http://127.0.0.1> allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca <http://named.ca>";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};


zone "nine.homelinux.com <http://nine.homelinux.com>" {
type master;
file "/var/named/db.nine.homelinux.com";
allow-update {
key rdnckey;
};
};


Thanks for all the help,
Todd


On 8/12/05, Tim <ignored_mailbox at yahoo.com.au> wrote:
> 
> On Wed, 2005-08-10 at 16:14 -0500, Todd Nine wrote:
> 
> > I need some help with a DHCP client and I'm running into some
> > serious issues. I'll give a brief overview of what I want, what is
> > working, and where I need help.
> >
> > 1. What I want
> >
> > I would like to have all my DHCP clients to send their
> > hostname. This way I can connect to any client regardless of
> > OS.
> 
> This seems to depend on the client as much as the server. I couldn't
> get a Red Hat 9 client to send its desired hostname through to a Red Hat
> 9 DHCP server, though other client OSs certainly worked fine.
> 
> > 1. What is working
> >
> > I have a router/firewall running Fedora Core 2. It runs Bind
> > 9.2.3 and Dhcpd 3.0.1. I have successfully set up my domain
> > of nine.homelinux.com <http://nine.homelinux.com>, and I have dhcpd 
> updated the hosts in
> > that domain using a TSIG key. I can ping my router or any
> > other windows machine from a windows clients.
> 
> That domain name (homelinux.com <http://homelinux.com>) exists, is it 
> yours? (I see records
> for it through dyndns.org <http://dyndns.org>.) If not, you're going to 
> have (and possibly
> cause) problems.
> 
> > 1. What I need help with.
> >
> > Highest Priority
> >
> > I cannot get my Fedora 4 workstations to work correctly. They
> > send their hostname, and when I view the leases with the
> > webmin interface for dhcp, the hostname shows up. However, I
> > cannot ssh into them or ping them from my windows machines by
> > hostname, only by IP. I have included my /etc/dhclient.conf
> > on the first Fedora 4 box I'm trying to get working. See the
> > lower priority section below for logging from my DHCPd dns
> > section
> >
> > send host-name "marge";
> > send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
> > #send dhcp-lease-time 3600;
> > #supersede domain-name "nine.homelinux.com <http://nine.homelinux.com>";
> > #prepend domain-name-servers 127.0.0.1 <http://127.0.0.1>;
> > request subnet-mask, broadcast-address, time-offset, routers,
> > domain-name, domain-name-servers;
> > #require subnet-mask, domain-name-servers;
> > #timeout 60;
> > #retry 60;
> > #reboot 10;
> > #select-timeout 5;
> > #initial-interval 2;
> > #script "/etc/dhclient-script";
> > #media "-link0 -link1 -link2", "link0 link1";
> > #reject 192.33.137.209 <http://192.33.137.209>;
> >
> > #alias {
> > # interface "ep0";
> > # fixed-address 192.5.5.213 <http://192.5.5.213>;
> > # option subnet-mask 255.255.255.255 <http://255.255.255.255>;
> > #}
> >
> > #lease {
> > # interface "ep0";
> > # fixed-address 192.33.137.200 <http://192.33.137.200>;
> > # medium "link0 link1";
> > # option host-name "andare.swiftmedia.com <http://andare.swiftmedia.com>
> ";
> > # option subnet-mask 255.255.255.0 <http://255.255.255.0>;
> > # option broadcast-address 192.33.137.255 <http://192.33.137.255>;
> > # option routers 192.33.137.250 <http://192.33.137.250>;
> > # option domain-name-servers 127.0.0.1 <http://127.0.0.1>;
> > # renew 2 2000/1/12 00:00:01;
> > # rebind 2 2000/1/12 00:00:01;
> > # expire 2 2000/1/12 00:00:01;
> > #}
> 
> You're telling those clients to use themselves as their own DNS server
> (with the 127.0.0.1 <http://127.0.0.1> name server addresses, though I see 
> it's commented
> out). If they don't also run their own DNS server, and it isn't updated
> from your DHCP server, they won't be able to resolve names. The
> name-server address would normally be supplied as the address for the
> name server that the DHCP server is updating.
> 
> My DHCP configuration has the name of the DNS zone it has to update
> configured into it. Here's most of mine (minus other subnets):
> 
> /etc/dhcpd.conf
> 
> authoritative;
> 
> allow client-updates;
> 
> include "/etc/rndc.key"; # (same key used by BIND)
> 
> ddns-domainname "lan.localhost.";
> ddns-rev-domainname "in-addr.arpa.";
> ddns-update-style interim;
> ddns-updates on;
> 
> default-lease-time 21600; # 2 hours
> max-lease-time 43200; # 24 hours
> min-lease-time 30; # 30 seconds (might allow renewing
> experiments)
> 
> option domain-name "lan.localhost.";
> 
> option pop-server pop3.lan.localhost;
> option smtp-server smtp.lan.localhost;
> option wpad-curl code 252 = text;
> #option wpad-curl "http://proxy.lan.localhost/wpad.dat";
> option www-server www.lan.localhost;
> 
> option ntp-servers time.lan.localhost;
> option time-offset 34200; # Australian Central Standard Time
> #option time-offset 37800; # Central Australia Daylight Time
> 
> # Seem to be stupidly stuck with manually setting this!
> # Daylight savings: 2am last Sun of Oct - 3am first Sun of Apr
> 
> option ip-forwarding off; # tell clients not to act as gateways
> 
> shared-network lan.localhost {
> 
> option wpad-curl "http://proxy.lan.localhost/wpad.dat";
> 
> subnet 192.168.1.0 <http://192.168.1.0> netmask 255.255.255.0<http://255.255.255.0>{
> 
> range 192.168.1.100 <http://192.168.1.100> 192.168.1.200<http://192.168.1.200>
> ;
> 
> option routers 192.168.1.254 <http://192.168.1.254>; #gateway
> option subnet-mask 255.255.255.0 <http://255.255.255.0>;
> option broadcast-address 192.168.1.255 <http://192.168.1.255>;
> option domain-name-servers 192.168.1.254 <http://192.168.1.254>;
> 
> option netbios-dd-server 192.168.1.254 <http://192.168.1.254>;
> option netbios-name-servers 192.168.1.254 <http://192.168.1.254>; # WINS
> option netbios-node-type 8;
> option netbios-scope "";
> 
> option finger-server finger.lan.localhost;
> 
> zone 1.168.192.in-addr.arpa. {
> primary 192.168.1.254 <http://192.168.1.254>;
> key rndckey;
> }
> 
> zone lan.localhost. {
> primary 192.168.1.254 <http://192.168.1.254>;
> key rndckey;
> }
> 
> }
> 
> }
> 
> > Lower Priority
> >
> > I'm constantly getting these error messages in my DHCP logs.
> > Does anyone have any idea what this means?
> >
> > if bart.nine.homelinux.com <http://bart.nine.homelinux.com> IN A rrset 
> doesn't exist add
> > bart.nine.homelinux.com <http://bart.nine.homelinux.com> 300 IN A 
> 192.168.0.50 <http://192.168.0.50>: timed out.: 289
> > Time(s)
> > if lisa.nine.homelinux.com <http://lisa.nine.homelinux.com> IN A rrset 
> doesn't exist add
> > lisa.nine.homelinux.com <http://lisa.nine.homelinux.com> 300 IN A 
> 192.168.0.87 <http://192.168.0.87>: timed out.: 288
> > Time(s)
> > if maggie.nine.homelinux.com <http://maggie.nine.homelinux.com> IN A 
> rrset doesn't exist add
> > maggie.nine.homelinux.com <http://maggie.nine.homelinux.com> 300 IN A 
> 192.168.0.98 <http://192.168.0.98>: timed out.:
> > 41 Time(s)
> > if marge.nine.homelinux.com <http://marge.nine.homelinux.com> IN A rrset 
> doesn't exist add
> > marge.nine.homelinux.com <http://marge.nine.homelinux.com> 300 IN A 
> 192.168.0.83 <http://192.168.0.83>: timed out.:
> > 329 Time(s)
> 
> Could be permissions. I went through lots of fun before I got my DHCP
> server working with my DNS server. I had to ensure that the right
> ownership rights were applied to the directory where the DNS records
> lived ("named" username and group name, rwx for named user, not-rwx to
> everything else). And I had to ensure that both the DHCP and DNS
> servers were using the same RNDC key. And allow updates with the DNS
> server.
> 
> /etc/named.conf snippets:
> 
> controls {
> inet 127.0.0.1 <http://127.0.0.1> allow { localhost; } keys { rndckey; };
> };
> 
> include "/etc/named.custom";
> 
> include "/etc/rndc.key";
> 
> acl lan {
> 192.168/16;
> 127.0.0.1 <http://127.0.0.1>;
> };
> 
> options {
> directory "/var/named/";
> allow-query { lan; };
> query-source address * port 53;
> listen-on { 127.0.0.1 <http://127.0.0.1>; };
> listen-on { 192.168/16; };
> notify no;
> also-notify { 192.168.1.1 <http://192.168.1.1>; 192.168.1.4<http://192.168.1.4>; 
> };
> dialup yes;
> cleaning-interval 15;
> heartbeat-interval 120;
> interface-interval 15;
> };
> 
> zone "." {
> type hint;
> file "named.ca <http://named.ca>";
> };
> 
> zone "lan.localhost" {
> type master;
> file "lan.localhost.zone";
> allow-update { key "rndckey"; };
> allow-transfer { lan; };
> notify yes;
> };
> 
> zone "1.168.192.in-addr.arpa" {
> type master;
> file "1.168.192.in-addr.arpa.zone";
> allow-update { key "rndckey"; };
> allow-transfer { lan; };
> notify yes;
> };
> 
> 
> --
> Don't reply to my address directly, it's ignored. I read the mailing
> list.
> 
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050812/1b8ca8ed/attachment-0001.htm>


More information about the fedora-list mailing list