Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Create Vendor-specific Custom Configuration

SUMMARY You may need to customize configuration (custom-config) based on the device vendor.

You can use shell scripts to add custom configuration to devices during ZTP. These files are located in the TFTP directory or on a HTTP server that you point with a URL .

When you configure the ztp.json file you'll specify the bash file name in the custom-config field of the platform-specific section.

junos_custom.sh

To customize configuration on Juniper Junos OS and Junos OS Evolved devices, add configuration to containers_data/tftp/junos_custom.sh, a bash script file that's executed during the ZTP process.

It can execute Junos configuration commands, such as for Syslog, NTP, and SNMP authentication, before the device system agent is automatically installed.

Note:

Junos OS and Junos OS Evolved platforms with dual-RE setups require the set system commit synchronize command. Without this configuration, the ZTP process fails. We recommend adding the command to the junos_custom.sh file.

Refer to the example junos_custom.sh file.

CAUTION:

If you set external AAA authentication (for example authentication-order), you need to replicate the device system agent device-user and device-user-password in the AAA system. Otherwise, the device system agent generates an authentication error.

eos_custom.sh

To customize configuration on Arista EOS devices, add configuration to containers_data/tftp/eos_custom.sh, a bash script file that's executed during the ZTP process.

It can execute EOS configuration commands to set the SSH login banner, or any other system configuration that needs to be set before the device system agent is automatically installed.

Refer to the example eos_custom.sh file.

Note:

During the ZTP process, the EOS banner login is set to text saying "The device is in Zero Touch Provisioning mode ...". By default, the ZTP script copies this to the permanent configuration.

To prevent this, you must configure the custom-config pointing to a script (eos_custom.sh for example), which configures a different banner login or configure no banner login.

There must be a space after any \n.

nxos_custom.sh (onbox agent)

To customize configuration on Cisco NX-OS devices, add configuration to containers_data/tftp/nxos_custom.sh, a bash script file that's executed during the ZTP process.

It can execute NX-OS configuration commands that set system configuration, such as the SSH login banner, or other system configuration that needs to be set before the device system agent is automatically installed.

Refer to the example nxos_custom.sh file.

Note:

You must use the custom-config file to add copp profile strict.

nxos_custom.sh (Offbox Agent)

If you're using Apstra ZTP to prepare a Cisco NX-OS device for use with offbox agents, you must have the custom-config file enable the following NX-OS configuration commands.

You can use the following nxos_custom.sh to add these along with a banner.

sonic_custom.sh

To customize configuration on Enterprise SONiC devices, add configuration to containers_data/tftp/sonic_custom.sh, a bash script file that's executed during the ZTP process.

It can execute EOS configuration commands, such as for setting Radius authentication, before the device system agent is automatically installed.

Refer to the example sonic_custom.sh file.