1. Explain with principle: the DHCP server and client communication process
DHCP stands for Dynamic Host Configuration
Protocol. It handles the automatic assignment of IP addresses and other
configuration settings for devices on your network. DHCP automates Network and
Sharing Center in your control panel. This is especially good for people who
have laptops, aren't hooked up to the Internet all the time and often move from
place to place with their portable devices. They can simply get a new IP
address as needed without having to do it manually. DHCP is designed to make
the assignment of IP addresses and other network configuration information
faster and easier.
DHCP
is a protocol that uses Level 4 on the OSI model. It communicates using User Datagram
Protocol (UDP) datagrams through UDP Port 68. DHCP works with most current and
past Windows clients, and also Linux, Macintosh, and many network-capable
printers. DHCP is designed to make the assignment of IP addresses and other
network configuration information faster and easier.
Rather than going around
to every device on your network and setting up its network configuration
manually, you can use your DHCP server to set up pools of addresses, called scopes,
from which clients can request a temporary IP address.
DHCP
is a client-server protocol that uses DHCP servers and DHCP clients. A DHCP
server is a machine that runs a service that can lease out IP addresses and
other TCP/IP information to any client that requests them. The DHCP server
typically has a pool of IP addresses that it is allowed to distribute to clients,
and these clients lease an IP address from the pool for a specific period of
time, usually several days. Once the lease is ready to expire, the client contacts
the server to arrange for renewal.
DHCP
clients are client machines that run special DHCP client software enabling them
to communicate with DHCP servers. All versions of Windows include DHCP client
software, which is installed when the TCP/IP protocol stack is installed on the
machine. DHCP clients obtain a DHCP lease for an IP address, a subnet mask, and
various DHCP options from DHCP servers in a four-step process:
1. DHCPDISCOVER: The client broadcasts a request for a
DHCP server.
2. DHCPOFFER: DHCP servers on the network offer an
address to the client
3. DHCPREQUEST: The client broadcasts a request to
lease an address from one of the offering DHCP servers.
4. DHCPACK: The DHCP server that the client responds to
acknowledges the client, assigns it any configured DHCP options, and updates
its DHCP database. The client then initializes and binds its TCP/IP protocol
stack and can begin network communication.
1. Define DHCP. Explain the DHCP
server configuration.(any Linux)
Ans:
The dhcp package contains an ISC
DHCP server. First, install the package as the superuser:
~]#yum install dhcp (sudo apt-get
install isc-dhcp-server)
Installing the dhcp package creates
a file, /etc/dhcp/dhcpd.conf, which is merely an
empty configuration file:
~]#cat /etc/dhcp/dhcpd.conf
#
# DHCP Server Configuration file.
# see
/usr/share/doc/dhcp*/dhcpd.conf.sample
The sample configuration file can
be found at
/usr/share/doc/dhcp-<version>/dhcpd.conf.sample.
We should use this file to
help you configure
/etc/dhcp/dhcpd.conf, which is explained in detail below.
Configuration File: The first step in configuring a DHCP server is to
create the configuration file that stores the network information for the
clients. Use this file to declare options and global options for client
systems. The configuration file can contain extra tabs or blank lines for
easier formatting. Keywords are case-insensitive and lines beginning with a
hash sign (#) are considered comments.
There are two types of statements
in the configuration file:
Parameters — State how to perform a task, whether to perform a
task, or what network configuration options to send to the client.
Declarations — Describe the topology of the network, describe
the clients, provide addresses for the clients, or apply a group of parameters
to a group of declarations.
The
parameters that start with the keyword option are referred to as options. These
options control DHCP options; whereas, parameters configure values that are not
optional or control how the DHCP server behaves Parameters (including options)
declared before a section enclosed in curly brackets ({ }) are considered
global parameters. Global parameters apply to all the sections below it. Restart
the DHCP daemon for the changes to take effect If the configuration file is
changed, the changes do not take effect until the DHCP daemon is restarted with
the command service dhcpd restart (sudo systemctl restart isc-dhcp-server).
Check if our DHCP service has been
started or not using command:
sudo systemctl status
isc-dhcp-server
3. What are DHCP components.
Explain them.
Ans: These components work together to automate IP
addressing.
·
DHCP leases
·
DHCP scopes
·
DHCP
reservations
·
DHCP options
·
DHCP relay
agents
DHCP leases:
Client type has to do with the type of devices on
your network, such as desktop computers,
mobile notebooks, and servers. If
we have more than the usual number of laptops on our network, the length of
lease duration should decrease.
we
should estimate the connection time, or the average length of time our clients
spend on the network. If this time is relatively low, such as 2 to 4 hours,
your lease duration doesn't have to be as long. An important factor is the
number of IP addresses you have available, as well as the number of clients who
need DHCP's range of addresses.
If
we have a lot of clients in relation to our number of available addresses, a
shorter lease duration is advisable to avoid running out of IP addresses For
most networks, the default settings should be sufficient. Shorter lease times
would be necessary for networks with many clients that connect for less than a
day. A college campus is a good example, since campuses usually offer free
wireless access for their students, who are typically connected for a few hours
a day.
DHCP Scope:
A DHCP Scope is a range of IP addresses and related
configuration information available by request
from a DHCP client. These scopes
usually represent a single subnet, or segment of a network. Each scope is a continuous range of IP addresses defined by a
beginning IP address and an ending
IP address. If we need to exclude IP
addresses, we must create exclusions for those addresses. One reason for creating these addresses might be hardware with static
IP addresses, like printers.
DHCP Reservations:
Well, in some cases, a network device needs to have
a static IP address. An example would be a server, a router, or a network
printer.
In the DHCP role console, we reserve these
addresses using the list below. Use
these option codes to reserve IP addresses in DHCP.
3: Router
6: DNS server
15: DNS domain name
42: NTP server
44: WINS server (NetBIOS name
server)
45: NetBIOS datagram disribution
server (NBDD)
46: WINS/NetBIOS node type
47: NetBIOS scope ID
51: Lease Time
53: DHCP message type
55: Special option type used to
communicate a parameter request list to the DHCP server
58: Renewal time value (T1)
59: Rebind time value (T2)
DHCP
Options:
DHCP options are basic
settings that a client needs for proper network communication. These options include an IP address, a
subnet mask, a default gatewar, primary and
secondary DNS servers, primary and secondary Windows Internet Name Service
(WINS) if
applicable, and DHCP lease
expiration. we can define these options when creating the scope or change them
later. Server options are settings defined on each server that apply to all
scopes on a specific DHCP server.
Scope options are settings defined
on each scope that apply only to the scope to which they
are added. Router options are
typically defined using scope options, which override server options. Server
options are usually used for network resources whose IP addresses are the same
for all scopes, such as DNS and WINS.
DHCP
Relay Agent:
DHCP requests are
broadcast messages that cannot be routed, so they are limited to the subnet of the client requesting an IP
address. You can choose one of two
options to get around this. You can have a DHCP server on each subnet, which may be expensive and,
therefore, implausible. Or, you can use a DHCP relay agent to forward DHCP requests. This agent accepts the broadcast packets and converts them to
unicast packets that can traverse a
routed network and vice versa when the DHCP server replies to the client requesting an IP address. Most modern routers support the
passing of DHCP requests.
Excellent blog post.
ReplyDeleteMCITP Training in Chennai
MCITP Training Institute in Chennai
MCITP Training Center in Chennai
MCITP Training Course in Chennai
MCITP Training