Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Configuring Autoinstallation of Configuration Files

 

Autoinstallation is an automated process and does not require any specific configuration on a device. To simplify the process, you can specify one or more interfaces, protocols, and configuration servers to be used for autoinstallation.

Configuring Autoinstallation of Configuration Files (CLI Procedure)

Autoinstallation is the automatic configuration of a device over the network from a pre-existing configuration file that you create and store on a configuration server—typically a Trivial File Transfer Protocol (TFTP) server. You can use autoinstallation to automatically deploy multiple devices from a central location in the network.

To specify autoinstallation to run when you power on a switch already installed in your network, you can enable it by specifying one or more interfaces, protocols, and configuration servers to be used for autoinstallation.

Before you explicitly enable and configure autoinstallation on the switch, perform these tasks as needed for your network’s configuration:

  • Have a service available—typically Dynamic Host Configuration Protocol (DHCP)—to assign an IP address to the switch

  • Configure a DHCP server on your network to meet your network requirements. You can configure a switch to operate as a DHCP server. For more information, see Configuring a DHCP Server on Switches (CLI Procedure).

  • Create one of the following configuration files, and store it on a TFTP server (or HTTP server or FTP server) in the network:

    • A host-specific file with the name hostname.conf for each switch undergoing autoinstallation. Replace hostname with the name of a switch. The hostname.conf file typically contains all the configuration information necessary for the switch with this hostname.

    • A default configuration file named switch.conf with the minimum configuration necessary to enable you to telnet into the new switch for further configuration.

  • Physically attach the switch to the network using a Gigabit Ethernet port.

  • If you configure the DHCP server to provide only the TFTP server hostname, add an IP address-to-hostname mapping entry for the TFTP server to the DNS database file on the Domain Name System (DNS) server in the network.

  • If the switch is not on the same network segment as the DHCP server (or other device providing IP address resolution), configure an existing device as an intermediate device to receive TFTP and DNS requests and forward them to the TFTP server and the DNS server. You must configure the LAN or serial interface on the intermediate device with the IP addresses of the hosts providing TFTP and DNS services. Connect this interface to the switch.

  • If you are using hostname.conf files for autoinstallation, you must also complete the following tasks:

    • Configure the DHCP server to provide a hostname.conf filename to each switch. Each switch uses its hostname.conf filename to request a configuration file from the TFTP server. Copy the necessary hostname.conf configuration files to the TFTP server.

    • Create a default configuration file named network.conf, and copy it to the TFTP server. This file contains IP-address-to-hostname mapping entries. If the DHCP server does not send a hostname.conf filename to a new switch, the switch uses network.conf to resolve its hostname based on its IP address.

      Alternatively, you can add the IP-address-to-hostname mapping entry for the switch to a DNS database file.

      The switch uses the hostname to request a hostname.conf file from the TFTP server.

To configure autoinstallation:

  1. Specify the URL address of one or more servers from which to obtain configuration files.
    [edit system]

    user@switch# set autoinstallation configuration-servers tftp://tftpconfig.example.com
    Note

    You can also use an FTP address, for example, ftp://user:password@sftpconfig.example.com.

  2. Configure one or more Ethernet interfaces to perform autoinstallation and one or two procurement protocols for each interface. The switch uses the protocols to send a request for an IP address for the interface:
    [edit system]

    user@switch# set autoinstallation interfaces ge-0/0/0 bootp

To verify autoinstallation:

  1. From the CLI, enter the show system autoinstallation status command.
    user@switch> show system autoinstallation status

Example: Configuring Autoinstallation on SRX Series Devices

This example shows how to configure a device for autoinstallation.

Requirements

