Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configlet Examples (Design)

Juniper Junos Configlet Interface-Level Example on 4.0.2: gigether-options

When you're creating an interface-level configlet during the design phase, you won't know interface names. It's not until you're working in the blueprint that you'll have that information. Interface-level configlets for Junos are designed for you to enter details without including the set interface command. For example, to change Junos interface "gigether-options", you can use a interface-level hierarchical or set configlet.

When you import the configlet into your blueprint, you'll specify interfaces such as xe-0/0/0. For a Junos Interface-Level set configlet Apstra software will prepend the set commands:

For a Junos Interface-Level hierarchical configlet Apstra software will load Junos structured configuration:

Juniper Junos Configlet Example on 4.0.2: MTU (section Interface-Level: Delete)

If you want to use a Junos interface-level configlet to remove an existing configuration, you can use an interface level delete configlet. Like the interface level set configlet, when you are creating the configlet during the design phase, you won't know interface names. It's not until you're working in the blueprint that you'll have that information. Interface-level delete configlets for Junos are designed for you to enter details without including the delete interface command. For example, to remove the Junos interface "mtu" configuration.

When you import the configlet into your blueprint, you'll specify interfaces such as xe-0/0/0. For a Junos Interface-Level delete configlet Apstra software will prepend the delete commands:

Juniper Junos Configlet Example on 4.0.2 Example: SNMP (multiple sections)

You can create a configlet with a generator at the Top-Level to enable SNMP. To avoid SNMP alarms on server-facing interfaces, for example, you can create a second generator at the Interface-Level to set up no-traps.

Top-Level template text is validated to begin with ‘set’ or ‘delete’. See below for example text.

Interface-Level template text is not validated because it's not a complete CLI command. See below for example text.

When you import the configlet into your blueprint, you'll specify interfaces such as ex-0/0/0 and Apstra software will prepend the set command as .

Juniper Junos Configlet Example on 4.0.1 and 4.0.0: NTP (section SYSTEM)

Sample text for configuring NTP servers on Junos devices. (On Apstra version 4.0.2 SYSTEM is called Top-Level/Hierarchical.)

Cisco NX-OS Configlet Example: Syslog (section SYSTEM)

Sample text for configuring Syslog on NX-OS devices.

Arista EOS Configlet Example: NTP (section SYSTEM)

Sample text for configuring NTP servers on EOS devices. This configlet uses property sets for the NTP server IP addresses.

Arista EOS Configlet Example: Interface Speed (section INTERFACE)

Sample text for applying 'speed auto' to an interface. (You specify devices and interfaces when you import the configlet into a blueprint.)

Enterprise SONiC Configlet Example: NTP (section SYSTEM)

Sample text for using the config command to set up an NTP server to use mgmt VRF on SONiC devices.

Enterprise SONiC Configlet Example: SNMP (section SYSTEM)

Sample text for using the config command to set up an SNMP snmptrap to use mgmt VRF on SONiC devices.

Enterprise SONiC Configlet Example: Syslog (section SYSTEM)

Sample text for using the config command to set the Syslog server for SONiC devices.

Enterprise SONiC Configlet Example: Static Route (section FRR)

Sample text for adding a static route

Enterprise SONiC Configlet Example: sonic-cli Commands (section SYSTEM)

Sample text for using the sonic-cli command to set up the delay-restore option for SONiC mclag. Put sudo -u admin at the beginning, and single quotes around phrases with spaces in each sonic-cli command, and < /dev/console at the end.

Cumulus Linux Configlet Example: NTP (section SYSTEM)

By default, NTP in Cumulus runs in the default VRF. Certain scenarios require NTP to run in the mgmt VRF. Services in the default VRF must be stopped, then services in the mgmt VRF must be started. You can apply NTP configuration on the management VRF with the following CLI commands:

Cumulus Linux Configlet Example: SNMP (section SYSTEM)

Sample text for setting up an SNMP server on Cumulus Linux that uses NCLU. Note the net commit command:

Cumulus Linux Configlet Example: Static Route (section FRR)

Sample text for adding a static route

When you look at the rendered config for the device, the configlet content is shown at the end of the routing section.

Cumulus Linux Configlet Example: Syslog (section FILE)

A text file replaces the contents of a targeted file with the contents in the file referenced by the configlet. For example, to configure a Syslog server with enabled management VRF, add the configuration below (it can require double quotation marks as below):

Each double quotation mark must be preceded by three (3) backslashes. Three backslashes are needed because double quotes must be escaped and backslashes need escaping as well. The following template text shows how to apply a File configlet that contains double quotation marks.