DHCP Server Configuration :
Features:
- Provide automatic IP configuration to the clients.
- All network settings can be supplied by DHCP server such as IP Address, Subnet mask, Gateway, DNS server, Option Domain name etc.
- DHCP server bound to UDP port 67 and client UDP:68
Installation :
- apt-get install dhcp3-server
Important binaries:
- '/etc/dhcp/dhcpd.conf' – main configuration files
- ''/etc/init.d/isc-dhcp-server' main deamon for controlling DHCP service.
- '/var/lib/dhcp ' - DHCP db for IP lease information
DHCP Configuration to
your environment :
- 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:
- service isc-dhcp-server start | stop | restart | reload
- /etc/init.d/isc-dhcp-server start | stop | restart | reload
- invoke-rc.d isc-dhcp-server start | stop | restart | reload
All the above three method
does the same thing.
Enabling Log facility
with rsyslog
- nano /etc/rsyslog.conf – and make the follownig changeslocal7.* /var/log/dhcpd.log
- service rsyslog restart
No comments:
Post a Comment