Autoinstall is a quite interesting topic, it deserves some labbing.

Start from the DOC-CD  as usual, we focus on the LAN implementation first.

You can find HERE  the flowchart of the autoinstall process.

This guide is quite clear too:

AutoInstall Using DHCP for LAN Interfaces

This is the topology we’ll use:


R1 and R2 will start without configuration.

R3 is the DHCP server that provides TFTP informations to R1 and R2.

R4 acts as TFTP server that stores the configurations

First step: configure DHCP pool on R3:

ip dhcp pool R1 host client-identifier 0063.6973.636f.2d63.3230.302e.3636.6262.2e30.3030.302d.4661.302f.30 option 150 ip option 67 ascii R1-confg default-router 

Do you prefer an easier client identifier? Read THIS  blog post from Ivan Pepelnjak.

The pool defines a reserved IP address to be assigned to R1. We provide a default router and a couple of options. Option 150 defines a TFTP server, option 67 defines the filename do look for.

Second step: configure R4 as TFTP server

R4(config)#tftp-server flash:R1-confg

The config file for R1 is stored in R4’s flash.

Now we erase the configuration on R1 and reload it:

R1#erase startup-config Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] [confirm] [OK] Erase of nvram: complete R1#reload

R1 starts without a config file, requests an IP address via DHCP:

*Mar 1 00:00:29.735: AUTOINSTALL: FastEthernet0/0 is assigned

Together with the IP address, R1 gets some options, so it looks for the TFTP server

*Mar 1 00:00:29.739: AUTOINSTALL: Obtain tftp server address (opt 150)

The option 67 informs R1 to download the config file R1-confg:

*Mar 1 00:00:49.291: %SYS-5-CONFIG_I: Configured from tftp:// by console

We can see the TFTP request on R4:

R4# Mar 2 23:20:14.226: TFTP: Looking for R1-confg Mar 2 23:20:14.230: TFTP: Opened flash:R1-confg, fd 0, size 1989 for process 244 Mar 2 23:20:14.374: TFTP: Finished flash:R1-confg, time 00:00:00 for process 244

This is the capture of the request coming from R1 to R4:


We can have the same result using option 66 “Server-Name” instead of option 150. We must provide a DNS server via DHCP.

Let’s do it using R2 as DHCP client. Create DHCP pool on R3:

ip dhcp pool R2 host client-identifier 0063.6973.636f.2d63.3230.312e.3636.6262.2e30.3030.302d.4661.302f.30 default-router option 66 ascii option 67 ascii R2-confg

We configure R3 as DNS server too:

R3(config)#ip host R3(config)#ip dns server

Now we can erase startup-config and reload R2.

On R2:

Translating ""...domain server ( [OK] Loading R2-confg from (via FastEthernet0/0): ! [OK - 1923 bytes] *Mar 1 00:00:16.863: AUTOINSTALL: FastEthernet0/0 is assigned *Mar 1 00:00:16.863: AUTOINSTALL: Obtain tftp server name tftp.ifconfig.itresolved to *Mar 1 00:00:26.459: %SYS-5-CONFIG_I: Configured from t by console

On R4:

Mar 1 00:25:26.647: TFTP: Looking for R2-confg *Mar 1 00:25:26.651: TFTP: Opened flash:R2-confg, fd 0, size 1923 for process 245 *Mar 1 00:25:26.719: TFTP: Finished flash:R2-confg, time 00:00:00 for process 245

Everything worked as expected.

DHCP options are assigned by IANA, full list HERE .

How to use the mac address as client-id is explained HERE  on ioshints blog. There’re plenty of posts aboutDHCP .