Posted on June 20, 2016 2:43 pm
 |  Asked by Alessandro Carpi
Print Friendly, PDF & Email

Hi All,

Is is possible to, during the execution of the ZTP script that is downloaded as a function of the DHCP options, to retrieve the IP address of the server from when the ZTP script came from?  For example, if the DHCP options indicate that the bootfile option is: “”,  I would like the script to dynamically obtain the fact that it came from “”.

I tried dumping the environment variables from within, but did not find anything useful.  I am wondering if there are any logfiles, or other “show” commands that I could use to obtain this information.

The net-net is I do not want to hardcode IP addresses in my script if at all possible.

Thank you!

Posted by Jeremy Georges
Answered on June 20, 2016 4:16 pm

Hello Alessandro,

You can use the Linux approach and grep the /var/log/messages file. When it attempts to pull  the file specified by option 67, it lists this in the messages file.


Jun 20 16:12:06 localhost ZeroTouch: %ZTP-5-CONFIG_DOWNLOAD: Attempting to download the startup-config from

Hope that helps.




Posted by Alessandro Carpi
Answered on June 20, 2016 6:45 pm

Hi Jeremy,

Thank you, this was what I needed!


Post your Answer

You must be logged in to post an answer.