Configuring Autoinstallation of Configuration Files (Junos OS)
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. A configuration server is typically a Trivial File Transfer Protocol (TFTP) server. You can use autoinstallation to deploy multiple devices automatically from a central location in the network.
Before you can configure autoinstallation, you must enable autoinstallation to run when you power on a device already installed in your network. You enable it by specifying one or more interfaces, protocols, and configuration servers to be used for autoinstallation.
To enable autoinstallation to run, complete the following steps:
-
Ensure that a service such as Dynamic Host Configuration Protocol (DHCP) is available to assign an IP address to the device.
-
Configure a DHCP server on your network to meet your network requirements. You can configure a switch to operate as a DHCP server.
-
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 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 device.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 a Gigabit Ethernet port.
-
If you configured the DHCP server to provide only the TFTP server hostname, add an IP address-to-hostname mapping entry for the TFTP server. Map the TFTP server hostname 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.
-
Before you explicitly enable and configure autoinstallation on the device, perform these tasks as needed for your network configuration:
To configure autoinstallation:
To verify autoinstallation, from the CLI enter the show system autoinstallation
status
command.
Example:
user@host> show system autoinstallation status
Autoinstallation status:
Master state: Active
Last committed file: None
Configuration server of last committed file: 10.25.100.1
Interface:
Name: ge-0/0/0
State: Configuration Acquisition
Acquired:
Address: 192.168.124.75
Hostname: host-ge-000
Hostname source: DNS
Configuration filename: device-ge-000.conf
Configuration filename server: 10.25.100.3
Address acquisition:
Protocol: DHCP Client
Acquired address: None
Protocol: RARP Client
Acquired address: None
Interface:
Name: ge-0/0/1
State: None
Address acquisition:
Protocol: DHCP Client
Acquired address: None
Protocol: RARP Client
Acquired address: None
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. Replacehostname
with the name of a device. Thehostname.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.
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 Firewall
to send dhcp requests out.
Configuration
Procedure
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.
set system autoinstallation configuration-servers tftp://tftpconfig.sp.com set system autoinstallation interfaces ge-0/0/0 bootp rarp
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:
Enable autoinstallation and specify the URL address of one or more servers from which to obtain configuration files.
[edit system] user@host# set autoinstallation configuration-servers tftp://tftpconfig.sp.com
Note:You can also use an FTP address, for example, ftp://user:password@sftpconfig.sp.com.
Configure one or more Ethernet or serial interfaces to perform autoinstallation, and configure one or two procurement protocols for each interface.
[edit system] user@host# set autoinstallation interfaces ge-0/0/0 bootp rarp
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.
[edit] user@host# show system autoinstallation status
Autoinstallation status: Master state: Active Last committed file: None Configuration server of last committed file: 10.25.100.1 Interface: Name: ge-0/0/0 State: Configuration Acquisition Acquired: Address: 192.168.124.75 Hostname: host-ge-000 Hostname source: DNS Configuration filename: router-ge-000.conf Configuration filename server: 10.25.100.3 Address acquisition: Protocol: BOOTP Client Acquired address: None Protocol: RARP Client Acquired address: None
If you are done configuring the device, enter commit
from configuration mode.
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.
Verifying Autoinstallation Status
Purpose
Display the status of the autoinstallation feature.
Action
From the CLI, enter the show system autoinstallation
status
command.
Sample Output
command-name
user@switch> show system autoinstallation status Autoinstallation status: Master state: Active Last committed file: None Configuration server of last committed file: 10.25.100.1 Interface: Name: ge-0/0/0 State: Configuration Acquisition Acquired: Address: 192.168.124.75 Hostname: host-ge-000 Hostname source: DNS Configuration filename: switch-ge-000.conf Configuration filename server: 10.25.100.3 Address acquisition: Protocol: DHCP Client Acquired address: None Protocol: RARP Client Acquired address: None Interface: Name: ge-0/0/1 State: None Address acquisition: Protocol: DHCP Client Acquired address: None Protocol: RARP Client Acquired address: None
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:
To configure the switch by using a Disk-on-Key device that contains the configuration file in XML format:
Power on the switch.
Configure the switch to use autoinstallation:
Load the factory default configuration:
[edit] user@switch# load factory-default
Set the switch for autoinstallation:
[edit] user@switch# set system autoinstallation delete-upon-commit
Set the root authentication password:
[edit] user@switch# set system root-authentication plain-text-password
Commit the changes:
[edit] user@switch# commit
Power off the switch.
Using the Junos Space platform, create a valid configuration file in XML format, and name it juniper-config.xml.
Copy the juniper-config.xml file to the Disk-on-Key device.
Plug the Disk-on-Key device into the USB port on the switch.
Power on the switch.
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.
See Also
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:
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:
system { autoinstallation { traceoptions { flags { all; } file autod; level all; } delete-after-commit; /* After initial config, no need to keep */ interfaces { ge-* { bootp; } xe-* { bootp; } configuration-servers { "ftp://192.168.0.1/var/jnu/sat1.conf"; } } } root-authentication { encrypted-password "$ABC123"; } }
See Also
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
command-name
user@host> show system autoinstallation status Autoinstallation status: Master state: Active Last committed file: None Configuration server of last committed file: 10.25.100.1 Interface: Name: ge-0/1/0 State: Configuration Acquisition Acquired: Address: 192.168.124.75 Hostname: host-ge-000 Hostname source: DNS Configuration filename: router-ge-000.conf Configuration filename server: 10.25.100.3 Address acquisition: Protocol: DHCP Client Acquired address: None Protocol: RARP Client Acquired address: None Interface: Name: ge-0/1/1 State: None Address acquisition: Protocol: DHCP Client Acquired address: None Protocol: RARP Client Acquired address: None
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.