(→DHCPv6) |
|||
Line 53: | Line 53: | ||
In other words, A DHCP relay agent is any host or IP router that forwards DHCP packets between clients and servers.<ref>https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/15-sy/dhcp-15-sy-book/dhcp-relay-agent.html</ref> | In other words, A DHCP relay agent is any host or IP router that forwards DHCP packets between clients and servers.<ref>https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/15-sy/dhcp-15-sy-book/dhcp-relay-agent.html</ref> | ||
− | === DHCPv6 === | + | ==== DHCPv6 ==== |
The Dynamic Host Configuration Protocol version 6 (DHCPv6) is a network protocol for configuring Internet Protocol version 6 (IPv6) hosts with IP addresses, IP prefixes and other configuration data required to operate in an IPv6 network. It is the IPv6 equivalent of the Dynamic Host Configuration Protocol for IPv4.<ref>https://en.wikipedia.org/wiki/DHCPv6</ref> | The Dynamic Host Configuration Protocol version 6 (DHCPv6) is a network protocol for configuring Internet Protocol version 6 (IPv6) hosts with IP addresses, IP prefixes and other configuration data required to operate in an IPv6 network. It is the IPv6 equivalent of the Dynamic Host Configuration Protocol for IPv4.<ref>https://en.wikipedia.org/wiki/DHCPv6</ref> | ||
DHCPv6 has its roots in DHCPv4 and there are many similarities. The following terms are specific to DHCPv6. | DHCPv6 has its roots in DHCPv4 and there are many similarities. The following terms are specific to DHCPv6. | ||
+ | # The MAC address(Link-layer address) is used to identify of clients in DHCPv4 but the [[DUID and IAID]] is a client's identifier in DHCPv6. | ||
자세한 통신 흐름은 [[DHCPv6 communication]]을 참고하세요. | 자세한 통신 흐름은 [[DHCPv6 communication]]을 참고하세요. |
Revision as of 10:49, 13 April 2021
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol (IP) local area networks. A DHCP server must be present on the network. A device connected to the network requests an IP address from the DHCP server using the DHCP protocol; the server assigns a unique address to the device, A device configured to use dynamic (DHCP) addressing that is connected to a different network will be assigned an address on that network without needing to be reconfigured.
DHCP operates based on the client–server model. When a computer or other device connects to a network, the DHCP client software sends a DHCP broadcast query requesting the necessary information. Any DHCP server on the network may service the request.
The DHCP server manages a pool of IP addresses and information about client configuration parameters such as default gateway, domain name, the name servers, and time servers.
On receiving a DHCP request, the DHCP server may respond with specific information for each client, as previously configured by an administrator, or with a specific address and any other information valid for the entire network and for the time period for which the allocation (lease) is valid.
A DHCP client typically queries for this information immediately after booting, and periodically thereafter before the expiration of the information. When a DHCP client refreshes an assignment, it initially requests the same parameter values, but the DHCP server may assign a new address based on the assignment policies set by administrators.
On large networks that consist of multiple links, a single DHCP server may service the entire network when aided by DHCP relay agents located on the interconnecting routers. Such agents relay messages between DHCP clients and DHCP servers located on different subnets.
The imRAD provides both the DHCPv4 and DHCPv6 service.
DHCPv4[1][2]
The DHCP employs a connectionless service model, using the User Datagram Protocol (UDP). It is implemented with two UDP port numbers for its operations which are the same as for the bootstrap protocol (BOOTP). UDP port number 67 is the destination port of a server, and UDP port number 68 is used by the client.
DHCP operations fall into four phases: server discovery, IP lease offer, IP lease request, and IP lease acknowledgement. These stages are often abbreviated as DORA for discovery, offer, request, and acknowledgement.
The DHCP operation begins with clients broadcasting a request. If the client and server are on different subnets, a DHCP Helper or DHCP Relay Agent may be used. Clients requesting renewal of an existing lease may communicate directly via UDP unicast, since the client already has an established IP address at that point.
Discovery
The client broadcasts a DHCPDISCOVER message on its local physical subnet. The DHCPDISCOVER message MAY include options that suggest values for the network address and lease duration. BOOTP relay agents may pass the message on to DHCP servers not on the same physical subnet.
Offer
When a DHCP server receives a DHCPDISCOVER message from a client, which is an IP address lease request, the DHCP server reserves an IP address for the client and makes a lease offer by sending a DHCPOFFER message to the client. This message contains the client's client id (traditionally a MAC address), the IP address that the server is offering, the subnet mask, the lease duration, and the IP address of the DHCP server making the offer. The DHCP server may also take notice of the hardware-level MAC address in the underlying transport layer: according to current RFCs the transport layer MAC address may be used if no client ID is provided in the DHCP packet.
Request
In response to the DHCP offer, the client replies with a DHCPREQUEST message, broadcast to the server,[a] requesting the offered address. A client can receive DHCP offers from multiple servers, but it will accept only one DHCP offer.
The client also sends a DHCPREQUEST to extend its lease.
Acknowledgement(ACK) / Non-Acknowledgement(NAK)
When the DHCP server receives the DHCPREQUEST message from the client, the configuration process enters its final phase. The acknowledgement phase involves sending a DHCPACK packet to the client. This packet includes the lease duration and any other configuration information that the client might have requested. At this point, the IP configuration process is completed.
After the client obtains an IP address, it should probe the newly received address(e.g. with ARP Address Resolution Protocol) to prevent address conflicts caused by overlapping address pools of DHCP servers.
If the client's request is invalid (e.g., the client has moved to a new subnet or the client requested with an invalid 'requested IP address'), the server responds to the client with a DHCPNAK message. If the client receives a DHCPNAK message, the client restarts the configuration process.
Decline
The client receives the DHCPACK message with configuration parameters. The client performs a final check on the parameters (e.g., ARP for allocated network address). At this point, the client is configured. If the client detects that the address is already in use (e.g., through the use of ARP), the client sends a DHCPDECLINE message to the server and restarts the configuration process.
Release
The client may choose to relinquish its lease on a network address by sending a DHCPRELEASE message to the server. Upon receipt of a DHCPRELEASE message, the server marks the network address as not allocated.
Information
If a client has obtained a network address through some other means (e.g., manual configuration), it may use a DHCPINFORM request message to obtain other local configuration parameters.
Relaying
In order to allow DHCP clients on subnets not directly served by DHCP servers to communicate with DHCP servers, DHCP relay agents can be installed on these subnets. The DHCP client broadcasts on the local link; the relay agent receives the broadcast and transmits it to one or more DHCP servers using unicast.
In other words, A DHCP relay agent is any host or IP router that forwards DHCP packets between clients and servers.[3]
DHCPv6
The Dynamic Host Configuration Protocol version 6 (DHCPv6) is a network protocol for configuring Internet Protocol version 6 (IPv6) hosts with IP addresses, IP prefixes and other configuration data required to operate in an IPv6 network. It is the IPv6 equivalent of the Dynamic Host Configuration Protocol for IPv4.[4]
DHCPv6 has its roots in DHCPv4 and there are many similarities. The following terms are specific to DHCPv6.
- The MAC address(Link-layer address) is used to identify of clients in DHCPv4 but the DUID and IAID is a client's identifier in DHCPv6.
자세한 통신 흐름은 DHCPv6 communication을 참고하세요.