Junos Automation (Scripting)
Junos Automation (Scripting)

Automating out of the box config EX2200

‎12-07-2016 09:39 AM

Hello all,


I work in a company where we are expanding rapidly, and I find myself imaging and upgrading the firmware on a very large number of devices for a significant portion of my time. I was wondering, is there any way to automate this process? An ex2200 out of the box config doesn't come with any IP, even a private one set by which I can communicate with it over the network. I was thinking of using chef, or having a usb auto-execute a shell script, but there are issues with both methods, and I was wondering if anyone had any experience doing something of this sort. All ideas are greatly appreciated.



Junos Automation (Scripting)
Accepted by topic author Dmitriy78
‎12-07-2016 10:21 AM

Re: Automating out of the box config EX2200

‎12-07-2016 09:47 AM

You are looking for zero touch provisioning (ZTP). The me0 interface will during boot try to get info regarding tftp/ftp server to retrieve both image and config.


More information here:




and here:




That should help you automate things 🙂


Best regards,

Jonas Hauge Klingenberg
Juniper Ambassador & Technology Architect, SEC DATACOM A/S (Denmark)
Junos Automation (Scripting)

Re: Automating out of the box config EX2200

‎12-07-2016 09:55 AM

There are a myriad of ways to do this, with Chef and USB keys being way down on the list.  Chef requires a LOT of work (including the elusive IP you mentioned) before it is usable.  The USB route is not feasible (for automating the bring up) because all you can do is load the Junos image from it.  Unlike the SRX, which can boot, load config and even run scripts from the USB, you can't do that with the EX. 


If you have terminal/console access, you can use PyEZ or Ansible to push a base config to get it up and running on the network and then PyEZ, Ansible, Space, <insert config pusher of choice here> to configure and upgrade the device once it is online.  


If you don't have a terminal server, you can always use the ZTP process with DHCP, the appropriate options and scripts to at least get it online and then use Space, JEAP, a PyEZ script or even Ansible to upgrade the OS.   


And these are only two suggestions.  There are other ways as well.  A lot of it depends on the process you have.  Do you drop ship to the site, or do you have access to these before they go to site?  Do you have control over the DHCP server or have the ability to have someone configure the DHCP server for you?  If you could lay out a typical workflow process of how you get the switch, who touches it when, what types of tools do you have to access it (term server, scripting knowledge, etc.) that would help too.  

Edward Arcuri
Architect - Automation & Programmability, JDI
Junos Automation (Scripting)

Re: Automating out of the box config EX2200

‎12-07-2016 10:22 AM

That sounds perfect, thanks so much.

Junos Automation (Scripting)

Re: Automating out of the box config EX2200

[ Edited ]
‎12-12-2016 01:24 PM



You might be interested in this article from our Knowledge Base:


KB27327 - Understanding Zero Touch Provisioning (EZ Touchless Provisioning), implementation and conf...


If this article doesn't do it for you, we've got plenty more in the Knowledge Base. You can search it from here.


Hope this helps!


Sarah Stegall

KB Editor

Sarah Stegall
Video Producer, KBTV
Knowledge Base Content Editor
Juniper Networks, Inc.