cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
948
Views
5
Helpful
3
Replies

ZTP for Catalyst 9300 - Couldn't open bootfile http://address//ztp.py

commodorej
Level 1
Level 1

Been at this for a week or so - (All switches on 17.6.4 code) Using one Catalyst 9300 as a DHCP / HTTP servers for the Day0 9300 to connect to. The TFTP server is my laptop. when the Day0 switch boots up, it gets an IP address on its management port, retrieves the python script but outputs an error saying that it cant open the bootfile. My Script is attached

 

DAY0 SWITCH:

Would you like to enter the initial configuration dialog? [yes/no]:
Acquired IPv4 address 10.253.64.240 on Interface GigabitEthernet0/0
Received following DHCPv4 options:
bootfile : http://10.64.88.29/Co-Worker.py

stop Autoip process
OK to enter CLI now...

pnp-discovery can be monitored without entering enable mode

Entering enable mode will stop pnp-discovery

Attempting bootfile http://10.64.88.29/Co-Worker.py

Couldn't open bootfile http://10.64.88.29/Co-Worker.py

stop Autoip process

3 Replies 3

Claudia de Luna
Spotlight
Spotlight

Hi @commodorej  

So you are serving up your python boot script from the switch if I understand correctly.  Is your http server on the switch configured to use the management interface (source-interface)?     Im assuming your option 67 is http://10.64.88.29/Co-Worker.py ?
It looks like your Laptop and the switch are on different subnets so you have to make sure the data flows are going the way you need them to.  It would be helpful if you could share the "server" 9300 configuration. 

commodorej
Level 1
Level 1

Thank you for replying Claudia.

Here are the server configs on my switch:

 

ip dhcp excluded-address 10.253.64.1 10.253.64.239
ip dhcp excluded-address 10.253.64.249 10.253.64.254
!
ip dhcp pool ZTP_Day0
network 10.253.64.0 255.255.255.0
option 67 ascii http://10.64.88.29/Co-Worker.py <-- this is my laptop IP, whickh is on the same switch, just another vlan
default-router 10.253.64.15 <-- this is the SVI that I have configured on this switch
!

ip http server

I was thinking about pointing the http address to the SVI and have the python script on the switch but other than that I'm out of ideas. Thanks. I hope this helps.

 

Hi @commodorej 

I see you topics by chance, and I have same error like yours.
Then I find way to fix as:
- copy ztp file into directory, example: localhost/ztp
- Then Enable : Directory Browersing
- Then add python MIME for python file

Finally, router can dowload python.file and install successully
Hope it can help !