From: tek on
I have configured my LAN to used DNS and DHCPD. The servers are
running on a Fedora 7 PC and the clients are a mixture of desktops and
laptops running Windows XP Home SP2. On the surface all seems to work
as it should. However, I have one problem and I hope I can explain it
in this scenario.

One of the laptops is used statically 85% of the time in my office.
The other 15% of the time I like to use this laptop in other parts of
the house (living room, bedroom, etc). When I do, I switch to the
wireless adaptor. Thereby, the DHCPD server offers a different IP
address. The host name stays the same though. The address is accepted
and the server acknowledges. However, the new DNS "A" record fails to
be written to the forward and reverse zone files. I really don't know
what questions to ask but maybe the probem is that a host name already
exist and is mapped to an IP address in the zone files. Does the IP
have to expire first and remove the host name/IP mapp from the zone
files before an update can take place? Or is this a bug?


These errors are captured in /var/log/messages:

Jan 16 01:55:00 linux dhcpd: DHCPDISCOVER from 00:1c:26:49:b1:c8
(VOSTRO) via eth0
Jan 16 01:55:01 linux dhcpd: DHCPOFFER on 192.168.0.128 to 00:1c:
26:49:b1:c8 (VOSTRO) via eth0
Jan 16 01:55:01 linux dhcpd: DHCPREQUEST for 192.168.0.128
(192.168.0.202) from 00:1c:26:49:b1:c8 (VOSTRO) via eth0
Jan 16 01:55:01 linux dhcpd: DHCPACK on 192.168.0.128 to 00:1c:
26:49:b1:c8 (VOSTRO) via eth0
Jan 16 01:55:21 linux dhcpd: DHCPDISCOVER from 00:1c:23:8d:96:47
(VOSTRO) via eth0
Jan 16 01:55:22 linux dhcpd: DHCPOFFER on 192.168.0.127 to 00:1c:23:8d:
96:47 (VOSTRO) via eth0
Jan 16 01:55:22 linux named[16894]: client 192.168.0.202#32844:
updating zone 'linux.org/IN': update unsuccessful: VOSTRO.linux.org
ame not in use' prerequisite not satisfied (YXDOMAIN)
Jan 16 01:55:22 linux named[16894]: client 192.168.0.202#32844:
updating zone 'linux.org/IN': update unsuccessful: VOSTRO.linux.org
: 'RRset exists (value dependent)' prerequisite not satisfied
(NXRRSET)
Jan 16 01:55:22 linux dhcpd: Forward map from VOSTRO.linux.org. to
192.168.0.127 FAILED: Has an A record but no DHCID, not mine.


This is the content of my dhcpd.conf:

# DHCP Server Configuration file.
#

authoritative;

server-identifier linux;
ddns-domainname "linux.org.";
ddns-rev-domainname "in-addr.arpa.";
ddns-update-style interim;
ddns-updates on;
do-forward-updates on;
allow client-updates;

key mykey {
algorithm hmac-md5;
secret "secret-key-hash";
};


zone linux.org. {
primary linux;
key mykey;
}

zone 0.168.192.in-addr.arpa. {
primary linux;
key mykey;
}

subnet 192.168.0.0 netmask 255.255.255.0 {

# The range of IP addresses the server
# will issue to DHCP enabled PC clients
# booting up on the network

range 192.168.0.121 192.168.0.129;

# Set the amount of time in seconds that
# a client may keep the IP address

# default-lease-time 86400;
# max-lease-time 86400;

default-lease-time 259200;
max-lease-time 259200;

# Set the default gateway to be used by
# the PC clients

option routers 192.168.0.1;

# Don't forward DHCP requests from this
# NIC interface to any other NIC
# interfaces

option ip-forwarding off;

# Set the broadcast address and subnet mask
# to be used by the DHCP clients

option broadcast-address 192.168.0.255;
option subnet-mask 255.255.255.0;

# Set the DNS server to be used by the
# DHCP clients

option domain-name "linux.org";
option domain-name-servers 192.168.0.202;

# Set the NTP server to be used by the
# DHCP clients

#option nntp-server 192.168.1.202;

# If you specify a WINS server for your Windows clients,
# you need to include the following option in the dhcpd.conf file:

option netbios-name-servers 192.168.0.202;

}


This is the content of my named.conf:

// named.conf
//

key mykey {
algorithm hmac-md5;
secret "secret-key-hash";
};

acl "home" { 192.168.0.0/24; 127.0.0.1; };

options {
allow-query { "home"; };
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "mykey"; };
};

zone "linux.org" IN {
type master;
file "/var/named/linux.zone";
allow-update { key mykey; };
allow-query { any; };
notify no;
};

