So I have had need to quickly build a provisioning server for a lab to auto provision devices as they come online. This is the basic steps to accommodate this. Note there are far more complex and secure methods to utilizing something similar in production. Feel free to use this as a learning tool, but understand in a production environment, this is not recommended as critical pieces of information would be sent in clear text.
Boot Server
! hostname BOOT-SERVER ! ip dhcp pool 192.168.0.0/24 network 192.168.0.0 255.255.255.0 dns-server 192.168.2.255 domain-name test.com option 67 ascii /bootstrap.confg option 150 ip 192.168.1.255 default-router 192.168.0.1 ! ip domain name test.com ! interface Loopback1 description TFTP-SERVER ip address 192.168.1.255 255.255.255.255 ! interface Loopback2 description DNS-SERVER ip address 192.168.2.255 255.255.255.255 ! interface Ethernet0/0 ip address 192.168.0.1 255.255.255.0 ! tftp-server unix:/bootstrap.confg tftp-server unix:/lib/tcl/bootstrap.tcl tftp-server unix:/lib/tcl/init.tcl !
/bootstrap.confg
! hostname boostrapping ! event manager directory user repository tftp://192.168.1.255/lib/tcl event manager applet startup trap description "Run on startup -- remember this can't run too long or IOS will kill it." event none action 1.0 cli command "tclsh tftp://192.168.1.255/lib/tcl/bootstrap.tcl" ! interface GigabitEthernet0 description Management ip address dhcp ! file prompt quiet !