Which of the following are the correct sequence of steps while assigning settings to DHCP client by DHCP server?
This chapter introduces the Dynamic Host Configuration Protocol (DHCP), explains the concepts underlying the protocol, and describes the advantages of using it in your network. Show
This chapter contains the following information:
About DHCPDHCP is a standard developed to enable host systems in a TCP/IP network to be configured automatically for the network as they boot. DHCP uses a client/server mechanism: servers store and manage configuration information for clients, and provide that information upon a client's request. The information includes the client's IP address and information about network services available to the client. DHCP evolved from an earlier protocol, BOOTP, which was designed for booting over a TCP/IP network. DHCP builds upon BOOTP by using the same format for messages between client and sever, while including more information in the messages. The extra information is the network configuration data for the client. A primary benefit of DHCP is its ability to manage IP address assignments through leasing, which allows IP addresses to be reclaimed when not in use and reassigned to other clients. This enables a site to use a smaller pool of IP address than would be needed if all clients were assigned a permanent address. Advantages of Using Solaris DHCPDHCP relieves the system or network administrator of some of the time-consuming tasks involved in setting up a TCP/IP network and the daily management of that network. Note that Solaris DHCP works only with IPv4. Solaris DHCP offers the following advantages:
How DHCP WorksThe DHCP server must first be installed and configured by a system administrator. During configuration, the administrator enters information about the network that clients will need for operating on the network. After this information is in place, clients are able to request and receive network information. The sequence of events for DHCP service is shown in the following diagram. The numbers in circles correlate to the numbered items in the description following the diagram. Figure 8-1 Sequence of Events for DHCP ServiceLEGEND:
Solaris DHCP ServerThe Solaris DHCP server runs as a daemon in the Solaris operating environment on a host system. The server has two basic functions:
The Solaris DHCP server can also be configured to perform the following additional functions:
DHCP Server ManagementAs superuser, you can start, stop, and configure the DHCP server using the DHCP Manager, or by using command line utilities. Generally, the DHCP server is configured to start automatically when the system boots, and stop when the system is shutdown, so starting and stopping the server manually should be an infrequent occurence. DHCP Server Data StorageAll the data used by the DHCP server is maintained in two data repositories, which you can view and manage using either the DHCP Manager or command-line utilities. The data repositories are:
The DHCP data can be stored in files on a local directory, or in a NIS+ database. "Choosing the Data Store" discusses selecting a data storage method. The dhcptab FileThe dhcptab file contains all the information that clients can obtain from the DHCP server. The DHCP server scans the file each time it starts. The DHCP protocol defines a number of standard items of information that can be passed to clients. These items are referred to as parameters, symbols, or options. Options are defined in the DHCP protocol by numeric codes and text labels, but without values. For example, some commonly used standard options are shown in the following table. Table 8-1 Sample DHCP Standard Options
Some options are automatically assigned values when the administrator provides information during server configuration. The administrator can also explicitly assign values to other options at a later time. Options and their values are passed to the client to provide configuration information. For example, the option/value pair, DNSdmain=Georgia.Peach.COM, sets the client's DNS domain name to Georgia.Peach.COM. Options can be grouped with other options in containers known as macros, which makes it easier to pass information to a client. Some macros are created automatically during server configuration, and contain options that were assigned values during configuration. Macros can also contain other macros. The format of the dhcptab file is described in dhcptab(4). In DHCP Manager, all the information shown in the Options and Macros tabs comes from the dhcptab file. See "About Options" for more information about options, and "About Macros" for more information about macros. Note that the dhcptab file is a text file, but should not be edited manually. You should use either dhtadm or DHCP Manager to create, delete, or modify options and macros. DHCP Network TablesA DHCP network table maps client identifiers to IP addresses and the configuration parameters associated with each address. The format of the network tables is described in dhcp_network(4). In DHCP Manager, all the information shown in the Addresses tab is acquired from the network tables. DHCP ManagerDHCP Manager is a graphical tool you can use to perform all management duties associated with DHCP services. You can use it to manage the server itself as well as the data the server uses. You can use DHCP Manager with the server in the following ways:
DHCP Manager also allows you to manage the IP addresses, network configuration macros, and network configuration options in the following ways:
DHCP Manager includes extensive online help for procedures you can perform with the tool. DHCP Command-Line UtilitiesAll DHCP management functions can be performed using command-line utilities. The following table lists the utilities and describes the purpose of each utility. See the man pages for the utilities for detailed information about using them by clicking on the command names in the table. Table 8-2 DHCP Command-Line Utilities
DHCP Server ConfigurationYou configure the DHCP server the first time you run DHCP Manager on the system where you want to run the DHCP server. DHCP Manager server configuration dialogs prompt you for essential information needed to enable and run the DHCP server on one network. Some default values are obtained from existing system files. If you have not configured the system for the network, there will be no default values. DHCP Manager prompts for the following information:
You can also configure the DHCP server using the dhcpconfig command. This utility gathers information from existing system files automatically in order to provide a useful initial configuration. Therefore, you must ensure that the files are correct before running dhcpconfig. See dhcpconfig(1M) for information about the files dhcpconfig uses to obtain information. To make configuration changes after the initial configuration, you must make changes to the system files and rerun dhcpconfig so that it picks up the changes. IP Address AllocationThe Solaris DHCP server supports the following types of IP address allocation:
Network Configuration InformationThe administrator determines what information is provided to DHCP clients. When you configure the DHCP server you provide essential information about the network; later, you can add more information you want to provide to clients. The DHCP server stores network configuration information in the dhcptab database, in the form of option/value pairs and macros. Options are keywords for network data you want to supply to clients. Values are assigned to options and passed to clients in DHCP messages. For example, the NIS server address is passed using an option called NISservrs that has a value (a list of IP addresses) assigned by the DHCP server. Macros provide a convenient way to group together any number of options that you want to supply to clients. You can use the DHCP Manager to assign values to the options, and create macros to group the options. If you prefer a non-graphical tool, you can use dhtadm, the DHCP configuration table management utility, to work with options and macros. About OptionsIn Solaris DHCP, an option is a piece of network information to be passed to a client. In the DHCP literature, options are also referred to as symbols or tags. An option is defined by a numeric code and a text label, and is then assigned a value. The DHCP protocol defines a large number of standard options for commonly specified network data: Subnet, Router, Broadcast, NIS+dom, Hostname, and LeaseTim are a few examples. A complete list of standard options is included in the DHCP Manager help. You cannot modify the standard option keywords in any way, but you can assign values to the options that are relevant to your network, and include the option/value pairs in macros. You can create new options for data that is not represented by the standard options. Options you create must be classified in one of three categories:
Chapter 11, Administering DHCP includes procedures for creating, modifying, and deleting options. About MacrosIn the Solaris DHCP service, a macro is a collection of network configuration options and the values assigned to them by the system administrator. Macros are created to group options together to be passed to specific clients or types of clients. For example, a macro intended for all clients of a particular subnet might contain option/value pairs for subnet mask, router IP address, broadcast address, NIS+ domain, and lease time. Macro Processing by the DHCP ServerWhen a macro is processed by the server, the network options and values defined in the macro are placed in a DHCP message to a client. Some macros are processed automatically by the server for clients of a particular type. In order for a macro to be processed automatically, it must be named according to one of the categories shown in the following table. Table 8-3 Macro Categories for Automatic Processing
A macro with a name that does not use one of the categories listed in Table 8-3 can be processed only if one of the following is true:
Note - When you configure a server, a macro that is named to match the server's name is created by default. This server macro is not processed automatically for any client because it is not named with one of the name types that cause automatic processing. When you later create IP addresses on the server, the IP addresses are mapped to use the server macro by default. Order of Macro ProcessingWhen a DHCP client requests DHCP services, the DHCP server determines which macros match the client. The server processes the macros, using the macro categories to determine the order of processing, from the more general to the specific. The macros are processed in the following order:
A macro that is included in another macro is processed as part of the containing macro. If the same option is included in more than one macro, the value set for that option in the macro with the most specific category is used because it is processed last. For example, if a Network address macro contained the lease time option with a value of 24 hours, and a Client ID macro contained the lease time option with a value of 8 hours, the client would receive a lease time of 8 hours. Solaris DHCP ClientThe term "client" is sometimes used to refer to a physical machine that is performing a client role on the network. However, the DHCP client described here is a software entity. The Solaris DHCP client is a daemon (dhcpagent) that runs in the Solaris operating environment on a machine that is configured to receive its network configuration from a DHCP server. DHCP clients from other vendors can also use the services of the Solaris DHCP server. However, this section describes only the Solaris DHCP client. Notice that the description assumes one network interface. The section "DHCP Clients With Multiple Network Interfaces" discusses issues important for hosts having two or more network interfaces. DHCP Client InstallationThe Solaris DHCP client is installed and enabled on a system during installation of the Solaris operating environment when you specify that you want to use DHCP to configure network interfaces. There is nothing further you need to do on the Solaris client to use DHCP. If you want a machine that is already running the Solaris environment to use DHCP to configure network interfaces, see "Configuring and Unconfiguring a Solaris DHCP Client". DHCP Client StartupThe dhcpagent daemon obtains configuration information that is needed by other processes involved in booting the system. For this reason, dhcpagent is started early in the boot process by the system startup scripts; booting is suspended until the network configuration information is obtained. The presence of the file /etc/dhcp.interface (for example, /etc/dhcp.hme0 on a Sun Enterprise UltraTM machine) indicates to the startup scripts that DHCP is to be used on the specified interface. Upon finding a dhcp.interface file, the startup scripts start the dhcpagent. After starting up, dhcpagent waits until it receives instructions to configure a network interface. The startup scripts issue the ifconfig interface dhcp startcommand, which instructs dhcpagent to start DHCP as described in "How DHCP Works". If commands are contained within the dhcp.interface file, they are appended to the dhcp start option of ifconfig. See theifconfig(1M) man page for more information about options used with dhcp. How DHCP Client Manages Network Configuration InformationAfter the information packet is obtained from a DHCP server, dhcpagent configures the network interface and brings it up, controlling the interface for the duration of the lease time for the IP address. dhcpagent maintains the configuration data in an internal table held in memory. The system startup scripts use the dhcpinfo command to extract configuration option values from the dhcpagent's table. The values are used in configuring the system and becoming part of the network. The agent waits passively until a set period of time elapses, usually half the lease time, and then requests an extension of the lease from a DHCP server. If dhcpagent finds that the interface is down or the IP address has changed, it does not control the interface until it is instructed by ifconfig to do so. If dhcpagent finds that the interface is up and the IP address hasn't changed, it sends a request to the server for a lease renewal. If the lease cannot be renewed, dhcpagent takes the interface down at the end of the lease time. DHCP Client ManagementThe Solaris DHCP client does not need to be managed under normal system operation. It automatically starts when the system boots, renegotiates leases, and stops when the system shuts down. You cannot manually start and stop the dhcpagent daemon. However, you can use the ifconfig command as superuser on the client machine to affect the client's management of the network interface if necessary. ifconfig Commands Used With DHCP ClientThe ifconfig command lets you:
DHCP Client Parameter FileThe file /etc/default/dhcpagent on the client system contains tunable parameters for dhcpagent. You can use a text editor to change several parameters that affect client operation. The file is well-documented so please refer to the file for more information about the parameters. DHCP Client ShutdownWhen the system running the DHCP client shuts down normally, the dhcpagent daemon writes the current configuration information to the file /etc/dhcp/interface.dhc. The lease is dropped rather than released, so the DHCP server does not know that the IP address is not in active use. If the lease is still valid when the system is rebooted, the DHCP client sends an abbreviated request to use the same IP address and network configuration information it had used before the system was rebooted. If the DHCP server permits this, the client can use the information that it wrote to disk when the system shut down. If the server does not permit using the information, the client initiates the DHCP protocol sequence described previously and obtains new network configuration information. DHCP Clients With Multiple Network InterfacesThe DHCP client daemon can manage several different interfaces on one system simultaneously, each with its own IP address and lease time. If more than one network interface is configured for DHCP, the client issues separate requests to configure them and maintains a separate set of network configuration options for each interface. However, although the parameters are stored separately, some of the parameters are global in nature, applying to the system as a whole, rather than to a particular network interface. Options such as hostname, NIS domain name, and timezone are global parameters and should have the same values for each interface, but it might not be the case due to errors in the information entered by the DHCP administrator. To ensure that there is only one answer to a query for a global parameter, only the parameters for the primary network interface are requested. You can insert the word primary in the /etc/dhcp.interface file for the interface you want to be treated as the primary interface. What are the 4 steps of DHCP?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.
Which is the correct sequence of DHCP process?Explanation. Assuming all went well with the DHCP discovery process, the correct sequence of DHCP messages exchanged between the server and client is: DHCPDISCOVER -> DHCPOFFER -> DHCPREQUEST -> DHCPACK.
How DHCP works step by step?When a device wants access to a network that's using DHCP, it sends a request for an IP address that is picked up by a DHCP server. The server responds be delivering an IP address to the device, then monitors the use of the address and takes it back after a specified time or when the device shuts down.
What is the correct sequence of DHCP events that are involved when a client PC in a network requests for an IP address?The detailed conversation between DHCP client and DHCP server is as follows:. DHCPDISCOVER. The client sends a DHCPDISCOVER packet. ... . DHCPOFFER. The DHCP server responds by sending a DHCPOFFER packet. ... . DHCPREQUEST. The client responds to the DHCPOFFER by sending a DHCPREQUEST. ... . DHCPACK.. |