ApplicationLayerProtocols - DHCP-DNS
ApplicationLayerProtocols - DHCP-DNS
1
Dynamic Host Configuration
Protocol (DHCP)
Dynamic Assignment of IP
addresses
Dynamic assignment of IP addresses is desirable for
several reasons:
IP addresses are assigned on-demand
Avoid manual IP configuration
Support mobility of laptops
Reverse Address Resolution Protocol (RARP)
It is an absolute protocol
Works similar to ARP
Broadcast a request for the IP address associated with a
given MAC address
RARP server responds with an IP address
Only assigns IP address (not the default router and
subnetmask)
Not only assign IP address, but also default router, network mask, etc.
Sent as UDP messages (UDP Port 67 (server) and 68 (host))
Use limited broadcast address (255.255.255.255):
These addresses are never forwarded
DHCP
Dynamic Host Configuration Protocol (DHCP)
From 1993
An extension of BOOTP
Same port numbers as BOOTP
Extensions:
Supports temporary allocation (“leases”) of IP addresses
DHCP client can acquire all IP configuration parameters
needed to operate
DHCP is the preferred mechanism for dynamic
assignment of IP addresses
DHCP can interoperate with BOOTP clients.
BOOTP
Argon
(a)
Interaction Argon
128.143.137.144
(b)
00:a0:24:71:e4:44 BOOTP Server 00:a0:24:71:e4:44 DHCP Server
BOOTP Response:
IP address: 128.143.137.144
BOOTP Request
00:a0:24:71:e4:44 Server IP address: 128.143.137.100
Sent to 255.255.255.255 Boot file name: filename
TFTP workstations
Assignment of IP
“filename”
128.143.137.100
addresses to hosts is static
DHCP Interaction
Argon
00:a0:24:71:e4:44 DHCP Server
DHCP Request
00:a0:24:71:e4:44
Sent to 255.255.255.255
Argon
128.143.137.144
00:a0:24:71:e4:44 DHCP Server
DHCP Response:
IP address: 128.143.137.144
Default gateway: 128.143.137.1
Netmask: 255.255.0.0
BOOTP/DHCP Message Format
OpCode Hardware Type
Hardware Address
Hop Count
Length
Unused (in BOOTP)
Number of Seconds
Flags (in DHCP)
Transaction ID
Client IP address
Your IP address
Server IP address
Gateway IP address
Options
1 DHCPDISCOVER
2 DHCPOFFER
3 DHCPREQUEST
4 DHCPDECLINE
5 DHCPACK
6 DHCPNAK
7 DHCPRELEASE
8 DHCPINFORM
Message Types
DHCPDISCOVER: Broadcast by a client to find available DHCP
servers.
DHCPOFFER: Response from a server to a DHCPDISCOVER
and offering IP address and other parameters.
DHCPREQUEST: Message from a client to servers that does
one of the following:
Requests the parameters offered by one of the servers and
declines all other offers.
Verifies a previously allocated address after a system or
network change (a reboot for example).
Requests the extension of a lease on a particular address.
Contd.
DHCPACK: Acknowledgement from server to client with parameters,
including IP address.
DHCPNACK: Negative acknowledgement from server to client,
indicating that the client's lease has expired or that a requested IP
address is incorrect.
DHCPDECLINE: Message from client to server indicating that the
offered address is already in use.
DHCPRELEASE: Message from client to server canceling remainder of
a lease and relinquishing network address.
DHCPINFORM: Message from a client that already has an IP address
(manually configured for example), requesting further configuration
parameters from the DHCP server.
DHCP Operation DHCP Client
00:a0:24:71:e4:44 DHCP Server
DCHP DISCOVER DHCPDISCOVER
Sent to 255.255.255.255
DHCP Server
DHCP Client
00:a0:24:71:e4:44 DHCPOFFER DHCP Server
DHCPOFFER
• DCHP OFFER
DHCP Server
DHCP Operation DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCPREQUEST
• 13 root name
servers worldwide
b USC-ISI Marina del Rey, CA
• recursive query: 2 3
2
Host at cis.poly.edu 3
TLD DNS
wants IP address for 4 server
gaia.cs.umass.edu 5
o Type=A o Type=CNAME
o name is hostname o name is alias name for some
“canonical” (the real) name, eg.,
o value is IP address www.ibm.com is really
servereast.backup2.ibm.com
o Type=NS o value is canonical name
o name is domain (eg.,
foo.com) o Type=MX
o value is hostname of
o value is name of mailserver
authoritative name
associated with name
server for this
domain
DNS protocol, messages
DNS protocol : query and reply messages, both with same message format
• msg header
identification: 16 bit # for
query, reply to query uses
same #
flags:
query or reply
recursion desired
recursion available
reply is authoritative
DNS protocol, messages
Name, type fields
for a query
RRs in response
to query
records for
authoritative
servers
additional
“helpful”
info that may be
used
Message Fields
Identification - identifies a query and is copied in the
reply message to match it to the query at the client
side.
Flags - one bit flag set to indicate whether the
message is a query or a reply. Another bit to identify if
reply is from an authoritative sender or not. A third
bit is used to indicate that recursion method is
desired.
Fields
Questions - contains the name that is being
queried and the type, ie type A or MX.
Answers - contains the RRs for the name(s) that
were requested
Authority - contains records of authoritative
servers
Additional Info - e.g., if type of query is MX, then
this info can be a Type - A RR containing the IP
address of the canonical hostname
Inserting records into
example: new startup “Network Utopia”
register name networkuptopia.com at DNS registrar (e.g.,
Network Solutions)
provide names, IP addresses of authoritative name server
(primary and secondary)
registrar inserts two RRs into com TLD server: