source: server/other/dhcp/dhcp-config.xml@ 25357c89

initial-import reorg
Last change on this file since 25357c89 was f45b1953, checked in by Mark Hymers <markh@…>, 22 years ago

Initial revision

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 2.3 KB
Line 
1<sect2>
2<title>Configuring dhcp</title>
3
4<sect3><title>Config files</title>
5<para><userinput>/etc/dhclient.conf</userinput></para>
6</sect3>
7
8<sect3><title>Configuration Information</title>
9
10<para>Information on configuring the dhcp client can be found in
11Chapter 06.</para>
12
13<para>Note that you only want to start the dhcp server if you want to
14issue LAN addresses over your network. The dhcp client doesn't need
15this script to be used. Also note that this script is coded for the
16'eth1' INTERFACE, which may need to be modified for your hardware
17configuration. With that in mind the dhcp init.d script can be created
18using the following commands.</para>
19
20<para><screen><userinput>cat &gt; /etc/rc.d/init.d/dhcp &lt;&lt; "EOF"</userinput>
21#!/bin/sh
22# Begin $rc_base/init.d/dhcp
23
24# Based on sysklogd script from LFS-3.1 and earlier.
25# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
26
27source /etc/sysconfig/rc
28source $rc_functions
29
30case "$1" in
31 start)
32 echo "Starting DHCP Server..."
33 loadproc dhcpd -q eth1
34 ;;
35
36 stop)
37 echo "Stopping DHCP Server..."
38 killproc dhcpd
39 ;;
40
41 reload)
42 echo "Reloading DHCP Server..."
43 reloadproc dhcpd
44 ;;
45
46 restart)
47 $0 stop
48 sleep 1
49 $0 start
50 ;;
51
52 status)
53 statusproc dhcpd
54 ;;
55
56 *)
57 echo "Usage: $0 {start|stop|reload|restart|status}"
58 exit 1
59 ;;
60esac
61
62# End $rc_base/init.d/dhcp
63<userinput>EOF
64chmod 755 /etc/rc.d/init.d/dhcp</userinput></screen></para>
65
66<para>The follow commands will create a base configuration file for a
67dhcp server. There are several options that you may want to
68add (information that is passed back to the dhcp client) and those are
69covered in the man pages for <filename>dhcp.conf</filename>.</para>
70
71<para><screen><userinput>cat &gt; /etc/dhcpd.conf &lt;&lt; "EOF"</userinput>
72default-lease-time 72000;
73max-lease-time 144000;
74
75subnet 192.168.5.0 netmask 255.255.255.0 {
76 range 192.168.5.10 192.168.5.240;
77 option broadcast-address 195.168.5.255;
78 option routers 192.168.5.1;
79}
80<userinput>EOF</userinput></screen></para>
81
82<para>All addresses should be changed to meet your circumstance.</para>
83
84</sect3>
85
86</sect2>
87
Note: See TracBrowser for help on using the repository browser.