DHCP - University of Scranton

Download Report

Transcript DHCP - University of Scranton

DHCP
Ana Maria Chanaba
Robert Huylo
7/21/2015
DHCP
Client-Server Interaction
• The DHCP is composed of
– DHCP client asks the DHCP server for
an allocation of resources.
– DHCP server allocates the network
resource according to the request from
the DHCP client.
– DHCP relay agent relays the request
and the reply packets between the
DHCP client and DHCP server.
7/21/2015
DHCP Model
7/21/2015
Fundamental Idea
• To look for dhcp servers, a client sends the
DHCPDISCOVER message.
• The dhcp server that receives the
DHCPDISCOVER message transmits a
DHCPOFFER message to the client.
• The client selects a server and transmits a
DHCPREQUEST message.
• The dhcp server that receives this
DHCPREQUEST message sends back a
DHCPPACK message with allocated resource
information to the client.
• Finally the client can be connected to the network
using the receive information.
7/21/2015
DHCP Message Flow
7/21/2015
Reusing a Previously Allocated
Network Address
• If the client remembers and wishes to
reuse a previously allocated address,
the client may choose to omit some
of the steps described in previous
section.
• The DHCPREQUEST message
includes the clients network address.
• Servers with knowledge of the clients
configuration respond with a
DHCPACK message.
7/21/2015
IP address allocation methods
• Dynamic allocation
- DHCP assigns an IP address to a client for a
limited period of time
• Manual allocation
- Admin assigns IP address manually and DHCP
is used only to convey the address to a client
• Automatic allocation
- DHCP assigns a permanent IP address to a
client
7/21/2015
Dynamic allocation
• The client's current address as recorded in the client's
current binding, ELSE
• The client's previous address as recorded in the client's
(now expired or released) binding, if that address is in the
server's pool of available addresses and not already
allocated, ELSE
• The address requested in the 'Requested IP Address'
option, if that address is valid and not already allocated,
ELSE
• A new address allocated from the server's pool of available
addresses; the address is selected based on the subnet
from which the message was received (if 'giaddr' is 0) or on
the address of the relay agent that forwarded the message
('giaddr' when not 0).
7/21/2015
Manual allocation
• Binding between IP address and MAC
address of a client
• Mapped manually
• EX:
host lab13 {
hardware ethernet 00:C0:F0:30:D7:11;
fixed-address 134.198.161.50;
}
7/21/2015
Automatic allocation
• Bindings between IP addresses and
MAC addresses are mapped
automatically.
• Similar to Dynamic allocation. Lease
time is infinite.
• IP address can still be released
(DHCPRELEASE) by client leaving
network and later recycled
7/21/2015
References
man pages – dhcpd.conf, dhcpcd,
dhcpd, dhcpd.leases
DHCP RFC 2131 -- R. Droms
Text – Chp. 13.7
www.tcpipguide.com
7/21/2015