MORE - Transition Static IP to DHCPD

Andrew Bartlett abartlet at pcug.org.au
Fri Feb 23 05:47:23 GMT 2001


David Rankin wrote:
> 
> Andrew, I have DNS partially working and I have set up zones per the How-To.(at
> least nslookup works but I still cant log into my domain with dhcp - static IP
> logins still work fine).  dhcpd does gives my win9x clients addresses, I can use
> dhcpd -d -f and I get the following:
> 
> *************
> [root at Nemesis /root]# dhcpd -d -f
> Internet Software Consortium DHCP Server V3.0b2pl9
> Copyright 1995-2000 Internet Software Consortium.
> All rights reserved.
> For info, please visit http://www.isc.org/products/DHCP
> Wrote 1 leases to leases file.
> Listening on LPF/eth0/00:a0:cc:e2:4b:53/192.168.7.0
> Sending on   LPF/eth0/00:a0:cc:e2:4b:53/192.168.7.0
> Sending on   Socket/fallback/fallback-net
> DHCPDISCOVER from 00:a0:cc:e2:d4:bd (RANKIN) via eth0
> DHCPOFFER on 192.168.7.100 to 00:a0:cc:e2:d4:bd (RANKIN) via eth0
> if IN A RANKIN.rbpllc.com doesn't exist add 10800 IN A RANKIN.rbpllc.com
> 192.168.7.100: resolver failed.
> DHCPREQUEST for 192.168.7.100 from 00:a0:cc:e2:d4:bd (RANKIN) via eth0
> DHCPACK on 192.168.7.100 to 00:a0:cc:e2:d4:bd (RANKIN) via eth0
> if IN A RANKIN.rbpllc.com doesn't exist add 10800 IN A RANKIN.rbpllc.com
> 192.168.7.100: resolver failed.
> DHCPREQUEST for 192.168.7.100 from 00:a0:cc:e2:d4:bd (RANKIN) via eth0
> DHCPACK on 192.168.7.100 to 00:a0:cc:e2:d4:bd (RANKIN) via eth0
> 
> *************
> 
> I know my win9x client gets the 192.168.7.100 IP address because I can use
> "winipcfg" on the win9x side and see that my win9x box received, and is in fact
> using the address. I simply can't log onto the domain.  I have been through the man
> pages and I have a few questions on setting up ddns so I can log into my domain with
> DHCP:
> 
> 1.  If I am just trying to get this working, do I need the key DHCP_UPDATER {} TSIG
> stuff for ddns?

Most defiantly

> 2.  If so, where does it go in the dhcpd.conf and named.conf files? (global or
> subnet sections)

global, but see the examples in 'man dhcpd.conf'

> 3.  Where do I put the zone info in dhcpd.conf? (inside or outside of the subnet
> designation)

the domain name assigned to the clients is used - if not overridden by
ddns-domain-name

> 4.  Could you send me a copy of a dhcpd.conf, named.conf and zone files so I can use
> them as a reference?

See the examples - most of mine as 'interesting' 

> 
> Please take a look at the files below and let me know if I need to change anything
> around.
> 
> ************ my dhcpd.conf currently looks like this:
> 
> subnet 192.168.7.0 netmask 255.255.255.0 {
>  # default gateway
>  option routers 192.168.7.13;
>  option subnet-mask 255.255.255.0;
>  option domain-name "rbpllc.com";
>  option domain-name-servers 192.168.7.14;
>  option netbios-name-servers 192.168.7.14;
>  #option nis-domain "rbpllc.com";
> 
>  ddns-domainname "rbpllc.com"

This looks right

>  ddns-rev-domainname "in-addr.arpa"

Not necessary

> 
>  range dynamic-bootp 192.168.7.20 192.168.7.100;
>  default-lease-time 21600;
>  max-lease-time 43200;
> }
> 
> ******************* My named.conf is at work (never fails)

You need the zone that is to be updated to have 'allow updates', again
see the example in dhcpd.conf's manpage

