D H C P - m i c r o h o w t o (V1.0 - 2003-02-09) ******************************************************* TABLE OF CONTENTS 1. DHCP server 2. DHCP client 3. Contact 1. DHCP server ============== This feature is implemented in the DHCP daemon (dhcpd). Frazierwall firewall ==================== This firewall can be downloaded from www.frazierwall.org. It's a Linux firewall based on the Linux Router Project. It fits on one single floppy disk and doesn't need any harddisk, monitor, keyboard or mouse! If you have an old pc and two networks card, try it! It's worth! The dhcp server is already installed on this firewall. It can be that it isn't started. In this case follow these steps: * boot the firewall * activate the DHCP server You must activate the DHCP server setting the "DHCPSERVER" value to "YES". You can edit directly the file /etc/frazierwall/frazierwall.conf or execute the following steps: - if you aren't in the firewall's menu, type lrcfg from shell - select menu "1) Change network settings" - select menu "2) FrazierWall Configuration File" - make the already described changes - press F10 to write the file - press F12 to exit * configure your personal network You must do something like this: # dhcpd.conf # # Configuration file for ISC dhcpd (see 'man dhcpd.conf') # subnet 192.168.128.0 netmask 255.255.255.0 { max-lease-time 7200; default-lease-time 7200; range 192.168.128.200 192.168.128.250; <- change option domain-name-servers @NAME-SERVERS@; option domain-name "myDomain"; <- change option nis-domain "myNisDomain"; <- change option subnet-mask 255.255.255.0; <- change option routers 192.168.128.1; <- change host pc1 <- change { hardware ethernet xx:xx:xx:xx:xx:xx; <- change fixed-address 192.168.128.10; <- change option host-name "pc1"; <- change } host pc2 <- change { hardware ethernet xx:xx:xx:xx:xx:xx; <- change fixed-address 192.168.128.20; <- change option host-name "pc2"; <- change } host ... { hardware ethernet ...; fixed-address ...; option host-name "..."; } } The most importat changes you must make are marked with "<- change". I don't want explain here in details how to configure your server. You can find a lot of documentation in internet. You can edit directly the file /etc/dhcpd.conf.tmp or execute the following steps: - if you aren't in the firewall's menu, type lrcfg from shell - select menu "3 ) Change package settings" - select menu "2) dhcpd" - select menu "1) DHCPd Configuration for LAN" - make the already described changes - press F10 to write the file - press F12 to exit * update your personal network configuration's file Normaly this will be done automaticaly every 1 minute. If you want be sure or have encountered some problem, force it's execution calling the following command from the shell: mkdhcpconf.sh This script is placed in /usr/sbin/ and overwrites your current /etc/dhcpd.conf refering it on your /etc/dhcpd.conf.tmp file. * start the dhcpd daemon calling the following command from the shell: dhcpd eth1 This should normaly happen automaticaly, but I encountered some problem whit this step and must start it manualy. 2. DHCP client ============== This feature is implemented in the DHCP client daemon (dhcpcd). If you want also assign your DNS server's list via dhcp, make a copy of your /etc/resolv.conf files, because it will be automaticaly overwritten at each dhcp request. You can do it with cp /etc/resolv.conf /etc/resolv.conf.orig Debian ====== * install the dhcpcd package with apt-get install dhcpcd * set up the /etc/dhcpc/config file. Here you can exactly choice what informations do you want to configure via dhcp. * stop your network interface Before configuring your network interface with a static ip, you must stop working the current configuration. Call the following command from the shell: ifconfig eth0 down * modify the file /etc/network/interfaces. Comment out the lines that configure a static IP address. These lines are something like #iface eth0 inet static #address 192.168.128.10 #netmask 255.255.255.0 #network 192.168.128.0 #broadcast 192.168.128.255 #gateway 192.168.128.1 To comment out simply put a # at the begin of each line. Insert the following line iface eth0 inet dhcp * start your new network configuration calling the following command: ifconfig eth0 up or if you are a Microsoft fan, execute a useless reboot and go drink a coffee. You should now be able to assign your IP address, and also any other parameters you have selected, via dhcp. 3. CONTACT ========== Any hints and corrections would be appreciated. mailto:eplanamente@gmx.net