:: [linux] Installing DHCP on RH7.2 ::
HOME


[Date Prev][Date Next][Date Index]

[linux] Installing DHCP on RH7.2


I got the everything up and running ...Below is a brief overview of the
steps I followed for the whole thing (just for the sake of future
documentation)

Step 1: I assume that the RH 7.2 box has been loaded with two NIC's.. One
connecting it to WAN (Public Internet, with static IP say 192.XX.XX.XX) and
the other is conected to the private network LAN (with another static IP
192.168.0.1)..
Also I assume that WAN = eth0, and LAN= eth1

Step 2: I also assume that IPtables has been properly setup.. Though this is
not absolutely necessary, i will assume that you would need to do that
sooner or later.
For my log notes on how I did this, refer to
http://mia.ece.uic.edu/~papers/linux/msg00017.html
and
http://mia.ece.uic.edu/~papers/linux/msg00018.html


Setting up DHCP:
--------------------

1. RH 7.2 comes with a default dhcpcd-xxxx.. However from some post on some
newsgroups, i found out that the one provided by www.isc.org was much
better.
So i decided to remove the old dhcpcd and downloaded and installed the other
one (v3.0pl1).
It is fairly straightforward to install this.

2. I configured the file /etc/dhcpd.conf as shown below.
**************************************************
default-lease-time 30000;
max-lease-time 30000;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 131.XXX.XX.254, 131.XXX.XX.254;
option domain-name "ccc.mmm.edu";
ddns-update-style interim;

subnet 131.XX.XX.0 netmask 255.255.255.0 {
}

subnet 192.168.0.0 netmask 255.255.255.0 {
   range 192.168.0.10 192.168.0.200;
}
***************************************************

3. Then i executed the following shell command.. dhcpd will not start unless
the below file is present... so i guess u will have to do this.

touch /var/state/dhcp/dhcpd.leases

4. Since i have Windows machines on the LAN, i have to add an extra entry in
the roting table.. for this you will have to run..
route add -host 255.255.255.255 dev eth1(Note that i have used eth1, since
this is my interface to private LAN)

5. After all this I start my Dhcpd
using the following command.%>dhcpd eth1Again note that i am using the eth1
interface.The dhcpd throw out a number of message and starts.. you can see
this using "ps -A | grep dhcpd"

6. Now on the Win2K machine, make sure that
the DHCP client service is running.. I had mistakenly disabled it and i had
to face a lot of problems.

7. Configure the TCP/Ip to get Automatic IP
address..

8. Restart the machine.

10. I tested this with WINce, Win2K and
WinXp.. Each one gets a dynamic IP.

11. You can checl the IP addresses
assigned to your machine using%>cat /var/state/dhcp/dhcpd.leases Hope this
saves a  lot of time for future users.Shashank