Before you begin:

  • Configure a DHCP server on your network to meet your network requirements. You can configure a device to operate as a DHCP server.

  • Create one of the following configuration files, and store it on a TFTP server in the network:

    • A host-specific file with the name hostname.conf for each device undergoing autoinstallation. Replace hostname with the name of a device. The hostname.conf file typically contains all the configuration information necessary for the device with this hostname.

    • A default configuration file named router.conf with the minimum configuration necessary to enable you to telnet into the new device for further configuration.

  • Physically attach the device to the network using one or more of the following interface types:

    • Fast Ethernet

    • Gigabit Ethernet

    • Serial with HDLC encapsulation

Overview

No configuration is required on a device on which you are performing autoinstallation, because it is an automated process. However, to simplify the process, you can specify one or more interfaces, protocols, and configuration servers to be used for autoinstallation.

The device uses these protocols to send a request for an IP address for the interface.

  • BOOTP—Sends requests over all interfaces.

  • RARP—Sends requests over Ethernet interfaces.

Note

Starting with Junos OS Release 15.1X49, you need to additionally configure the family inet under the interface using the set interfaces ge-0/0/X unit 0 family inet command for the SRX Series device to send dhcp requests out.

Configuration

CLI Quick Configuration

To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode.

To configure a device for autoinstallation:

  1. Enable autoinstallation and specify the URL address of one or more servers from which to obtain configuration files.
    Note

    You can also use an FTP address, for example, ftp://user:password@sftpconfig.sp.com.

  2. Configure one or more Ethernet or serial interfaces to perform autoinstallation, and configure one or two procurement protocols for each interface.

Results

From configuration mode, confirm your configuration by entering the show system autoinstallation status command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Note

When there is a user-specified configuration for a particular interface, delete the factory default for that interface. Having two configurations for the same device might lead to errors. For example, if PPP encapsulation is set on a T1 interface through user configuration while the factory default configuration configures CISCO HLDC on the same interface, then the interface might not come up and the following error is logged in the message file: “DCD_CONFIG_WRITE_FAILED failed.”

Verification

Confirm that the configuration is working properly.

Verifying Autoinstallation

Purpose

Verify that the device has been configured for autoinstallation.

Action

From operational mode, enter the show system autoinstallation status command. The output shows the settings configured for autoinstallation. Verify that the values displayed are correct for the device when it is deployed on the network.

Configuring Autoinstallation on an SRX1500 Device

Autoinstallation is an automated process and does not require any specific configuration on a device. However, to simplify the process, you can specify one or more interfaces, protocols, and configuration servers to be used for autoinstallation.

You can configure one or more interfaces, protocols, and configuration servers to be used for autoinstallation. These configurations help to run autoinstallation when you power on a device.

Before you explicitly enable and configure autoinstallation on the device, perform these tasks as needed for your network’s configuration:

  • Have a service available—typically Dynamic Host Configuration Protocol (DHCP)—to assign an IP address to the device.

  • Configure a DHCP server on your network to meet your network requirements.

  • Create the following configuration files, and store it on a TFTP server, HTTP server, or FTP server in the network:

    • A host-specific file with the name hostname.conf for each device undergoing autoinstallation. Replace hostname with the name of a device. The hostname.conf file typically contains all the configuration information necessary for the device with this hostname.

  • Physically attach the device to the network using a Gigabit Ethernet port.

  • If you configure the DHCP server to provide only the TFTP server hostname, add an IP address-to-hostname mapping entry for the TFTP server to the DNS database file on the Domain Name System (DNS) server in the network.

  • If the device is not on the same network segment as the DHCP server (or other device providing IP address resolution), configure an existing device as an intermediate device to receive TFTP and DNS requests and forward them to the TFTP server and the DNS server. You must configure the LAN or serial interface on the intermediate device with the IP addresses of the hosts providing TFTP and DNS services. Connect this interface to the device.

  • If you are using hostname.conf files for autoinstallation, you must also complete the following tasks:

    • Configure the DHCP server to provide a hostname.conf filename to each device. Each device uses its hostname.conf filename to request a configuration file from the TFTP server. Copy the necessary hostname.conf configuration files to the TFTP server.

    • Create a default configuration file named network.conf, and copy it to the TFTP server. This file contains IP-address-to-hostname mapping entries. If the DHCP server does not send a hostname.conf filename to a new device, the device uses network.conf to resolve its hostname based on its IP address. Alternatively, you can add the IP-address-to-hostname mapping entry for the device to a DNS database file. The device uses the hostname to request a hostname.conf file from the TFTP server.

Starting in Junos OS Release 18.4R1, SRX1500 devices support autoinstallation to automate the configuration process by loading configuration files onto new or existing devices automatically over the network. You can use the CLI configuration editor to configure a device for autoinstallation. The factory-default setting has been changed to support autoinstallation. In Junos OS Release 18.3R1 and earlier, SRX1500 devices do not support autoinstallation.

To configure autoinstallation:

  1. Specify the URL address of one or more servers from which to obtain configuration files.
  2. Configure one or more Ethernet interfaces to perform autoinstallation and one or two procurement protocols for each interface. The device uses the protocols to send a request for an IP address for the interface:
  3. Configure trace options.

To verify autoinstallation:

  1. From the CLI, enter the show system autoinstallation status operational command.

Verifying Autoinstallation Status

Purpose

Display the status of the autoinstallation feature.

Action

From the CLI, enter the show system autoinstallation status command.

Sample Output

user@switch> show system autoinstallation status

Meaning

The output shows the settings configured for autoinstallation. Verify that the values displayed are correct for the switch when it is deployed on the network.

Autoinstalling a Configuration File from a Disk-on-Key USB Memory Stick onto an EX2200 or EX3300 Switch

If you have a new EX2200 or EX3300 switch, you can use a Disk-on-Key USB memory stick (“USB key”) to configure the switch, using either a text configuration file or an XML configuration file.

Before you begin this task, ensure you have the following items:

  • A management device (PC or laptop).

  • A Junos Space platform to generate a valid XML file (if you will be installing the XML configuration file).

  • A Disk-on-Key device with one of the following 16-bit or 32-bit FAT file systems:

    • DOS 3.0+ 16-bit FAT (up to 32 MB)

    • DOS 3.31+ 16-bit FAT (more than 32 MB)

    • FAT32

    • FAT32, LBA-mapped

    • 16-bit FAT, LBA-mapped

  • An EX2200 or EX3300 switch with the factory configuration. If other Junos OS configuration files exist on the switch, the switch cannot read the juniper-config.txt or juniper-config.xml file from the Disk-on-Key device.

    Note

    The USB-based autoinstallation process overrides the network-based autoinstallation process. If the switch detects a Disk-on-Key device containing a valid configuration file during autoinstallation, it configures the switch by using the configuration file on the Disk-on-Key device instead of fetching the configuration from the network.

    If both juniper-config.txt and juniper-config.xml files are on the Disk-on-Key device, the switch uses the text (txt) file.

To configure the switch by using a Disk-on-Key device that contains the configuration file in text format:

  1. Using a text editor on the PC or laptop, create the configuration file, named juniper-config.txt, as a sequence of configuration commands (set commands). To reuse the configuration from another switch, save the configuration in configuration mode as a sequence of configuration commands on the switch using the show | display set | save filename command and then copying the file to the PC or switch as juniper-config.txt.Note

    Ensure that the first line in the juniper-config.txt is edit and that the last line in the file is commit and-quit.

  2. Copy the juniper-config.txt file to the Disk-on-Key device.
  3. Plug the Disk-on-Key device into the USB port on the switch.
  4. Power on the switch.
  5. Observe the LEDs on the Disk-on-Key device, and wait as the switch starts and then accesses the Disk-on-Key device.

    The switch reads the juniper-config.txt file from the Disk-on-Key device and commits the configuration.

    Note

    Before you remove the Disk-on-Key device from the switch, ensure that the configuration has been applied to the switch. You can issue the show configuration operational mode command on the switch to see the configuration.

    Then remove the Disk-on-Key device from the switch.

    The configuration of the switch is complete.

