How the DHCP AutoInstall Process Works

AutoInstall using DHCP allows for the configuration of a new Cisco router using Ethernet, Token Ring, and FDDI interfaces (the AutoInstall process using serial line interfaces remains unchanged from previous releases).

Note The term “router” is used in the following process to represent any supported Cisco device (including, for example, Access Servers).

The AutoInstall process is initiated when a valid startup configuration file cannot be located in NVRAM (for example, when a new router is turned on). This process is automatic, but to use the DHCP-based functionality (such as enabling unicast TFTP requests), other devices, such as a DHCP server, a Domain Name System (DNS) server, and a helper router, must be properly preconfigured. The following process information is provided to help you decide which features you may want to specifically enable.

There are two primary phases of the AutoInstall process: IP address procurement for the interface on the new router, and the downloading of a configuration file for the new router.
IP Address Procurement

To obtain an IP address, the new router sends requests into the network from the attached interface. The following section outlines the IP address procurement phase of the AutoInstall process.

The new router will first send requests to determine the protocol to be used during the IP address procurement phase:

•The new router will send DHCP discover packets out of all attached LAN interfaces to determine if a DHCP server is available. If an offer is returned from a DHCP server, the new router sends out a DHCP request. If more than one offer is returned, the first is used.

•If a response is returned first from a BOOTP server, or a DHCP server is not available, the DHCP client in AutoInstall will use the BOOTP information to continue the AutoInstall process. Because DHCP is an extension to BOOTP, the DHCP client in AutoInstall can interpret BOOTP replies. Prior to this release, the TFTP identifier (specified in the “siaddr” or “sname” field) and bootfile name (specified in the “file” field) contained in BOOTP replies were ignored. If you have configured this information on your BOOTP server, this information can now be used by the DHCP AutoInstall process to perform unicast TFTP uploading of configuration files.

•The router will also send out Reverse Address Resolution Protocol (RARP) and Serial Line Address Resolution Protocol (SLARP) requests. AutoInstall will use the first available method (DHCP, BOOTP, RARP, or SLARP) for configuration. If all LAN interface configuration options fail, AutoInstall will attempt to configure an available serial interface using SLARP. Though DHCP is the preferred method for AutoInstall over LAN interfaces, these other options remain enabled to ensure backward compatibility with older network topologies.

If a DHCP server responds, any or all of the following information can be returned to the new router:

•The IP address (yiaddr) and subnet mask (option 1) to be assigned to the interface on the new router (the values in parenthesis in this section represent the field names for the packet as defined in the relevant RFCs). The following lines will be written to the configuration of the new router:

interface <type><number>

ip address dhcp

•The address of the TFTP server (siaddr) to be used for AutoInstall requests.

•The name of the configuration file (file or option 67) to be requested from the TFTP server.

•The IP address of the TFTP server (option 150).

•The hostname of the TFTP server (option 66 or sname). Typically either the TFTP address or name is specified, not both. If only the name of the TFTP server is specified, a DNS server must be available to translate the name to an IP address.

•The IP addresses of up to two DNS name servers (option 6). The user should configure this option to be returned from the DHCP server only if the DNS server is in the same LAN as the interface performing AutoInstall.

•The IP address of a “default router” (option 3). This option is provided for those cases in which the TFTP server is not on the same LAN segment as the new router, or if the network topology requires the use of a specific router. The default router address is used to specify which router the AutoInstall TFTP requests should be sent through (in other words, the “first-hop” router). This default router is also referred to as the “helper” router. Only one default router can be specified.

The TFTP server IP address can be deduced from the following sources, from the highest priority to the lowest: the sname field, option 66, option 150, or the siaddr field. If only the sname or option 66 values are returned to the new router, a DNS server must be available to resolve the IP address.

Tips The most efficient method is to configure the IP address of the TFTP server (option 150) to be available on the DHCP server.

If a DHCP server is not available on the network and the sname or siaddr information is not available from a BOOTP server, the new router will use the AutoInstall process described in the documentation of Cisco IOS Release 12.1.

After an IP address is assigned to the interface on the new router, the AutoInstall process sends a DNS request for the corresponding hostname. Likewise, if the new router is assigned a hostname, the AutoInstall process sends a DNS request for the corresponding IP address.
Automatic Configuration of the New Router

After obtaining an IP address for the new router’s interface, the AutoInstall process will initiate attempts to download a configuration file.

