autoinstall

Autoinstall - Frame Relay


First of all: autoinstall works only on the first serial interface of the router, don't forget it.

This is the topology for the small lab:

autoinstall_FR

R1 is a TFTP server, it stores R3 configuration in flash.

R3 has no configuration.

R2 interface is configured as follow:

interface Serial1/0
ip address 10.0.23.2 255.255.255.0
ip helper-address 1.1.1.1
encapsulation frame-relay
ip ospf network broadcast
ip ospf 1 area 0
serial restart-delay 0
frame-relay map ip 10.0.23.3 203 broadcast
end


When R3 starts, the autoinstall process looks for a configuration:

Would you like to enter the initial configuration dialog? [yes/no]: no
Would you like to terminate autoinstall? [yes]: no
Please Wait. Autoinstall being attempted over Serial1/0 !!!!!!!!!!!


We can see what happens debugging TFTP on R1:

R1#
*Mar 1 00:50:52.399: TFTP: Looking for cisconet.cfg
R1#
*Mar 1 00:51:13.423: TFTP: Looking for router-confg
R1#
*Mar 1 00:51:14.443: TFTP: Looking for ciscortr.cfg
R1#
*Mar 1 00:51:16.463: TFTP: Looking for network-confg
*Mar 1 00:51:16.467: TFTP: Opened flash:R3-confg, fd 0, size 2075 for process 194
*Mar 1 00:51:16.535: TFTP: Finished flash:R3-confg, time 00:00:00 for process 194
*Mar 1 00:51:16.539: TFTP: Looking for network-confg
*Mar 1 00:51:16.543: TFTP: Opened flash:R3-confg, fd 0, size 2075 for process 194
*Mar 1 00:51:16.587: TFTP: Finished flash:R3-confg, time 00:00:00 for process 194
R1#
*Mar 1 00:51:36.475: TFTP: Looking for r3-confg
R1#
*Mar 1 00:51:38.523: TFTP: Looking for r3-confg


Notice that after loading "network-confg" the router looks for a more specific file "r3-confg". If the second file is found, the two configurations are merged.

So the order is:
  • cisconet.cfg
  • router-confg
  • ciscortr.cfg
  • network-confg
  • -confg

I'm using C3725-ADVENTERPRISEK9-M, other IOS could use different names or order, I don't know.

On R3 we can see that it's configured via autoinstall from R1:

*Mar  1 00:02:44.827: %SYS-5-CONFIG_I: Configured from tftp://1.1.1.1/network-confg by console




Autoinstall - LAN


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:

autoinstall_cisco


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 10.0.123.1 255.255.255.0
client-identifier 0063.6973.636f.2d63.3230.302e.3636.6262.2e30.3030.302d.4661.302f.30
option 150 ip 4.4.4.4
option 67 ascii R1-confg
default-router 10.0.123.3


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 10.0.123.1


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

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


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://4.4.4.4/R1-confg 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:

autoinstall_1


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 10.0.123.2 255.255.255.0
client-identifier 0063.6973.636f.2d63.3230.312e.3636.6262.2e30.3030.302d.4661.302f.30
default-router 10.0.123.3
option 66 ascii tftp.ifconfig.it
option 67 ascii R2-confg


We configure R3 as DNS server too:

R3(config)#ip host tftp.ifconfig.it 4.4.4.4
R3(config)#ip dns server


Now we can erase startup-config and reload R2.

On R2:

Translating "tftp.ifconfig.it"...domain server (255.255.255.255) [OK]
Loading R2-confg from 4.4.4.4 (via FastEthernet0/0): !
[OK - 1923 bytes]
*Mar 1 00:00:16.863: AUTOINSTALL: FastEthernet0/0 is assigned 10.0.123.2
*Mar 1 00:00:16.863: AUTOINSTALL: Obtain tftp server name tftp.ifconfig.itresolved to 4.4.4.4
*Mar 1 00:00:26.459: %SYS-5-CONFIG_I: Configured from tftp://tftp.ifconfig.it/R2-confg 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.



USEFUL LINKS:

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 about DHCP.