Monday, 29 December 2014

DHCP Configuration in Debian 6



DHCP Server Configuration :

Features:
  1. Provide automatic IP configuration to the clients.
  2. All network settings can be supplied by DHCP server such as IP Address, Subnet mask, Gateway, DNS server, Option Domain name etc.
  3. DHCP server bound to UDP port 67 and client UDP:68

Installation :
  1. apt-get install dhcp3-server

Important binaries:
  1. '/etc/dhcp/dhcpd.conf' – main configuration files
  2. ''/etc/init.d/isc-dhcp-server' main deamon for controlling DHCP service.
  3. '/var/lib/dhcp ' - DHCP db for IP lease information

DHCP Configuration to your environment :
  1. nano /etc/dhcp/dhcpd.conf – Place the following directives
#### DHCP Server Configuration File
option domain-name-servers 192.168.1.1;
option domain-name "linux.internal";
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;

authoritative;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.253;
default-lease-time 600;
max-lease-time 7200;
}
### Host binding with specific IP address
host linuxmint {
hardware ethernet 20:16:d8:58:31:8f ;
fixed-address 192.168.1.10;
}

Starting DHCP service:
  1. service isc-dhcp-server start | stop | restart | reload
  2. /etc/init.d/isc-dhcp-server start | stop | restart | reload
  3. invoke-rc.d isc-dhcp-server start | stop | restart | reload
All the above three method does the same thing.

Enabling Log facility with rsyslog
  1. nano /etc/rsyslog.conf – and make the follownig changes
    local7.* /var/log/dhcpd.log
  2. service rsyslog restart

No comments:

Post a Comment