This applies to Python 2.6 or 2.7.
Overview
Configure Juniper devices that have factory default settings using PyEZ.
Description
Juniper devices that are running with factory default settings can only be configured through the serial console port. You can use the netconify Python script to connect to the serial console port and load a configuration file for the device.
Installing and Using netconify
To install and use netconify on your system:
- Install pip on your system if it is not already present, to simplify the installation and upgrade of Python packages.
- Install netconify.
host# pip install junos-netconify
- Create a junos configuration file on your system.
- Run the netconify utility with your configuration file.
Note: Use the netconify --help command to display full usage guidelines.
Example
This example telnets to port 23 on the srx1 Juniper device console port, loads a configuration file called srx1.conf, and commits this new configuration to the device.
[host@py-junos-netconify bin]$ ./netconify --telnet=srx1,23 -f srx1.conf
TTY:login:connecting to TTY:srx1:23 ...
TTY:login:logging in ...
TTY:login:starting NETCONF
conf:loading into device ...
conf:commit ... please be patient
conf:commit completed.
TTY:logout:logging out ...
Related Links