|
SLAC CPE Software
Engineering Group |
||||||||||
|
|
|
||||||||
Programmers' Guides, Users' Guides
18-Jun-2012
DHCP Configuration DHCP, Dynamic Host Configuration Protocal, implemented via dhcpd, automatically assigns IP and other network configuration information (subnet mask, broadcast address) to computers on a network. IP addresses are either dynamically assigned from a range, or statically assigned by MAC address. A DHCP client will send out a broadcast request to the DHCP server requesting an address. The DHCP server will then issue a "lease" and assign it to that client. DHCP, a superset of BOOTP, provides service to both DHCP cleint and BOOTP cleints. DHCP reduces the ammount of time required to configure clients and allows one to move a computer to various networks and be configured with the appropriate IP address, gateway and subnet mask
DHCP Installation mount -t nfs 134.79.151.39:/share1 /nfs/nas03 [root@lcls-srv20 ~]# rpm -qa | grep dhcp DHCP daemon Setup /sbin/chkconfig --list dhcpd /sbin/chkconfig dhcpd on DHCP restart service dhcpd restart
DHCP Server Configuration dhcpd, DHCP daemon, is configured in /etc/dhcpd.conf. A leases file is kept in /var/lib/dhcp/dhcpd.leases. [root@mccsrv01 ~]# cat /etc/dhcpd.conf #Required for dhcp 3.0+ / RHEL4 +. Otherwise, dhcpd wont start. ddns-update-style interim; # default DNS to be used by DHCP clients option domain-name-servers mcc-pep.slac.stanford.edu, mccdev-pep.slac.stanford.edu; # default gateway to be used by DHCP clients option routers 172.19.55.1; # default subnet mask to be used by DHCP clients # default broadcast address to be used by DHCP clients } ... more exmaples with comments... The configuration file is visible to the public via http://www.slac.stanford.edu/grp/cd/soft/unix/DHCP.html DHCP Client Configuration .... make entry here... DHCP Test First, test configuration file for syntax errors with the following command: /etc//init.d/dhcpd configtest, while monitoring /var/log/messages ( tail –f /var/log/messages ) for any error messages. It is important to test the configuration file if there is any change made, before restart dhcpd. ....make entry here... When dhcpd is running it will generate entries in the file: /var/lib/dhcp/dhcpd.leases DHCP monitoring login mccsyslog tail –f /var/log/messages | grep mccsrv
How to update DHCP service 1) on mccsrv01, update /etc/dhcpd.conf 2) set up monitoring login mccsyslog tail –f /var/log/messages | grep mccsrv 3) on mccsrv01, service dhcpd restart 4) test: unplug sunray63 (on Ken's desk) and plug, monitor tail –f /var/log/messages | grep mccsrv 5) scp dhcpd.conf to mccsrv02 and restart dhcp on mccsrv02 Ken's Original Note Test config on mccsrv01
|
DHCP Management:
|
Programmers' Guides, Users' Guides, Requirements, Design, Papers, Administration, How-To, Hardware, IOC, Database
Created by: Ken Brobeck 14-May-2010
Modified by Jingchen Zhou 31-Aug-2010