Friday, October 2, 2009

Linux DHCP Configuration with Description

Linux DHCP Configuration with Description

# Use this to enble / disable dynamic dns updates globally.
ddns-update-style none;
===============================================================
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
===============================================================
#Disable BOOTP clients to get dynamic addresses
#default is DENY
deny bootp;
===============================================================
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
# Normally No Need to add that line in DHCP.Conf
authoritative;
===============================================================
# Declaration for DHCP Network
subnet 9.1.97.0 netmask 255.255.255.0
{
#DHCP Range
range 9.1.97.50 9.1.97.200;
# Set Broadcast address for client
option broadcast-address 9.1.97.255;
# Set subnet mask for client
option subnet-mask 255.255.255.0;
# Set Domain Name
option domain-name "aungmyoko.com";
# Set Gateway Address
option routers 9.1.97.254;
# Set DNS server Address
option domain-name-servers 9.1.97.254;
# Don't forward DHCP requests from this NIC interface
# to any other NIC interfaces
option ip-forwarding off;
# Set the NTP server to be used by the DHCP clients
option nntp-server 9.1.97.10;
# If you specify a WINS server for your Windows clients,
# you need to include that option in DHCP.Conf
option netbios-name-servers 192.168.1.11;
# Set the amount of time in seconds that client may keep IP.
# 24 hours=86400
default-lease-time 3600;
max-lease-time 7200;
}
===============================================================
# You can also assign specific IP addresses based on the clients'
# ethernet MAC address as follows (Computer's name is "amk")
host amk
{
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 9.1.97.222;
}
===============================================================
DHCP.CONF Eg…
ddns-update-style none;
log-facility local7;
deny bootp;
subnet 9.1.97.0 netmask 255.255.255.0
{
range 9.1.97.50 9.1.97.200;
option broadcast-address 9.1.97.255
option subnet-mask 255.255.255.0;
option domain-name "aungmyoko.com";
option routers 9.1.97.254;
option domain-name-servers 9.1.97.254;
option ip-forwarding off;
option nntp-server 9.1.97.10; # NTP Server Address
option netbios-name-servers 192.168.1.11; #WINS Server Address
default-lease-time 3600;
max-lease-time 7200;
}
host amk
{
hardware ethernet 08:00:2b:4c:59:23;
fixed-address 9.1.97.222;
}

No comments: