l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2001 Dec 30 17:14

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] ATTN: Henry; dhcpd config
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] ATTN: Henry; dhcpd config



keywords: dhcp, dhcpd, dhcpd.conf, dhcpd.config example, static dhcp hosts

It is not completely dynamic, but may provide you with some examples...

http://mike.passwall.com/macnc/macncb.html

The above was designed to allow for a user to enter in a bunch of data for
a staticly assigned IP address/network info for a single host in a subnet
and allow for making a modified dhcp server (isc with patch) to allow Macs
to boot from a Linux box.

(Please do not expect it to be perfect. Some day later I will make it all
dynamic. The header specifically will not be modified in the cgi output -
yet.)

You can change some of the data on the table and press submit. It will
generate a sample dhcpd.conf file with some things you will need to
manually change. (For example, the header that sets the interfaces does
not dynamically get its data from the form like the individual host entry
does.) It should give you a framework from which to derive your own
entries.

Please ignore the entries:
 filename 
 server-name 
 next-server
 option mac-version
 option mac-machine-name
 option mac-password
 option mac-nb-img
 option mac-apps-img
 option mac-client-nb-img

for your host entry.

One of these days, I will update the form's cgi to allow for completely
dymanic data based on user input, but this suffices for now.

-ME

Here is a sample dhcpd.conf on a machine with multiple interfaces (one of
these not used to serve addresses) with a mix of dynamic and static
addresses:



#How many seconds to allow default lease in seconds
default-lease-time 600;
#Max time to allow clients to lease before they expire their own
# lease/drop
max-lease-time 7200;
#default domain name for client to add to search list with hostname
# lookups:
option domain-name "passwall.com";
# default DNS:
option domain-name-servers 172.16.0.3;
#Allow for backwards compatiblity to bootp clients:
allow bootp;

#subnet definitions:
# (All static hosts within the stated subnet should be included here too)
subnet 172.16.0.0 netmask 255.255.224.0 {
# All of these options immediatly listed below are inheirited by
#  individual static hosts unless over-ridden locally
 option subnet-mask 255.255.224.0;
 option broadcast-address 172.16.31.255;
 option routers 172.16.0.3;
 #notice how static assignemtns reside outside this range of dyn bootp:
 range dynamic-bootp 172.16.30.1 172.16.31.254;
 allow unknown-clients;
 # These are the node types for netbios options:
 #1 = B-node, 2 = P-node, 4 = M-node, 8 = H-node
 option netbios-node-type 8;
 option netbios-name-servers 172.16.0.1;

 #static assignments:
 # NOTICE: hosts for this subnet are withing this subnet declaration
 #  It is close after the last static host
 host sun360 {
  hardware ethernet 01:02:03:04:05:06;
  fixed-address 172.17.51.10;
  #This is used to server my 3/60 a tftp binary file/kernel
  filename "/private/tftpboot/Mac OS ROM";
  # tftp server
  server-name "172.17.0.3";
  # also tftp just in case
  next-server 172.17.0.3;
 }

 #Simple declaration. Inheirits the other entries of this subnet listed
 #  above (gateway/router, subnet mask, bcast, etc)
 host WAP1 {
 hardware ethernet 10:24:3a:5f:8b:18;
 fixed-address 172.16.0.20;
 }

}

subnet 172.16.32.0 netmask 255.255.224.0 {
 option subnet-mask 255.255.224.0;
 option broadcast-address 172.16.63.255;
 option routers 172.16.32.3;
 range dynamic-bootp 172.16.63.1 172.16.63.254;
 deny unknown-clients;
 option netbios-node-type 8;
 option netbios-name-servers 172.16.0.3;

 host WAP0 {
 hardware ethernet f0:a4:aa:cf:33:ee;
 fixed-address 172.16.32.20;
 }

}

subnet 172.16.64.0 netmask 255.255.224.0 {
 option subnet-mask 255.255.224.0;
 option broadcast-address 172.16.95.255;
 option routers 172.16.64.3;
 range dynamic-bootp 172.16.95.1 172.16.95.254;
 deny unknown-clients;
 option netbios-node-type 8;
 option netbios-name-servers 172.16.0.3;

 #static assignment:
 host WAP1 {
 hardware ethernet 30:64:59:ef:55:88;
 fixed-address 172.16.64.20;
 }

}

#dont serve to this interface, or do anything:
subnet 209.204.181.0 netmask 255.255.255.0 {
not authoritative;
}


-----BEGIN GEEK
CODE
BLOCK-----
Version: 3.12
GCS/CM$/IT$/LS$/S/O$ !d--(++) !s !a+++(-----) C++$(++++) U++++$(+$) P+$>+++ 
L+++$(++) E W+++$(+) N+ o K w+$>++>+++ O-@ M+$ V-$>- !PS !PE Y+ !PGP
t@-(++) 5+@ X@ R- tv- b++ DI+++ D+ G--@ e+>++>++++ h(++)>+ r*>? z?
------END GEEK CODE BLOCK------
decode: http://www.ebb.org/ungeek/ about: http://www.geekcode.com/geek.html
     Systems Department Operating Systems Analyst for the SSU Library

On Thu, 27 Dec 2001, Ryan wrote:
> Henry, at the demo you mentioned that dhcpd coulde be configured to always 
> give specified MAC (hardware) addresses the same IP. Could I please see an 
> example of how to do this?

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.