Contact us

Dynamic Host Configuration Protocol or DHCP Server

Dynamic Host Configuration Protocol Server or DHCP Server is a solution in automatic IP address assignment to a workstation in a network. This will give us great advantage especially in large network with multiple workstations.

The server will be assigning a lease to a workstation configured to search a DHCP Server. After the lease time will expire a new IP address will be assigned to that workstation. The IP address will also change if the workstation will be restarted. This can be altered by using the MAC address of an Ethernet device. The physical address of the Ethernet will be bind to a specific address. In effect the IP address will be the same even if the workstation will be restarted.

We can also control on workstations that will access the network by adding a directive to dhcpd.conf that block unregistered Ethernet physical address from accessing the network.

DHCP in real life application

DHCP makes the life of the Network Administrator a bit easier because it will only be a one time setup and the workstations will automatically be assigned with IP address and solving conflict in IP addressing and reducing the time in troubleshooting. The down side is when the DHCP server will have maintenance or worst the server will be corrupted then the workstations will not be able to have its IP address rendering the Network communication useless. As an advice always have a backup on servers as much as possible because we don’t know what will happen in the near future. As an administrator be ready round the clock and prepare for the worst scenarios.

Configure inteface

Content dhcpd.interfaces

#       $OpenBSD: dhcpd.interfaces,v 1.1 1998/08/19 04:25:45 form Exp $
#
# List of network interfaces served by dhcpd(8).
#
# ep0
# ed0 le0
# de1
de0

DHCP configuration file


# DHCP server options.
# See dhcpd.conf(5) and dhcpd(8) for more information.
#

# Network: 172.16.1.0/255.255.255.0
# Domain name: openbsd.mydomain.com
# Name servers: 172.16.1.106 and 172.16.1.107
# Default router: 172.16.1.107
# Addresses: 172.16.1.1 - 172.16.1.220
#

############################
# this is to specify to the dhcpd server that
# some of the subnets share the same network information
############################
shared-network MY-NETWORK {

############################
# The three lines below are to specify the shared resources
# for all the subnets specified below
#
# order of options
# Lease duration: one week (7 days)
# domain name for DNS and such
# DNS servers to use for lookups
############################
default-lease-time 604800;
option domain-name "openbsd.mydomain.com";
option domain-name-servers 172.16.1.106, 172.16.1.107;

############################
# Specify the subnet to give ips on and the netmask
# given with the ip address
############################
subnet 172.16.1.0 netmask 255.255.255.0 {
#specify the subnet again (see below NB***)
option subnet-mask 255.255.255.0;
#specify the broadcast address for the subnet
option broadcast-address 172.16.1.255;
#specify the gateway to use
option routers 172.16.1.107;

#specify the range of IPaddresses to lease
range 172.16.1.1 172.16.1.220;
}

# If you want a pseudo-static IP
host rainel {
hardware ethernet 00:13:D4:1B:27:A0;
fixed-address 172.16.1.51;
}
}

Another view of our sample dhcpd.conf

Enjoy!

 

Bookmark and Share RSS News Feed