The new router automatically attempts to download a configuration file using one of the following methods:

•If the host-specific configuration file (bootfile) name was specified by the DHCP server, that specific filename is used in the TFTP request. The new router makes three unicast TFTP requests for the specified bootfile. If the unicast attempts fail, or if a TFTP server address was not provided, the new router will make three broadcast requests to any available TFTP server for the specified bootfile.

•If the specified bootfile can not be located, or the new router was not provided a specific bootfilename by the DHCP server, AutoInstall will unicast or broadcast TFTP requests for a default network configuration file. The files requested are first for “network-confg” then for “cisconet.cfg” (the .cfg filename is typically used in DOS-based TFTP servers). The default network configuration file should have IP address to hostname mappings using ip host ip address hostname entries. If an entry for the new router’s IP address is missing, AutoInstall will attempt to resolve its hostname using a DNS query. If the new router can determine its hostname, a TFTP request is then sent for the “hostname-confg” or “hostname.cfg” file. The hostname variable is replaced by the first eight characters of the new router’s hostname. If the new router is unable to map its IP address to a hostname, AutoInstall will send TFTP requests for the default configuration file “router-confg” or “router.cfg.”

Note The default configuration file typically sets the hostname of the new router to “router” and provides just enough configuration information to allow further remote configuration by a system administrator.

Table 1 shows the type of TFTP requests made by the new router using AutoInstall. The type of TFTP request is dependent on the availability of the TFTP server name/address and the host-specific configuration filename.

Broadcast request for a default router configuration file to any available TFTP server.

Basically, if the TFTP address is known, the router can send a unicast TFTP request for a configuration file, and if the host-specific configuration filename is known, the router can request the host-specific configuration file from the TFTP server. If the TFTP address is not known, the router can send a broadcast TFTP request, and if the configuration filename is not known, the router can request the default configuration file.

The TFTP server address can be deduced from the following sources:

•the “sname” field of a DHCP or BOOTP reply

•the TFTP server name (Option 66) field of a DHCP reply

•the TFTP server address (Option 150) field of a DHCP reply

•the “siaddr” field of a DHCP or BOOTP reply

The list above reflects the priority in which the information is inspected by the DHCP client. For the first two options, in which only the TFTP server name is given, a DNS server must be available to resolve the IP address.

The host-specific router configuration filename is deduced from the boot file (“file”) field of DHCP or BOOTP responses. The host-specific filename can also be specified in a “network-confg” or “network.cfg” file on a TFTP server. AutoInstall can also determine the host-specific filename from a DNS IP address to hostname mapping.
Specifying a Default Router

In some network topologies, it may be necessary to specify the “default” router through which AutoInstall TFTP requests should be forwarded. The IP address of a default router can be specified in option 3 of the DHCP response to the new router.

For example, assume if there are multiple routers on the same LAN as the interface performing Autoinstall. Router A is the router forwarding the TFTP packets from the TFTP server to the new router, but only router B can forward the TFTP packet from the new router to the TFTP server. In this case, the IP address of router B should be configured as the default router (option 3). The new router will interpret the value of option 3 as the next-hop towards the TFTP server during Autoinstall. Option 3 will take effect only if information (hostname or IP address) for the TFTP server is also returned in the DHCP/BOOTP reply.

Note that option 3 can not be used to specify the default router for DNS requests.

See the “Configuration Tasks” section for configuration details.
Benefits

Protocol Evolution

DHCP is based on the Bootstrap Protocol, but provides additional features which allow for enhancements to the automated configuration of network devices. This feature is the initial migration from BOOTP to DHCP for Cisco IOS AutoInstall, based on the RFC 2131 standard. Within the Cisco IOS software itself, the initialization and TFTP process now work together in a standardized sequence as opposed to being separate tasks.

DHCP and BOOTP Interoperability

This feature includes support for RFC 1534, “Interoperation Between DHCP and BOOTP.” For those LANs where a DHCP server is not available, the Cisco IOS software (specifically, the DHCP client) can continue to recognize IP address allocation replies from regular BOOTP servers. Additionally, the DHCP server can accommodate BOOTP requests, enabling those routing devices which do not support DHCP-based AutoInstall to continue to use the older AutoInstall process. This allows for the gradual migration within your network from BOOTP-based AutoInstall to DHCP-based AutoInstall.

 

Source

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.