Guide to TCP/IP
Fourth Edition
• Explain the basic services that DHCP/DHCPv6 offers to its clients and explain its background
• Explain the specifics of IP/IPv6 address management using DHCP/DHCPv6
• Explain the DHCP Discovery, renewal, and release processes
• Explain the basic DHCP/DHCPv6 packet structure and types of DHCP/DHCPv6 messages in use
2
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Describe broadcast and unicast addressing for
IPv4 as well as multicast addressing for IPv6
• Describe relay agent communications for both IPv4 and IPv6
• Discuss Microsoft DHCP scopes and classes IPv4 and differences in IPv6 scope configuration
• Use DHCP/DHCPv6 troubleshooting utilities
3
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• DHCP
– Considered the most common form of address autoconfiguration
• Automatic Private IP Addressing (APIPA)
– Introduced by Microsoft a few years after DHCP
– Requires no addressing servers
• DHCPv6
– A more robust and controllable system for address autoconfiguration
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
4
• DHCP
– Service that provides a way for client computer to request IP address assignment
– Delivers necessary configuration information to clients
– Traces its origins back to an earlier protocol named
BOOTP
– Servers can manage one or more ranges of IP addresses
5
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• When TCP/IP is configured on client computer
– The Obtain an IP address automatically option is the only necessary set-up element
• Next time workstation attempts to access network
– It broadcasts a DHCP address request to the network because it has no IP address
• All DHCP servers present on same broadcast domain
– Receive request and send back message that indicates a willingness to grant an address lease
6
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Client
– Accepts address lease offer and sends packet to server that extended offer
• In reply
– Server proffers an IP address for a specific period of time that the client uses thereafter
• When half the lease period expires
– Client attempts to renew the lease
7
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
8
• Leases
– “Loans” of an address for a specific amount of time
• Leases that range from one to three weeks
– Typical on networks in which machines seldom move and the workforce is stable
• Lease periods
– Average between one and three days for networks on which roving workers come and go regularly
• Lease periods of four to eight hours
– Common on ISP networks
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
9
• DHCP client
– Enabled at client machine when you select the
Obtain an IP address automatically option
• DHCP server
– Manages address pools and configuration data
• DHCP relay agent
– Intercepts address requests on local cable segment
– Repackages requests as a unicast to one or more
DHCP servers
10
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Manual address lease
– Administrator assigns an IP address manually
• Dynamic address lease
– DHCP server assigns addresses for specific periods of time
11
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• How DHCP integrates with DNS
– Server addresses are advertised using DNS
– All address updates must be entered manually
– Client addresses usually come into play only when:
• E-mail addresses of the form user@domain.name must be resolved
12
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Two types of IPv4 address autoconfiguration mechanisms
– DHCP
– Automatic Private IP Addressing (APIPA)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
13
• Dynamic configuration of IPv4 link-local addresses
• Address block 169.254.0.0/16
– Reserved for this use
• Used by interfaces as a failover mechanism to selfassign an IPv4 address
• APIPA address will not allow routed communications to hosts on other networks
14
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• DHCP Discovery
– Occurs when DHCP client broadcasts a request for an IP address
– Relies on an initial DHCP broadcast
• DHCP servers
– PING an address before offering it to the client
• Windows clustering
– Allows two or more servers to be managed as a single system
15
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Uses four packets
– DHCP Discover packet
– DHCP Offer packet
– DHCP Request packet
– DHCP Acknowledgment packet
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
16
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
17
• During DHCP Discovery process
– Client broadcasts Discover packet that identifies client’s hardware address
– Header contains
• Source IP address 0.0.0.0
• Preferred address
– Typically the last address the client used
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
18
• Send by DHCP server to offer IP address to DHCP client
• Offer packet
– Includes IP address that is offered to the client
– Sometimes, answers to the requested options in the
DHCP Discover packet
19
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
20
• Once Offer packet is received
– Client can either accept offer by issuing a DHCP
Request packet, or
– Reject offer by sending a DHCP Decline packet
• Typically
– Client sends a Decline only if it receives more than one Offer
21
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Sent from server to client to indicate the completion of the four-packet DHCP Discovery process
• Response
– Contains answers to any configuration options requested by client in the previous Request packet
22
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• When DHCP client receives an address from a
DHCP server
– Client also receives a lease time and notes the time that the address was received
• Lease time
– Defines how long the client can keep the address
• In middle of the lease period
– Client starts a renewal process
23
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• T1
– Defined as the time that the client tries to renew its network address
• The Renewal packet
– Is unicast directly to the DHCP server
• Default value for T1
– 0.5 * duration_of_lease (i.e., lease time)
24
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Time that client begins to:
– Broadcast a renewal request for an extended lease time from another DHCP server
• DHCP specification, RFC 2131, defines default value for T2 as
– 0.875 * duration_of_lease
25
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
26
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
27
• Client should release its address by
– Sending a DHCP Release packet to the server
• DHCP Release packet
– Sent over UDP
– DHCP server does not send any acknowledgment
• If client does not send the DHCP Release packet:
– DHCP server automatically releases the address at the lease expiration time
28
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Fields
– Operation Code (OPCODE) or Message Type Field
– Hardware Type Field
– Hardware Length Field
– Hops Field
– Transaction ID Number Field
– Seconds Since Boot or Seconds Elapsed Field
– Flags Field
29
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Fields
– Client IP Address Field
– Your IP Address Field
– Server IP Address Field
– Gateway or Relay Agent IP Address Field
– Client Hardware Address Field
– Server Host Name Field
– Boot File Field
– DHCP Option field
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
30
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
31
• Only DHCP option required in all DHCP packets
• Indicates general purpose of any DHCP message
• DHCP boot sequence uses these message types:
– DHCP Message Type 1: Discover (client to server)
– DHCP Message Type 2: Offer (server to client)
– DHCP Message Type 3: Request (client to server)
– DHCP Message Type 5: ACK (server to client)
32
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
33
• DHCP clients
– Must broadcast service requests until they obtain IP addresses
• DHCP clients
– Use unicast addressing after they obtain an address for a local DHCP server or relay agent
• DHCP servers
– Examine DHCP packets coming from clients
34
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
35
• DHCP boot up process
– Relies heavily on broadcasts, but most routers do not forward broadcasts
• Relay agent function
– Typically loaded on a router connected to the segment containing DHCP clients
• Relay agent device
– Configured with the address of the DHCP server
– Can communicate using unicast packets directly with that server
36
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
(cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
37
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
38
• Two basic approaches to IPv6 autoconfiguration
• Stateless autoconfiguration
– Simply presents required router configuration information to all comers
• Stateful autoconfiguration
– DHCPv6 server must maintain awareness of the status or state of its pool of available addresses
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
39
• Stateless address autoconfiguration
– ND protocol allows routers to be configured to present the minimum information a host needs when joining a network link
• Stateful address autoconfiguration
– DHCPv6 is much like DHCPv4 under IPv4
– Both rely on dedicated servers to hold databases of information about hosts and their IP and other configuration parameters
40
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Combination of stateful and stateless address autoconfiguration
– Referenced as DHCPv6 stateless
– Routers on the local link can be configured to provide pointers to DHCPv6 servers
– Router provides the network prefix, and DHCPv6 server provides the DNS server information
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
41
• Tentative addresses
– Occur as a node initializes an interface on an IPv6 network segment or link
• Valid addresses
– Usable based on the Valid Lifetime field in the Prefix
Information option of an RA or the Valid Lifetime field in the DHCPv6 IA Address option
• Preferred addresses
– Usable based on the Preferred Lifetime field in the
Prefix Information option of an RA or the Preferred
Lifetime field in the DHCPv6 IA Address option
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
42
• Deprecated addresses
– Allow nodes to continue to function while they renew the lease on their addresses
• Invalid addresses
– Cannot be used as either the source or destination address when the valid lifetime expires
43
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Node interface identifiers (IDs)
– Used to ensure that the IPv6 address is unique among all other IPv6 addresses
– Generally 64 bits long
• Three most common sources
– Modified EUI-64 format
– Random number generator to create a 64-bit number
– Cryptographically Generated Addresses (CGA) process
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
44
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
45
• RFC 4941
– Node using SLAAC will compute an additional IPv6 address known as the “temporary” address
• Temporary address
– Assigned “preferred” status
– Used for all outbound communications from the node
46
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• DHCPv6
– Defined in RFC 3315
– Uses UDP ports 546 and 547
• DHCPv6 uses two specific multicast addresses:
– FF02::1:2
– FF05::1:3
• DHCP Unique Identifier (DUID) methods
– DUID-LLT
– DUID-EN
– DUID-LL
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
47
• Numerous DHCPv6 message types
– Occur between nodes, servers, and relay agents
• DHCPv6 Stateful Message Exchange
– Host sends a Router Solicitation
– Router replies with a Router Advertisement
– Host sends a Solicit message
– DHCPv6 server replies with an Advertise message
– Host sends a Request message
– DHCPv6 server sends the host a Reply message with an IPv6 address
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
48
• DHCPv6 Stateless Message Exchange
– Host sends a Router Solicitation
– Router replies with a Router Advertisement
– Host sends an Information-Request message
– DHCPv6 server sends the host a Reply message with the other available configuration options
• DHCPv6 Relay Message Exchange
– Host sends a Router Solicitation
– Router replies with a Router Advertisement
– Host sends a Solicit message
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
49
• DHCPv6 Relay Message Exchange (cont’d.)
– Router relay-forwards Solicit message to server
– DHCPv6 server relay-replies router with an
Advertise message
– Router replies with Advertise message to the host
– Host sends a Request message
– Router relay-forwards Request message to server
– DHCPv6 server relay-replies router with a Reply message with IPv6 address and other options
– Router replies with the Reply message to the host
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
50
• Basic steps
– Node creates an interface ID
– FE80:: is prepended to the interface ID
– Node sends NS message with its link-local address as the destination
– If an NA is not received, then the address is considered unique
– Host sends an RS to the all-routers multicast address FF02::2
– If an RA is not received, the host starts the stateful autoconfiguration process
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
51
• Basic steps (cont’d.)
– If an RA is received, host examines the RA message looking for variables and flags
– If L flag is set to “on,” host adds the network prefix to its prefix cache
– If A flag is set to “on,” then two IPv6 addresses are created
– Host sends an NS message with its global unicast address as the destination
– If an NA is not received, the address is considered unique
52
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Basic steps (cont’d.)
– If M flag is set to “on,” start the stateful autoconfiguration process
– If O flag is set to “on,” start the stateful autoconfiguration process
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
53
• Basic guidelines:
– Link-local address will be generated using a RNG
– If A flag is set to “on” in an RA, the global unicast address will be generated
– If A flag is set to “on” in an RA, a temporary global unicast address will be generated
– OS sends the RS to find any on-link routers
– If no RAs are received, OS starts stateful address process
– Manually configuring an IPv6 address does not disable IPv6 address autoconfiguration
54
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Address scopes
– Define a set of addresses that a DHCP server can assign to clients
• Superscopes
– A collection of scopes that contain sets of nonconsecutive IP addresses
55
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• Source of information
– D-Link Xtreme N Gigabit Router (model number
DIR-655)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
56
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
57
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
58
• One good way to troubleshoot DHCP/DHCPv6
– Use a protocol analyzer, such as Wireshark
• Analyzer
– Can display the sequence of messages that occurs on a network
• Commands to release and/or renew an IP address
– ipconfig /release
– ipconfig /renew
– ipconfig /release6
– ipconfig /renew6
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
59
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
60
• DHCP
– Provides a way for computers to obtain usable, unique IP addresses and necessary TCP/IP configurations
• From the administrative side
– DHCP makes it easy to define and manage pools of
IP addresses
• DHCP’s origins
– Lie in an earlier TCP/IP Application layer protocol, called BOOTP
61
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
• DHCP
– Supports manual or dynamic address allocation
• When a DHCP client starts
– It begins the process of DHCP Discovery, during which the client receives an IP address and lease
• DHCP
– Supports a variety of message types and options
– Only MessageType 53 (DHCP Message) is mandatory for any given DHCP message
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
62
• Because DHCP can ferry a surprisingly large range of configuration information
– The protocol makes use of several message options
• A protocol analyzer is especially effective when diagnosing DHCP/DHCPv6 difficulties
• Clients supporting IPv6 have new operations for address autoconfiguration
• DHCPv6 operates much like DHCP for IPv4
• DHCPv6 is a completely new service, compared to
DHCP’s origins
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
63