Sunday, November 7, 2010

ISC DHCP Server Configuration

The dhcpd server is a server that allows clients to connect to the DHCP server and requests the IP address and gateway / dns. DHCP is used in most of the major networks as a means of easy to manage IP addresses. Linux is just a server, dhcpd called creative. Dhcpd is available on the website on the Internet Software Consortum isc.org. The server must be available from your distribution, however, so check withdistribution.
ISC provides only the standard package tarball, so if your distribution does not provide the dhcpd package, it will go to the SAI kit. Download the file and extract it using the following commands:

gunzip dhcpd version.tar.gz
tar-xvf dhcpd Version.tar

Be sure to replace the current version to version. Now run the following commands:

CD dhcpd version
. / Configure
to
make install

DHCPD installwithout problems, if not, please contact the mailing list on the ISC website. There are only three tasks with dhcpd, the first is to edit the configuration file. Put the following in / etc / dhcpd.conf:

# / Etc / dhcpd.conf from Christopher Peace
ddns-update-style ad-hoc;
default-lease-time 259200;
max-lease-time 300000
option subnet-mask 255.255.255.0;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1;
subnet192.168.0.0 netmask 255.255.255.0
{Range 192.168.0.20 192.168.0.40;
range 192.168.0.50 192.168.0.90;}

Of course you want to replace the router, domain server, netmask, and range of what your network. So, I have a network that I use DHCP for a total of 60 IP addresses assigned. This range is from 0.20 -. 40, 0.50 and -. 90. DHCPD only IP addresses within this range, as I like to keep 0.1 -. 19, -. 49 .41, and .91 -. Free for servers and as 254.The "default-lease-time 'and' max-lease-time" settings are used to indicate how long the DHCP lease will last if the customer does not require additional time (default), and when asked the most .. time (max) This time is in seconds if you have a static IP assigned to a host, use the following syntax in the file / etc / dhcpd.conf.:

Host Joe {hardware ethernet
00: C0: F0: 25: b7: 15;
fixed-address 192.168.0.205;}

This will be the IP address of 192.168.0.205 to any Joetime to request an IP. The MAC address is the address of Ethernet hardware.

Now we enter the next step, create the directory / var / state / dhcp / dhcpd.leases:

touch / var / state / dhcp / dhcpd.leases

DHCPD can now start to try it. First, if you currently have another DHCP server on the network, turn on that. Then do the following:

/ Usr / sbin / dhcpd

Finally, the launch of a DHCP client (if using Windows 98/2000/XP/NT, pleaseThe ipconfig command to release the IP and then renew typing:

ipconfig / release_all
ipconfig / renew_all

This should take a little ', since the DHCP client is looking for the source server. After a little' time out, and then query the network for DHCP servers, finding our Linux. Now, once you are sure DHCPD works, we need an init script for the creation of DHCPD. This is used to start, stop and restart the dhcpd. This script initrun automatically at startup to start dhcpd. Put the following in / etc / init.d / dhcpd:

#! / Bin / sh
# / Etc / init.d / dhcpd Christopher Pace
In "$ 1"
start)
echo-n "Starting dhcpd: dhcpd"
start-stop-daemon - start - quiet - exec / usr / sbin / dhcpd
echo "."
,,
stop)
echo-n "Stopping dhcpd: dhcpd"
killall -9 dhcpd
echo "."
,,
restart)
echo-n "Starting dhcpd: dhcpd"
killall-HUP dhcpd
echo"."
,,
*)
echo "Usage: / etc / init.d / dhcpd {start | stop | start | reload | force-reload}"> & 2
exit 1
,,
ESAC
exit 0
You should now:
chmod 700 / etc / init.d / dhcpd
ntsysv

Thanks To : Toshiba Satellite Laptops Store. LOWER Prices Inkjet Printer Ink

No comments:

Post a Comment