Documente Academic
Documente Profesional
Documente Cultură
4. DHCPACK
This message is sent by the DHCP server in response to DHCPREQUEST recieved
from the client. This message marks the end of the process that started with
DHCPDISCOVER. The DHCPACK message is nothing but an acknowledgement
by the DHCP server that authorizes the DHCP client to start using the network
configuration it received from the DHCP server earlier.
The steps mentioned below assume that DHCP functionality is enabled by default
on the client side.
Here are the steps :
Step 1: When the client computer (or device) boots up or is connected to a
network, a DHCPDISCOVER message is sent from the client to the server. As
there is no network configuration information on the client so the message is sent
with 0.0.0.0 as source address and 255.255.255.255 as destination address. If the
DHCP server is on local subnet then it directly receives the message or in case it is
on different subnet then a relay agent connected on clients subnet is used to pass
on the request to DHCP server.
Step 2: When the DHCP server receives the DHCPDISCOVER request message
then it replies with a DHCPOFFER message. As already explained, this message
contains all the network configuration settings required by the client. For example,
the yaddr field of the message will contain the IP address to be assigned to client.
Similarly the the subnet mask and gateway information is filled in the options
field. Also, the server fills in the client MAC address in the chaddr field. This
message is sent as a broadcast (255.255.255.255) message for the client to receive
it directly.
Step 4: Once the server receives DHCPREQUEST from the client, it sends the
DHCPACK message indicating that now the client is allowed to use the IP address
assigned to it. The client enters the bound state during this step.
Configuring a DHCP Server
1.First, install the package as root:
# yum install dhcp
Installing the dhcp package creates a file, /etc/dhcp/dhcpd.conf, which is merely
an empty configuration file:
The sample configuration
version/dhcpd.conf.sample.
file
can
be
found
at
/usr/share/doc/dhcp-
DHCP also uses the file /var/lib/dhcpd/dhcpd.leases to store the client lease
database
2. Configuration file
The first step in configuring a DHCP server is to create the configuration file that
stores the network information for the clients.
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.
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.
DHCP can also be used to assign a predefined, static address to a specific client.
To identify a client configured with a static address, dhcpd uses the hardware
ddress (which is a globally unique, fixed numerical code consisting of six octet
airs) for the identification of all network devices (for example, 00:30:6E:08:EC:80
host jupiter {
hardware ethernet 00:30:6E:08:EC:80;
fixed-address 192.168.2.100;
}
The name of the respective client (host hostname, here jupiter) is entered in the
irst line and the MAC address in the second line. a client with a network card
aving the MAC address 00:30:6E:08:EC:80 is assigned the IP address
92.168.2.100 and the hostname jupiter automatically.