performing notes
performing notes
performing notes
Installing and configure DHCP server and write a program to install the software on remote
machine.
Theory:
DHCP stands for Dynamic Host Configuration Protocol. DHCP is a standardized network
protocol used on Internet Protocol networks for dynamically distributing network configuration
parameters, such as IP addresses for interfaces and services. DHCP Server can be any server
(Linux or Windows) that is used to distribute IP addresses automatically to the clients in the
network. Since, DHCP Server assigns IP addresses automatically to all systems, a system or
Network administrator need not to assign IP addresses manually to every single machine in the
network. DHCP is opt for system or Network administrator who is managing thousands of
systems.
The Dynamic Host Configuration Protocol (DHCP) is a network service that enables host
computers to be automatically assigned settings from a server as opposed to manually
configuring each network host. Computers configured to be DHCP clients have no control over
the settings they receive from the DHCP server, and the configuration is transparent to the
computer's user.
The most common settings provided by a DHCP server to DHCP clients include:
• However, a DHCP server can also supply configuration properties such as:
• Host Name
• Domain Name
• Time Server
• Print Server
The advantage of using DHCP is that changes to the network, for example a change in the
address of the DNS server, need only be changed at the DHCP server, and all network hosts will
be reconfigured the next time their DHCP clients poll the DHCP server. As an added advantage,
it is also easier to integrate new computers into the network, as there is no need to check for the
availability of an IP address. Conflicts in IP address allocation are also reduced.
A DHCP server can provide configuration settings using the following methods:
Automatic allocation
Using this method, the DHCP automatically assigns an IP address permanently to a device,
selecting it from a pool of available addresses. Usually DHCP is used to assign a temporary
address to a client, but a DHCP server can allow an infinite lease time.
The last two methods can be considered "automatic" because in each case the DHCP server
assigns an address with no extra intervention needed. The only difference between them is in
how long the IP address is leased, in other words whether a client's address varies over time.
Ubuntu is shipped with both DHCP server and client. The server is dhcpd (dynamic host
configuration protocol daemon). The client provided with Ubuntu is dhclient and should be
installed on all computers required to be automatically configured. Both programs are easy to
install and configure and will be automatically started at system boot.
Configuration
DHCP server configuration is not that difficult. First, we have to assign on what interfaces
should the DHCP server (dhcpd) serve DHCP requests. In my case, I have only one Interface on
my system (eth0), so I assigned eth0.
sudo vi /etc/default/isc-dhcp-server
[...]
INTERFACES="eth0"
sudo vi /etc/dhcp/dhcpd.conf
[...]
# option definitions common to all supported networks...
[...]
If this DHCP server is the official DHCP server for the local network, you should uncomment the
following line:
[...]
authoritative;
[...]
Define the sunbet, range of ip addresses, domain and domain name servers like below:
[...]
default-lease-time 600;
max-lease-time 7200;
}
[...]
If you want to assign a fixed IP address to your client, you should enter it’s MAC id and the IP
address in the following directive. For example, I want to assign a fixed IP address 192.168.1.15
to my Ubuntu client, therefore I modified the following directive as shown below.
[...]
host ubuntu-client {
fixed-address 192.168.1.15;
[...]
After making all the changes you want, save and close the file. Be mindful that if you have
unused entries on the dhcpd.conf file, comment all of them. Otherwise, you’ll get issues while
starting dhcp service.
In Ubuntu 15.04:
Now, go to the client configuration network settings and change the IP settings to Automatic
(DHCP).
Restart the network or reboot the client system to get IP address automatically from the DHCp
server.
Now, you should see the IP address has been automatically assigned to the clients from the
DHCP server.
sudo ifconfig
Sample output:
As you see in the above picture, Ubuntu 14.04 desktop system which has MAC id
00:22:64:4f:e9:3a got a fixed IP address (192.168.1.15) from the DHCP server.
Oral Questions
1. what is mean by DHCP and how does DHCP do?