DHCP, DNS - 7th Semester Notes
Download
Report
Transcript DHCP, DNS - 7th Semester Notes
DHCP
Dynamic Host Configuration Protocol
Introduction
Client administration:
IP address management:
They need to ease the process of joining the network and they
do not want users to do any special configuration (DHCP)
They want to network boot their workstations
Solution: Deploy a DHCP server
Machine names management:
i.e. Diskless workstations or remote OS installation (acquiring the
network setting during boot process)
They need to be able to name machines and access them by
names instead of IP addresses
Solution: Deploy A DNS server
So we discuss on DHCP and DNS in this session
DHCP
Provides configuration parameters specific to the DHCP client host
requesting, information required by the client host to participate on
an IP network
Method of IP allocation
Manual
Automatic
Only requesting clients with a MAC address listed in the table (MACIP pairs) get the IP address according to the table
DHCP server permanently assigns to a requesting client a free IPaddress from a range given by the administrator
Dynamic
The only method which provides dynamic re-use of IP addresses
The request-and-grant process uses a lease concept with a
controllable time period.
DHCP cont.
DHCP server can provide optional configuration
e.g. Subnet Mask, Router, Name Server, …
RFC 2132 defines DHCP options Usage
DHCP relay agent (mostly in network routers/high-end switches)
Relays DHCP Discover broadcasts from a LAN without DHCP to
a network which has one
Usage
US
UK
Cable Internet providers use DHCP
DSL providers prefer PPPoE
Many broadband ISP networks use DHCP
XDSL providers use infinite lease Semi-static IPs
Office networks, public internet access
Places where there are mobile nodes that want to access the net
DHCP Implementations
Microsoft introduced DHCP on their NT server with Windows NT 3.5
in late 1994
DHCP did not originate from Microsoft
Internet Software Consortium published DHCP for Unix variants
Version 1.0.0 released on December 6, 1997
Version 2.0 on June, 1999 – A more RFC-compliant one
Novell included a DHCP server in NetWare OS since v. 5, 1999
It integrates with Novell eDirectory
Weird solutions introducing a variety of multiplatform DHCP
implementations since 1997
Cisco since Cisco IOS 12.0 in February 1999
Sun added DHCP support in Solaris 8, July 2001
DHCP Packet
DHCP
Message
Field
Description
Specifies the type of the Dynamic Host Configuration Protocol (DHCP)
message. Set to 1 in messages sent by a client (requests) and 2 in
messages sent by a server (response).
Specifies the network LAN architecture. For example, the ethernet type
Hardware Type
is specified when htype is set to 1.
Hardware
Link-layer address length (in bytes); defines the length of hardware
Address
address in the chaddr field. For Ethernet, this value is 6.
Length
Hops
Number of relay agents that have forwarded this message.
Transaction Used by clients to match responses from servers with previously
identifier
transmitted requests.
Elapsed time (in seconds) since the client began theDynamic Host
seconds
Configuration Protocol (DHCP) process.
Flags field is called the broadcast bit, can be set to 1 to indicate that
Flags
messages to the client must be broadcast
Client’s IP address; set by the client when the client has confirmed that
ciaddr
its IP address is valid.
Operation
Code
DHCP
Message
Field
yiaddr
siaddr
Description
Client’s IP address; set by the server to inform the client of the client’s
IP address.
IP address of the next server for the client to use in the configuration
process (for example, the server to contact for TFTP download of an
operating system kernel).
giaddr
Relay agent (gateway) IP address; filled in by the relay agent with the
address of the interface through which Dynamic Host Configuration
Protocol (DHCP) message was received.
chaddr
Client’s hardware address. (Layer 2 address)
sname
Name of the next server for client to use in the configuration process.
Name of the file for the client to request from the next server (for
example the name of the file that contains the operating system for this
client).
file
Pros and Cons
Pros
Simplifies the task of assigning IP numbers to each
machine in the network makes easy to add, remove or
move a host can assign defaults: default gateway, domain
name, DNS server, WINS server (if any) . ability to have
fewer IP# than hosts
Cons
if DHCP server is down, all hosts are down hard to keep
information on free and used IP #.
DHCP is an unauthenticated protocol.
DHCP Message Exchange
Discover: client tries to find
out what servers are out
there.
Offer: those servers that
can provide this service
respond
Request: client selects one
offer and makes a request
ACK: server acks the
request
When 50% of the lease
period is expired, client asks
for a renewal.
If ACK received, reset timer.
If NAK, go back to initializing
state.
DHCP Anatomy
Uses the same IANA assigned ports as BOOTP
67/udp for the server, 68/udp for the client
DHCP Messages
Discover
Client broadcasts on the local physical subnet to find servers
UDP packet (broadcast dest. 255.255.255.255)
Offer
Server determines the configuration based on the client’s MAC addr.
Server specifies the IP address and put optional parameters
Request
Also request last-known IP address (optional parameter)
Client selects a configuration out the DHCP Offer packet and
broadcasts it again
Acknowledge
Server acknowledges the request and sends the ack to the client
DHCP Anatomy cont.
Inform
Client requests more information than the server sent with the
DHCPACK, or to repeat data for a particular application (e.g.
to obtain web proxy settings by a browser)
Release
Client requests the server to release the DHCP and the client
unconfigures its IP address
Sending this message is not mandatory (unplug or …)
BOOTP
BOOTstrap Protocol (RFC 951)
UDP
Used to obtain IP address automatically
Usually in booting process of computers or OSs
Historically used for UNIX-like diskless workstations
Diskless workstations
Also obtains the locations of the boot image
Also can be used for installing a pre-configured OS
Protocol became embedded in the BIOS of some NICs
Allowing direct network booting without need for a floppy
BOOTP cont.
Recently used for booting a Windows OS in diskless
standalone media center PCs
DHCP is a more advanced protocol base on BOOTP
Far more complex to implement than BOOTP
Most DHCP servers also offer BOOTP support
Duration based leases is the fundamental addition in DHCP
Dynamic in DHCP is for this
BOOTP cont.
BOOTP places its packet inside a UDP packet (note that
BOOTP is an application layer program).
The BOOTP server issues a passive open command on
UDP port number 67 and waits for a client.
A booted client issues an active open command on port
number 68. The message is encapsulated in a UDP
user datagram and then in an IP packet. In the IP
packet the source address is all 0s and the destination
address is all 1s.
BOOTP
When client and server are on different networks, we
need a relay agent, because client does not know IP
address of server, and a limited broadcast address gets
dumped by the local router. Relay agent knows the IP
address of the server