source: server/other/dhcp/dhcp-config.xml@ 1d873b0

10.0 10.1 11.0 11.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk upgradedb v1_0 v5_0 v5_0-pre1 v5_1 v5_1-pre1 xry111/intltool xry111/test-20220226
Last change on this file since 1d873b0 was 1d873b0, checked in by Larry Lawrence <larry@…>, 20 years ago

multimedia and server cleanup

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

  • Property mode set to 100644
File size: 2.6 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 14.</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 lease file must exist on startup. The following command will
67satisfy that requirement:</para>
68
69<para><screen><userinput>touch /var/cache/dhcp/dhcpd.leases</userinput></screen></para>
70
71<para>The follow commands will create a base configuration file for a
72dhcp server. There are several options that you may want to
73add (information that is passed back to the dhcp client) and those are
74covered in the man pages for <filename>dhcp.conf</filename>.</para>
75
76<para><screen><userinput>cat &gt; /etc/dhcpd.conf &lt;&lt; "EOF"</userinput>
77default-lease-time 72000;
78max-lease-time 144000;
79ddns-update-style ad-hoc;
80
81subnet 192.168.5.0 netmask 255.255.255.0 {
82 range 192.168.5.10 192.168.5.240;
83 option broadcast-address 195.168.5.255;
84 option routers 192.168.5.1;
85}
86<userinput>EOF</userinput></screen></para>
87
88<para>All addresses should be changed to meet your circumstance.</para>
89
90</sect3>
91
92</sect2>
93
Note: See TracBrowser for help on using the repository browser.