> 
> ******************* My zone file is as follows:
> 
> ; Filename: /var/named/rbpllc.com
> 
> rbpllc.com.             SOA     Nemesis.rbpllc.com. david.rbpllc.com. (
>                                  2001022200      ; Serial number
>                                       86400      ; Refresh     1 day
>                                        7200      ; Retry       2 hours
>                                     3600000      ; Expire      41.67 days
>                                      172800 )    ; Minimum TTL 2 days
> 
> rbpllc.com.             NS      Nemesis.rbpllc.com.
> //rbpllc.com.           NS      bcs.cox-internet.com.
> rbpllc.com.             MX      0       mail.rbpllc.com.
> 
> www.rbpllc.com.         A       192.168.7.12
> Nemesis.rbpllc.com.     A       192.168.7.14
> mail.rbpllc.com.        A       192.168.7.14
> localhost               A       127.0.0.1
> gw                      A       192.168.7.13
> 
> **************** My reverse file is as follows:
> 
> ; Filename: /var/named/192.168.7
> 
> 7.168.192.in-addr.arpa.   SOA  Nemesis.rbpllc.com. david.rbpllc.com. (
>                                  2001022200      ; Serial number
>                                       86400      ; Refresh     1 day
>                                        7200      ; Retry       2 hours
>                                     3600000      ; Expire      41.67 days
>                                      172800 )    ; Minimum TTL 2 days
> 
> 7.168.192.in-addr.arpa.         NS      Nemesis.rbpllc.com.
> ;42.168.192.in-addr.arpa.        NS      ns2.isp.net.
> 
> 14.7.168.192.in-addr.arpa.      PTR     Nemesis.rbpllc.com.
> 14.7.168.192.in-addr.arpa.      PTR     mail.rbpllc.com.
> 13.7.168.192.in-addr.arpa.      PTR     gw
> 
> ******************
> 
> That's it, I still need help... Thanks for any further help you can offer.
> 
> drankin at cox-internet.com
> 
> Andrew Bartlett wrote:
> 
> > David Rankin wrote:
> > >
> > > Andrew, I need a few more pearls of wisdom....
> > >
> > > I configured dhcp with a basic config and dhcpd starts just fine. I have run
> > > dhcpd -d -f to see what happens when I try to connect with a Win9x box. The
> > > results are
> > > DHCPOFFER (etc.. IP assigned to MAC Address)
> > > DHCPACK (same stuff, etc.. IP assigned to MAC Address)
> > > fallback (This is from memory, maybe failover, etc)
> > >
> > > On the windows side I get a message that the domain password supplied is
> > > incorrect. (The domain login works just fine with static IPs - I don't get it)
> > >
> > > I thinks this is a DNS problem? I have setup named.conf, resolve.conf,
> > > host.conf and nsswitch.conf files as per the HOW-TOs for a simple caching only
> > > DNS set up. I don't have an outside connection to the net yet (that comes next
> > > week), so all I am trying to do is get DHCP working on the private side of my
> > > net.  Like I mentioned in my last post, if I use static IPs, my Linux/Samba
> > > box works great for Win95, Win98 and WinME machines.
> > >
> >
> > You need to define your own zones, as per the HOW-TOs, and serve them
> > from your nameserver.
> >
> > > named is up and running. I can do a nslookup and get the proper response from
> > > localhost. However, when I try to lookup the fqdn of the samba box or the
> > > machine next to me I get nothing (except an error)
> > >
> > > On boot, I do experience a NIS and ypbind error. (still under investigation -
> > > any hints here would help as well)
> >
> > Are you running NIS?  If not, remove ypbind (rpm -e) and the various
> > things that depend on it (within reason).  Edit /etc/nsswitch.conf to
> > remove references to nis other 'interseting' name resoultion methods
> > (this isn't strictly necercery, but I think it makes things simpiler to
> > debug).
> >
> > >
> > > I am struggling to rationalize the interplay between DHCP and the dynamic DNS
> > > setup you spoke of. I am also struggling to understand the interplay between
> > > DHCP,DNS,NIS and yp. I quess what I'm looking for is someone to say:
> > >
> > > "Hey dummy, it aint that tough. You need to make sure (X. Y. and Z.)  are
> > > installed and working.  And then do (A, B and C). I have ISC DCHP 3.0b2 and
> > > Bind 8 installed. Any help you can give will be greatly appreciated.
> > >
> > > I'm off to dig through the BIND documentation. If I'm headed in the wrong
> > > direction, please let me know.
> > >
> >
> > BIND doco will only help you so much, the dhcpd.conf manpage has most of
> > the examples you will need.  However, this presumes that you have your
> > DNS set up correctly in the first place.
> >
> > Also you will do well to specify the location of the WINS server in the
> > dhcpd.conf, so machines can quickly and easily find your domain server
> > for the domain logon.  (See example in samba doco)
> >
> > Hope this helps,
> > Andrew Bartlett
> >
> > > David Rankin
> > > drankin at cox-internet.com
> > > Nacogdoches, Texas
> > >
> > > David Rankin wrote:
> > >
> > > >  Second Post, Some initial responses, but I need more concrete
> > > >  information. If anybody has additional information, please give me your
> > > >  thoughts..
> > > >
> > > >  I currently have a Linux box with Samba 2.07 serving a Win95, two Win98s
> > > >  and a WinME machine. The install is a Mandrake 7.2 server install on the
> > > >  Linux box. Right now I have all my machines using static IP's 192.168.0.10
> > > >  (11,12&13). My smb.conf "name reslove order" = wins lmhosts host bcast.
> > >
> > > >
> > > >  I want to use DHCP and get rid of the static IP's.  I have samba as my
> > > >  wins server and each of my machines is listed in lmhost and host. I have
> > > > each
> > > > of my Win9x machines listing the other Win9x machines and the Linux box as
> > > >  DNS servers (not sure about this one, but --  My net runs great!)
> > > >
> > > >  I need advise on how to make the transition to DHCP. I have read the
> > > >  HOW-TOs and I am confortable with dhcpd and the dhcp.conf entries and
> > > >  dhcp.leases files.
> > > > All of this is in preparation for adding a cable modem and Linksys cable/dsl
> > > > router to my setup.
> > >
> > > Andrew Bartlett wrote:
> > >
> > > > The way I run all my networks is to install DHCP 3.0b2 from www.isc.org
> > > > (or the RPM from Mandrake's Cooker if they are up to date) and run it as
> > > > a Dynamic DNS server (ie setup a DNS domain for your office, and have
> > > > DHCP dynamically update it).  I never use hosts/lmhosts files, and I use
> > > > Samba's WINS server with its 'dns proxy' option.  I would not use the
> > > > DHCP server on your Linksys, but give it a static IP and list it as the
> > > > default route out of your network.
> > > >
> > > > Hope this helps,
> > > > Andrew Bartlett
> > > >
> > > > --
> > > > Andrew Bartlett
> > > > abartlet at pcug.org.au
> >
> > --
> > Andrew Bartlett
> > abartlet at pcug.org.au

-- 
Andrew Bartlett
abartlet at pcug.org.au




More information about the samba mailing list