zone "0.168.192.in-addr.arpa" IN {
type master;
file "/var/named/192-168-0.zone";
allow-update { key mykey; };
allow-query { any; };
notify no;
};
From: tek on
On Jan 16, 8:02 am, tek <kevind...(a)yahoo.com> wrote:
> I have configured my LAN to used DNS and DHCPD. The servers are
> running on a Fedora 7 PC and the clients are a mixture of desktops and
> laptops running Windows XP Home SP2. On the surface all seems to work
> as it should. However, I have one problem and I hope I can explain it
> in this scenario.
>
> One of the laptops is used statically 85% of the time in my office.
> The other 15% of the time I like to use this laptop in other parts of
> the house (living room, bedroom, etc). When I do, I switch to the
> wireless adaptor. Thereby, the DHCPD server offers a different IP
> address. The host name stays the same though. The address is accepted
> and the server acknowledges. However, the new DNS "A" record fails to
> be written to the forward and reverse zone files. I really don't know
> what questions to ask but maybe the probem is that a host name already
> exist and is mapped to an IP address in the zone files. Does the IP
> have to expire first and remove the host name/IP mapp from the zone
> files before an update can take place? Or is this a bug?
>
[snip]

No replies? I guess I'm trying something no one else has attempted? In
any case, I thought this was some type of Windows problem when dealing
with my original stated scenario. But after testing DDNS and DHCP with
anohter Linux machine, the results are the same. Here's what I did.
PC1 can be dual booted to RH9 and Windows XP. I made the sure that in
either case when I booted the machine the hostname would be the same
"home1". Of course in each boot the DHCP server PC2 assigns a
different IP to PC1 upon boot. So under RH9, home1 is assigned
192.168.0.129 and under Windows XP, home1 is assigned 192.168.0.128.
Since I booted up under Windows first the DNS record is properly
recorded in the zone files and no errors are recorded in /var/log/
messages. But when I boot into RH9, things go wrong. The client PC2
gets the IP address but I get the "prerequisite not satisfied
(XDOMAIN)" and "prerequisite not satisfied (NXRRSET)" errors through
the named service. Not to mention the errors reported by the DHCP
service, "Has an A record but no DHCID, not mine".

Lesson learn? It appears the hostname can't exist in the zone files or
the update process fails. I read through the DDNS RFC but I failed to
find any solution. I guess this is the way things are suppose to work.
Then again, if the DHCP server had expired the hostname and IP first,
I wonder if the zone files are updated at that point. Thereby making
it possible for the named service to update the second IP to the same
hostname in the zone files.



From: tek on
On Jan 22, 2:23 am, wahj...(a)gmail.com (Ashish Shukla आशीष शुक्ल)
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> >>>>> tek  writes:
>
>     tek> I have configured my LAN to used DNS and DHCPD. The servers are
>     tek> running on a Fedora 7 PC and the clients are a mixture of desktops and
>     tek> laptops running Windows XP Home SP2. On the surface all seems to work
>     tek> as it should. However, I have one problem and I hope I can explain it
>     tek> in this scenario.
>
>     tek> One of the laptops is used statically 85% of the time in my office.
>     tek> The other 15% of the time I like to use this laptop in other parts of
>     tek> the house (living room, bedroom, etc). When I do, I switch to the
>     tek> wireless adaptor. Thereby, the DHCPD server offers a different IP
>     tek> address. The host name stays the same though. The address is accepted
>     tek> and the server acknowledges. However, the new DNS "A" record fails to
>     tek> be written to the forward and reverse zone files. I really don't know
>     tek> what questions to ask but maybe the probem is that a host name already
>     tek> exist and is mapped to an IP address in the zone files. Does the IP
>     tek> have to expire first and remove the host name/IP mapp from the zone
>     tek> files before an update can take place? Or is this a bug?
>
> Did you tried dynamically adding/removing DNS records using
> 'nsupdate', hmm... ?
>
> I followedhttp://www.semicomplete.com/articles/dynamic-dns-with-dhcp/
> to configure my DHCPD + DDNS + BIND setup.
>
> HTH
> - --
> Ashish Shukla आशीष शुक्ल                      http://wahjava.wordpress.com/
> ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFHlZnhHy+EEHYuXnQRAirHAKCuwxZs7jxm71m/tG95KnrrVvCWpACg7Q5B
> EydKZLDSzVrZDSj4CewDIWk=
> =/UK4
> -----END PGP SIGNATURE-----


No. I have seen that command referenced in other post concerning this
issue. However, I don't want to have to go through 2-3 extra steps
just to get the laptop's wireless IP address configured for DNS. It's
no big deal now.
From: yetin37 on
Hi Tek,

I think it is simply that multiple interfaces on a DDNS client are not
supported in this configuration. What I've done in the past is to
define host records in dhcpd.conf for the wireless interfaces on
mobile machines. These do not specify a fixed-address butdo specify a
ddns-hostname. These override the client's requested hostname on the
wireless interface, but leave the LAN interface alone. This avoids
the 'duplicate hostname' problem you are getting.

A:>