I've been struggling with POAP in GNS3 for almost a week. I'm about to pull my hair out. I've read just about every tutorial post I can find online, including official cisco docks, and I can't get any of them to work.
The Nexus 9ks in my labs are actually NX-OSv 9ks using this image: nxosv-final.7.0.3.I7.4.qcow2
I don't know if that's my problem in the first place since I can't really upload this file to my tftp server with a poap script expecting "something something.bin"
I can successfully send files via tftp from the PythonServer to the TFTP server. Both are ubuntu desktop VMs. I originally built everything with docker appliances, only to discover they weren't permanent and lost an entire day's worth of work... I have a PythonServer node for the purpose of making custom files using yaml/jinja2 templates to simulate information provided to use by our DC-Ops guys racking new switches in the DC.
I am storing all my scripts, config files, etc in the following folder on my tftp server:
\var\lib\tftpboot\
I tried following along with the official cisco configuration guide, but had similar POAP issues from "boot file download failed" to "script execution failed". I also used the cisco recommended poap script, modifying the options variables for my environment, but no luck.
The last tutorial I was trying to follow is this one.
I believe I've done all the steps. Here is the option section of my poap-sn.py script:
# system and kickstart images, configuration: location on server (src) and target (dst) n9k_image_version = "7.0.3.I7.4" # this must match your code version image_dir_src = "/var/lib/tftpboot/" # Sample - /Users/bob/poap ftp_image_dir_src_root = image_dir_src tftp_image_dir_src_root = image_dir_src n9k_system_image_src = "n9000-dk9.%s.bin" % n9k_image_version config_file_src = "/var/lib/tftpboot/" # Sample - /Users/bob/poap/conf image_dir_dst = "bootflash:" # directory where n9k image will be stored system_image_dst = n9k_system_image_src config_file_dst = "volatile:poap.cfg" md5sum_ext_src = "md5" # Required space on /bootflash (for config and system images) required_space = 450000 # copy protocol to download images and config # options are: scp/http/tftp/ftp/sftp protocol = "tftp" # protocol to use to download images/config # Host name and user credentials username = "tftpuser" # server account ftp_username = "tftpuser" # server account password = "tftp" # password hostname = "192.168.122.144" # ip address of ftp/scp/http/sftp server
Here is the DHCP config on my router (Cisco IOSv 15.6(2)T) running DHCP:
! ip dhcp pool ZTPPOOL network 192.168.122.0 255.255.255.0 default-router 192.168.122.2 dns-server 8.8.8.8 domain-name ZTPtest.com option 67 ascii poap-sn.py option 150 ip 192.168.122.144 lease 5 !
When I power on the Nexus VM, here is the POAP output.
2019 Apr 23 21:11:07 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Start DHCP v4 session 2019 Apr 23 21:11:07 switch %$ VDC-1 %$ %POAP-2-POAP_DHCP_DISCOVER_START: [9615E5NZTXL-0C:97:F5:CF:B0:07] - POAP DHCP Discover phase started 2019 Apr 23 21:11:37 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Using DHCP, information received over mgmt0 from 192.168.122.2 2019 Apr 23 21:11:37 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Assigned IP address: 192.168.122.7 2019 Apr 23 21:11:37 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Netmask: 255.255.255.0 2019 Apr 23 21:11:37 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - DNS Server: 8.8.8.8 2019 Apr 23 21:11:37 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Default Gateway: 192.168.122.2 2019 Apr 23 21:11:37 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Script Server: 192.168.122.144 2019 Apr 23 21:11:37 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Script Name: poap-sn.py 2019 Apr 23 21:11:49 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - The POAP Script download has started 2019 Apr 23 21:11:49 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - The POAP Script is being downloaded from [copy tftp://192.168.122.144/poap-sn.py bootflash:scripts/script.sh vrf management ] 2019 Apr 23 21:11:50 switch %$ VDC-1 %$ %POAP-2-POAP_SCRIPT_DOWNLOADED: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Successfully downloaded POAP script file 2019 Apr 23 21:11:50 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Script file size 20380, MD5 checksum 107b0938904ababbc65a37b1179014ab 2019 Apr 23 21:11:50 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - MD5 checksum received from the script file is 107b0938904ababbc65a37b1179014ab 2019 Apr 23 21:11:50 switch %$ VDC-1 %$ %POAP-2-POAP_SCRIPT_STARTED_MD5_VALIDATED: [9615E5NZTXL-0C:97:F5:CF:B0:07] - POAP script execution started(MD5 validated) 2019 Apr 23 21:11:55 switch %$ VDC-1 %$ %POAP-2-POAP_FAILURE: [9615E5NZTXL-0C:97:F5:CF:B0:07] - POAP Script execution failed 2019 Apr 23 21:12:45 switch %$ VDC-1 %$ %POAP-2-POAP_FAILURE: [9615E5NZTXL-0C:97:F5:CF:B0:07] - POAP Script execution failed, Starting the POAP USB phase 2019 Apr 23 21:12:45 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - USB Initializing Success 2019 Apr 23 21:12:45 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - USB disk not detected 2019 Apr 23 21:12:45 switch %$ VDC-1 %$ last message repeated 1 time 2019 Apr 23 21:13:12 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Start DHCP v4 session 2019 Apr 23 21:13:12 switch %$ VDC-1 %$ %POAP-2-POAP_DHCP_DISCOVER_START: [9615E5NZTXL-0C:97:F5:CF:B0:07] - POAP DHCP Discover phase started 2019 Apr 23 21:13:42 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Using DHCP, information received over mgmt0 from 192.168.122.1 2019 Apr 23 21:13:42 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Assigned IP address: 192.168.122.222 2019 Apr 23 21:13:42 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Netmask: 255.255.255.0 2019 Apr 23 21:13:42 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - DNS Server: 192.168.122.1 2019 Apr 23 21:13:42 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Default Gateway: 192.168.122.1 2019 Apr 23 21:13:54 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - The POAP Script download has started 2019 Apr 23 21:13:54 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9615E5NZTXL-0C:97:F5:CF:B0:07] - The POAP Script is being downloaded from [] 2019 Apr 23 21:13:55 switch %$ VDC-1 %$ %POAP-2-POAP_SCRIPT_DOWNLOADED: [9615E5NZTXL-0C:97:F5:CF:B0:07] - Successfully downloaded POAP script file 2019 Apr 23 21:13:55 switch %$ VDC-1 %$ %POAP-2-POAP_FAILURE: [9615E5NZTXL-0C:97:F5:CF:B0:07] - POAP boot file download failed. 2019 Apr 23 21:13:56 switch %$ VDC-1 %$ %POAP-2-POAP_FAILURE: [9615E5NZTXL-0C:97:F5:CF:B0:07] - POAP DHCP discover phase failed
I've tried so many different combinations of file names, depending on the SN of the Nexus I was trying to configure:
osboxes@osboxes:/var/lib/tftpboot$ ls conf conf.md5 poap-sn.py conf_0c97f53bca00.cfg nexus_poap.py pythontest.conf conf.9BWSMOYB3X6 poap_0c97f53bca00.py serial_poap.py conf.9BWSMOYB3X6.md5 poap_0c97f53bca00.py.md5 serial_poap.py.md5 conf.9CTICBI2MIP poap_nexus_script.py test conf.9CTICBI2MIP.md5 poap_nexus_script.py.md5 osboxes@osboxes:/var/lib/tftpboot$
All I'm trying to configure on the switch at the moment is just a new hostname, just as a proof of concept, so typically my conf files just have "hostname TESTWORKED" in them and nothing else. Not sure if that is also part of the problem.
No comments:
Post a Comment