To configure the switch by using a Disk-on-Key device that contains the configuration file in XML format:

  1. Power on the switch.
  2. Configure the switch to use autoinstallation:
    1. Load the factory default configuration:

    2. Set the switch for autoinstallation:

    3. Set the root authentication password:

    4. Commit the changes:

  3. Power off the switch.
  4. Using the Junos Space platform, create a valid configuration file in XML format, and name it juniper-config.xml.
  5. Copy the juniper-config.xml file to the Disk-on-Key device.
  6. Plug the Disk-on-Key device into the USB port on the switch.
  7. Power on the switch.
  8. Observe the LEDs on the Disk-on-Key device, and wait as the switch starts and then accesses the Disk-on-Key device.

    The switch reads the juniper-config.xml file from the Disk-on-Key device and commits the configuration.

    Note

    Before you remove the Disk-on-Key device from the switch, ensure that the configuration has been applied to the switch . You can issue the show configuration operational mode command on the switch to see the configuration.

    Then remove the Disk-on-Key device from the switch.

    The configuration of the switch is complete.

Configuring Autoinstallation on JNU Satellite Devices

No configuration is required on a device on which you are performing autoinstallation because it is an automated process. However, to simplify the process, you can specify one or more interfaces, protocols, and configuration servers to be used for autoinstallation. In this scenario, satellite devices, such as EX Series Ethernet Switches, QFX Series devices, and ACX Series Universal Metro Routers, that are managed by the controller are considered.

To configure autoinstallation:

  1. Load the JNU factory-default configuration file on the satellite device to enable the device to function in JNU mode.

    An override operation discards the current candidate configuration and loads the configuration in the specified filename or the one that you type at the terminal. When you use the override option and commit the configuration, all system processes reparse the configuration.

  2. Specify the URL address of one or more servers from which to obtain configuration files:
    Note

    You can also use an HTTP or FTP address—for example, http://user:password@httpconfig.sp.com or ftp://user:password@sftpconfig.sp.com.

  3. Configure one or more Ethernet interfaces to perform autoinstallation and IP address acquisition protocols for each interface. The router uses the protocols to send a request for an IP address for the interface:
  4. Set the root password, entering a clear-text password that the system will encrypt, a password that is already encrypted, or an SSH public key string.

    Choose one of the following:

    • To enter a clear-text password, use the following command:

    • To enter a password that is already encrypted, use the following command:

    • To enter an SSH public key, use the following command:

  5. Save the Junos OS configuration changes, activate the configuration on the device, and exit configuration mode, using the commit-and-quit command.

When the satellite device reboots, it triggers the autoinstallation mechanism to retrieve its initial configuration and downloads the settings from the configuration file stored on a configuration server in the network. On the controller, you must enable the FTP service by using the set system services ftp command and save the configuration on the satellite device at the /var/jnu/ directory.

The following configuration is generated on the satellite device as a result of the preceding procedure to configure autoinstallation:

Verifying Autoinstallation on JNU Satellite Devices

Purpose

After you have configured autoinstallation, display the status of autoinstallation on a satellite device, such as an ACX Series router, an EX Series switch, or a QFX Series device, in a Junos Node Unifier (JNU) group that is managed by a controller, which is an MX Series router.

Action

From the CLI, enter the show system autoinstallation status command. The following example displays the autoinstallation settings of an ACX Series router that operates as a satellite in a JNU group.

Sample Output

user@host> show system autoinstallation status

Meaning

The output shows the settings configured for autoinstallation. Verify that the values displayed are correct for the router when it is deployed on the network.

Release History Table
Release
Description
Starting in Junos OS Release 18.4R1, SRX1500 devices support autoinstallation to automate the configuration process by loading configuration files onto new or existing devices automatically over the network. You can use the CLI configuration editor to configure a device for autoinstallation. The factory-default setting has been changed to support autoinstallation. In Junos OS Release 18.3R1 and earlier, SRX1500 devices do not support autoinstallation.