http://server.ccl.net/pub/chemistry/software/UNIX/netfilter/dhcpd/readme.shtml |
CCL readme.html | ||||
|
Installing dhcpd on your LAN interface under Red Hat 7.3Sins committed in Dec 2002, but Jan K. Labanowski, jkl@ccl.netDisclaimer: all stuff below is a nonsense, and you cannot rely on any of this. Only laywers can tell you how to install your software reliably, or how to sue someone for giving you the wrong advice. The advice below is wrong, and you should not use it, and you cannot sue me either, since you have been warned that this is nonsense. You can also post it wherever you want, provided that you include this notice, or remove any trace of my identity from this memo. -- Jan Labanowski, jkl@ccl.net. Please send corrections to me at jkl@ccl.net and be lenient on me if I do not answer -- I am kind of busy lately. You may often prefer to have an option that your firewall acts also as DHCP server, i.e., it assigns a dynamic, temporary IP address to a computer when it requests it, e.g., when it boots. Note that static and dynamic IP addresses can coexists safely on the LAN. You need to specify the range of addresses to be used for static addressing, and select a range of addresses to be used for dynamic assignment. In my case, I use static addresses for the desktop computers (which do not move), and the dynamic addresses for the laptops. Static addresses have the advantage since you can assign some services to them (e.g., print server, NFS server, etc) and they will not change their IP addresses. However, when your computer is a client by definition (e.g., a laptop which you carry to work, to hotels, and then bring home), the DHCP is very handy. Installing dhcpdTo do this, you need to install dhcp (namely, dhcpd -- DHCP daemon). DO not confuse this with a dhcpcd (DHCP client daemon). The DHCP is the server which provides the IP addresses for computers which request it. The DHCP Client daemon is the program running on the computer which requests the address, and renews/maintains it. I used the RPM package: dhcp-2.0pl5-8.i386.rpm which is available
on the 2nd CD in RH 7.3 distribution under RedHat/RPMS. You can also
get it from the net, e.g.:
ftp://rpmfind.net/linux/redhat/7.3/en/os/i386/RedHat/RPMS/dhcp-2.0pl5-8.i386.rpm rpm -Uhv dhcp-2.0pl5-8.i386.rpmBy default it will come inactive on boot. You need to add a few things. dhcpd.confThe /etc/dhcpd.conf file: subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.127 192.168.0.254; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.1; option domain-name-servers 192.159.44.10, 211.158.23.19; option domain-name "mylan";This assumes that you will be returning addresses for the "nonroutable" subnet: 192.168.0.0. Only addresses in the range from 192.168.0.127 to 192.168.0.254 will be served. This way you can use addresses in the range: 192.168.0.2 to 192.168.0.126 for your computers with static assigned addresses. The routers option relates to the IP address of your router interface (in my case eth1) which is connected to the internal LAN. In my case, it has the IP address: 192.168.0.1. The domain-name-servers is a VERY IMPORTANT ENTRY. It is intentionally BOGUS in the above example (note that digits are larger than 7 in the example above). You take these numbers from the file: /etc/resolv.conf on your firewall. Those are usually assigned by your Internet Service Provider. You can also run your own DNS server, and then you give its address here (e.g., if you ran it on the firewall [bad idea], than it would be 192.168.0.1). Domain name in the above example is what you want to assigne to your internal network internally. It does not matter for the world outside, since they only see your firewall, and the name/address assigned to it. |
[ CCL Home Page ]
[ dhcpd ]
[ Raw Version of this page ]
Modified: Tue Dec 17 16:13:32 2002 GMT |
Page accessed 322 times since Tue Mar 15 07:09:45 2005 GMT |