Table Of Contents
AutoInstall Using DHCP for LAN Interfaces
This feature guide describes the AutoInstall Using DHCP for LAN Interfaces feature introduced in Cisco IOS release 12.1(5)T and includes the following sections:
The AutoInstall Using DHCP for LAN Interfaces feature replaces the use of the Bootstrap Protocol (BOOTP) with the use of the Dynamic Host Configuration Protocol (DHCP) for Cisco IOS AutoInstall over LAN interfaces (specifically Ethernet, Token Ring, and FDDI interfaces).
AutoInstall is a Cisco IOS software feature which provides for the configuration of a new routing device automatically when the device is initialized. DHCP (defined in RFC 2131) is an extension of the functionality provided by the Bootstrap Protocol (defined in RFC 951). DHCP provides the framework for passing configuration information to hosts on a TCP/IP network. DHCP adds the capability of automatic allocation of reusable network addresses and additional configuration options. In Cisco IOS Release 12.1(5)T, the IP address procurement phase of the AutoInstall process is now accomplished using DHCP for Ethernet, Token Ring, and FDDI interfaces. Prior to this release, IP addresses for LAN interfaces were obtained using BOOTP or RARP during the AutoInstall process. Additionally, this feature allows for the uploading of configuration files using unicast TFTP.
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.
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.
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.
Cisco IOS AutoInstall IP address resolution using DHCP for serial interfaces is not supported in this release.
Related Features and Technologies
•Cisco IOS AutoInstall
For information on configuring a Cisco IOS software-based device as a DHCP server, see the "Configuring DHCP" chapter of the Cisco IOS IP and IP Routing Configuration Guide, Release 12.1, and the "Autoconfiguring Cisco IOS DHCP Server Options" 12.1(2)T feature guide
For information about the Cisco IOS DHCP client, see the "Cisco IOS Dynamic Host Configuration Protocol Client" 12.1(2)T feature guide.
For information on the process used for the Cisco IOS AutoInstall feature prior to this release, see the "Using Configuration Tools" chapter of the Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.1.
This feature is supported for the following platforms in Cisco IOS release 12.1(5)T:
•Cisco 800 series
•Cisco 900 series
•Cisco 1400 series
•Cisco 1600 series
•Cisco 1700 series
•Cisco 2500 series
•Cisco 2600 series
•Cisco 3600 series
•Cisco 4500 series
•Cisco 4700 series
•Cisco 7100 series
•Cisco 7200 series
•Cisco 7500 series (including Cisco RSP7000)
Supported Standards, MIBs, and RFCs
No new or modified standards are supported by this feature.
No new or modified MIBs are supported by this feature.
This feature supports the following RFCs:
•RFC 951; "Bootstrap Protocol (BOOTP)"
•RFC 1534; "Interoperation between DHCP and BOOTP"
•RFC 2131; "Dynamic Host Configuration Protocol"
•RFC 2132; "DHCP Option and BOOTP Vendor Extensions"
For the AutoInstall procedure to work, your system must meet the following requirements:
•To use the DHCP AutoInstall feature you must have a DHCP server configured on the network with your desired options. DHCP servers can be configured on a variety of devices, including PCs, workstations, or Cisco routing devices. For information on configuring a Cisco routing device as a DHCP server, see the "Configuring DHCP" chapter of the Cisco IOS IP and IP Routing Configuration Guide, Release 12.1.
•A configuration file for the new router must reside on a TFTP server on the network. Use either a host specific configuration file titled "hostname-confg" or "hostname.cfg" (where hostname is the name of the new router) or a default configuration file titled "router-confg" or "router.cfg." If a default configuration file is used, it should contain the minimum configuration needed for an administrator to Telnet into the new router for further configuration tasks.
•Routers must be physically attached to the network using one or more of the following interface types: Ethernet, Token Ring, FDDI, serial with High-Level Data Link Control (HDLC) encapsulation, or serial with Frame Relay encapsulation (note that the DHCP-based AutoInstall applies only to Ethernet, Token Ring, and FDDI interface configuration). HDLC is the default serial encapsulation. If the AutoInstall process fails over HDLC, the Cisco IOS software automatically configures Frame Relay encapsulation.
Tips We recommend that you connect only your preferred interface before turning on the new routing device, as this ensures only that interface will be used for AutoInstall.
•To download a host specific configuration file using AutoInstall, one of the following options is required:
–The DHCP server must be configured to provide a configuration filename (boot filename) to the new router. AutoInstall will use this filename to request a configuration file from the TFTP server. This file must be available on the TFTP server.
–A default network configuration file named "network-confg" or "cisconet.cfg" must reside on the TFTP server. This configuration file should have IP address to hostname mappings using ip host ip address hostname entries. This file is used to create a hostname for the new router if a host-specific configuration file is not specified by the DHCP server, or if using the older BOOTP-based AutoInstall procedure.
–An IP address to hostname mapping for the new router must be added to a DNS database file
•An IP address to hostname mapping for the TFTP server must be added to DNS database file if the DHCP server response will contain only the hostname for the TFTP server.
•If an existing router is to be designated as the default (first-hop) router for AutoInstall requests, an IP helper addresses will need to be configured on the existing router to forward TFTP requests from the new router to the host that is providing those services.
Because AutoInstall is an automated process, no configuration is required on the routing device using AutoInstall (hereafter referred to as the DHCP client). However, you must configure the other systems on the network to provide the necessary elements for the AutoInstall process to work. The following tasks describe how to configure a Cisco routing device to function as a DHCP server and provide the desired information to routers performing AutoInstall. The last task also describes the commands necessary to use another router to forward AutoInstall requests.
Configuring a Configuration Filename on a Cisco DHCP Server
You have the option of configuring the DHCP server to provide a specific configuration filename to be used by the DHCP client during the AutoInstall process. When you associate the MAC address of a new router with a specific configuration file, AutoInstall will be able to request this file from the TFTP server. To determine the name of the specific configuration file, the DHCP client will examine the "file" field of the DHCP/BOOTP reply, or, if there is an option overload of the "file" field, at the value of option 67. When a specific configuration file (bootfile) is specified, this configuration file should be in the /tftpboot directory of the TFTP server.
Tips We recommend that configuration files intended for specific hosts be saved with the name "hostname-confg" or, if using a DOS-based TFTP server, "hostname.cfg", where hostname is the name of the intended routing device. The hostname specified in the configuration file should match the filename.
To specify the name of the configuration file to be used by the DHCP client, use the following commands on the Cisco routing device running the DHCP server, beginning in global configuration mode:
Configuring the IP Address of the TFTP Server on a Cisco DHCP Server
There are two ways of configuring the DHCP server to return the IP address of the TFTP server to be used by the DHCP client during AutoInstall: by specifying the siaddr field or option 150. The recommended method is to configure the DHCP server to return option 150.
To configure the value for option 150, use the following commands on the Cisco routing device running the DHCP server, beginning in global configuration mode:
To configure the value to be returned in the siaddr field, use the following commands on the Cisco routing device running the DHCP server, beginning in global configuration mode:
Configuring the TFTP Server Name on a Cisco DHCP Server
The alternative to specifying the IP address of the TFTP server to be used during AutoInstall is to specify the hostname of the TFTP server. This information can be returned to the DHCP client in the sname field of a BOOTP reply or in the option 66 field of a DHCP reply. If only the TFTP server name is to returned, a DNS server must be available to the new router to translate the TFTP server name to an IP address.
To configure the DHCP server to return the TFTP server name as option 66, use the following commands on the Cisco routing device running the DHCP server, beginning in global configuration mode:
Configuring the DNS Server Address on a Cisco DHCP Server
To specify the DNS sever that should be used during the AutoInstall process, use the following command on the DHCP server in DHCP pool configuration mode:
Router(dhcp-config)# dns-server address
Specifies the IP address of the DNS server to use to resolve hostnames during the AutoInstall process.
Configuring a Default Router
In some cases you may need to specify a "default" router that the new router running AutoInstall should send TFTP and DNS requests through. This default router can be thought of as a helper router or relay for TFTP and DNS requests. To configure the DHCP server to return this information to the DHCP client, use the following command on the DHCP server in DHCP pool configuration mode:
Router(dhcp-config)# default-router address
Specifies the IP address of the router to use as the "first hop" for AutoInstall unicast requests.
If the TFTP server IP address can be deduced by AutoInstall and if the default router option is provided, DHCP Autoinstall will assume that the default router is the first hop toward the TFTP server. If the TFTP server IP address cannot be deduced, the default router option (if present) is ignored.
If you are specifying a default router, you will also need to configure the address of the TFTP server and, if necessary, the address of the DNS server on the default router. Configure the interface closest to the client on the default router using the following commands, beginning in global configuration mode:
Verifying AutoInstall Setup
To check the configuration of the DHCP server on a Cisco device, use the show running-config EXEC command. To confirm the successful downloading of a configuration file onto the new router, log in to the new router and use the show running-config command.
This section contains the following examples:
Minimal Cisco DHCP Server Configuration Example
The following example shows the minimum configuration needed on a Cisco DHCP server to enable AutoInstall on a new router.ip dhcp pool 1
host 10.0.20.54 255.255.255.240
In this example the new router will download the default configuration file from any available TFTP server, using only broadcast TFTP requests.
Configuring a Cisco DHCP Server to Provide TFTP Server Information To AutoInstall Examples
In the following example, a router is configured as a DHCP server that will provide information to a new router. The new router is connected to the network via the Ethernet 0 interface, which has a MAC address of 0000.0c59.fcb0. The DHCP server is configured to assign the IP address of 10.0.20.54/28 to the Ethernet 0 (E0) interface on the new router. This configuration instructs the DHCP client (the new router using AutoInstall) to download the configuration file with the name "/tftpboot/R1-config" from the TFTP server with the address 172.16.1.1.ip dhcp pool 1host 10.0.20.54 255.255.255.240!The following line identifies the new router using the new router's MAC addresshardware-address 0000.0c59.fcb0!The following line specifies the configuration filenamebootfile R1-confg!The following line specifies the TFTP server addressoption 150 ip 172.16.1.1
The following example configures the DHCP server to provide the same address to Ethernet 0, but in this example the TFTP server name "tftp.cisco.com" is given instead of the server address. The dns-server command is added to provide the address of the DNS server (220.127.116.11) that will resolve the TFTP server name.ip dhcp pool 1host 10.0.20.54 255.255.255.240hardware-address 0000.0c59.fcb0bootfile R1-confg!option 66 specifies the TFTP server nameoption 66 ascii tftp.cisco.comdns-server 18.104.22.168
Configuring a Default Relay Router Example
In this example the address 10.0.20.20 is specified as the next-hop toward the TFTP server with the address 172.16.1.1:ip dhcp pool 1host 10.0.20.54 255.255.255.240hardware-address 0000.0c59.fcb0bootfile R1-confg!option 150 specifies the TFTP server addressoption 150 ip 172.16.1.1default-router 10.0.20.20
No new or modified commands are used by this feature.