I am trying to use the ZTP approach to configure my router [R2]. My Ubuntu machine is both DHCP and TFTP server.
Ubuntu [DHCP Server]: 16.04.5 LTS Cisco Router [DHCP Client]: 7200, version 15.2(4)S5
This is the python script- ztp.py. ztp.py is stored in /var/lib/tftpboot/
#!/usr/bin/env python3.5.2
import time
import cli
time.sleep(200)
print ("\n\n *** ZTP Day 0 Configuation *** \n\n")
fn = open('TXJla-outgoing/R1.txt','r')
fn.seek(0)
c =fn.readlines()
fn.close()
cli.configurep([c])
The configuration on dhcpd.conf
for host R2 is -
host R2 {
hardware ethernet CA:02:3B:E3:00:08;
fixed-address 198.51.100.5;
option bootfile-name !<opt 67> "/ztp.py";
option tftp-server-name !<opt 150> "198.51.100.2";
}
The configuration is not exected on the Router. Please help resolve.