DHCP Help Again

Joel Jaeggli joelja at darkwing.uoregon.edu
Thu Apr 11 12:27:47 EDT 2002


You have to have a host-specific value to key on... that would be the mac 
address...

you can approach the problem a different way (dynamic dns) so that the 
machine get the same hostname regardless of what ip they get but that's 
more trouble than it's worth for a cluster...

 On Wed, 10 Apr 2002 
tegner at nada.kth.se wrote:

> Quoting "Robert G. Brown" <rgb at phy.duke.edu>:
> Is there a convenient way to obtain static ip-addresses using dhcp without
> having to explicitly write down the mac-addresses in dhcpd.conf?
> 
> Regards,
> 
> /jon
> 
> 
> 
> > On Wed, 3 Apr 2002, Adrian Garcia Garcia wrote:
> > 
> > For one thing don't use the range statement -- it tells dhcpd the range
> > of IP numbers to assign UNKNOWN ethernet numbers.  You are statically
> > assigning an IP number in your "free" range to a particular host with a
> > KNOWN ethernet number below.  I don't know what dhcpd would do in that
> > case -- something sensible one would hope but then, maybe not.  The
> > range statement is really there so you can dynamically allocate
> > addresses from the range to hosts you may never have seen before that
> > you don't care to ever address by name (as they might well get a
> > different IP number on the next boot).  
> > 
> > DHCP servers run by ISP's not infrequently use the range feature to
> > conserve IP numbers -- they only need enough to cover the greatest
> > number of connections they are likely to have at any one time, not one
> > IP number per host that might ever connect.  Departments might use it to
> > give IP numbers to laptops brought in by visitors (with the extra
> > benefit that they can assign a subnet block that isn't "trusted" by the
> > usual department servers and/or is firewalled from the outside by an
> > ip-forwarding/masquerading host).
> > 
> > You want "only" static IP's in your cluster, as you'd like nodo1 to be
> > the same machine and IP address every time.
> > 
> > Be a bit careful about your use of domain names.  As it happens, I don't
> > find cluster.org registered yet (amazingly enough!) but it is pretty
> > easy to pick one that does exist in nameservice in the outside world.
> > In that case you'll run a serious risk of routing or name resolution
> > problems depending on things like the search order you use in
> > /etc/nsswitch.conf.  Even my previous example of rgb.private.net is a
> > bit risky.
> > 
> > You should run a nameserver (cache only is fine) on your 192.168.1.1
> > server, presuming it lives on an external network and you care to
> > resolve global names.
> > 
> > Similarly you may want:
> > 
> >  option routers		192.168.1.1;
> > 
> > if you want internal hosts to be able to get out through your (presumed
> > gateway) server.
> > 
> > Finally, if you want nodo1 to come up knowing its own name without
> > hardwiring it in on the node itself, add
> > 
> >  option host-name	nodo1;
> > 
> > to its definition.
> > 
> > I admit that I do tend to lay out my dhcpd.conf a bit differently than
> > you have it below but I don't think that the differences are
> > particularly significant, and you have a copy of the one I use anyway if
> > you want to play with the pieces.  You should find a log trace of
> > dhcpd's activities in /var/log/messages, which should help with any
> > further debugging.
> > 
> > On your nodo1 host, make sure that:
> > 
> > cat /etc/sysconfig/network-scripts/ifcfg-eth0
> > DEVICE=eth0
> > BOOTPROTO=dhcp
> > ONBOOT=yes
> > 
> > and
> > 
> > cat /etc/sysconfig/network
> > NETWORKING=yes
> > HOSTNAME=nodo1
> > 
> > and that in /etc/modules.conf there is something like:
> > 
> > cat /etc/modules.conf
> > alias parport_lowlevel parport_pc
> > alias eth0 tulip
> > 
> > (or instead of tulip, whatever your network module is).
> > 
> > If you then boot your e.g. RH client it SHOULD just come up,
> > automatically try to start the network on device eth0 using dhcp as its
> > protocol for obtaining and IP number, ask the dhcp server for an address
> > and a route, and just "work" when they come back.
> > 
> >   Hope this helps.
> > 
> >        rgb
> > 
> > > server-name "server.cluster.org"
> > >  
> > > subnet 192.168.1.0 netmask 255.255.255.0
> > > {
> > >   range 192.168.1.2         192.168.1.10   #my client has the ip
> > > 192.168.1.2
> > >                                                                 #and
> > my
> > > server the static ip 192.168.1.1
> > >  option subnet-mask                             255.255.255.0;
> > >  option broadcast-address                    192.168.1.255;
> > >  option domain-name-server                 192.168.1.1;  
> > >  option domain-name                            "cluster.org";
> > >  
> > >  host  nodo1.cluster.org
> > >  {
> > >     hardware ethernet 00:60:97:a1:ef:e0; #here is the address of the
> > > client's card
> > >     fixed-address        192.168.1.2;
> > >  }
> > > } 
> > >  
> > > And finally some files on my server.
> > >  
> > > NETWORK
> > > ------------------------------------------
> > > networking = yes
> > > hostname =server.cluster.org
> > > gatewaydev = eth0
> > > gatewaye=
> > > ------------------------------------------
> > >  
> > > HOSTS ( In my server and in the client I have the same on this file )
> > > ------------------------------------------
> > > 127.0.0.1             localhost
> > > 192.168.1.1         server.cluster.org
> > > 192.168.1.2         nodo1.cluster.org
> > >  
> > >  
> > > Ok thats the information, I am a little confuse, could you help me
> > please
> > > =). I can´t detect the mistake, I dont know if is the server or some
> > card
> > > =s. Thanks for all.
> > > 
> > >
> > ________________________________________________________________________________
> > > Get your FREE download of MSN Explorer at http://explorer.msn.com.
> > > _______________________________________________ Beowulf mailing list,
> > > Beowulf at beowulf.org To change your subscription (digest mode or
> > > unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
> > > 
> > 
> > -- 
> > Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
> > Duke University Dept. of Physics, Box 90305
> > Durham, N.C. 27708-0305
> > Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu
> > 
> > 
> > 
> > _______________________________________________
> > Beowulf mailing list, Beowulf at beowulf.org
> > To change your subscription (digest mode or unsubscribe) visit
> > http://www.beowulf.org/mailman/listinfo/beowulf
> > 
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
> 

-- 
-------------------------------------------------------------------------- 
Joel Jaeggli	      Academic User Services   joelja at darkwing.uoregon.edu    
--    PGP Key Fingerprint: 1DE9 8FCA 51FB 4195 B42A 9C32 A30D 121E      --
The accumulation of all powers, legislative, executive, and judiciary, in 
the same hands, whether of one, a few, or many, and whether hereditary, 
selfappointed, or elective, may justly be pronounced the very definition of
tyranny. - James Madison, Federalist Papers 47 -  Feb 1, 1788


_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list