Using PowerOn Auto Provisioning

This chapter describes how to deploy and use Power On Auto Provisioning (POAP) for Cisco MDS 9148 Multilayer Fabric Switch, Cisco MDS 9148S 16G Multilayer Fabric Switch, and Cisco MDS 9396S 16G Multilayer Fabric Switch.

This chapter contains the following sections:

Using Power On Auto Provisioning

This chapter describes how to deploy and use Power On Auto Provisioning (POAP) for Cisco MDS 9148 Multilayer Fabric Switch, Cisco MDS 9148S 16G Multilayer Fabric Switch, and Cisco MDS 9396S 16G Multilayer Fabric Switch.

About Power On Auto Provisioning

When a Cisco MDS Series switch with POAP feature boots and does not find the startup configuration, the switch enters POAP mode and checks for a USB device (containing the configuration script file) in USB port 1. If it finds a USB device, it checks the device to see if the device also contains the software image files and the switch configuration file.

If the switch does not find a USB device in USB port 1, or if the USB device does not contain the required software image files or the switch configuration file, the switch locates a DHCP server and bootstraps itself with the server's interface IP address, gateway, and DNS server IP addresses. The switch then obtains the IP address of a TFTP server or the URL of an HTTP server from where it downloads the necessary configuration files.


Note

DHCP information is used during the POAP process only when POAP fails via USB because of the following reasons:
  • USB is not present.

  • Script is not present or script is present with incorrect names.

  • Script execution fails.


POAP Configuration Script

The reference script supplied by Cisco supports the following functionalities:

  • Retrieves switch-specific identifiers, for example, the serial number.

  • Downloads the software images (system and kickstart images) if the files do not already exist on the switch.

  • Installs the software image on the switch, which is then used at the next reboot.

  • Schedules the downloaded configuration to be applied at the next switch reboot.

  • Stores the configuration as startup configuration.

Guidelines and Limitations for POAP Configuration

The POAP configuration guidelines and limitations are as follows:

  • Only FAT32 USB is supported. (The file system on the USB should be FAT32).

  • The software image for the Cisco MDS 9000 Series Switches, including the Cisco MDS 9396S Multilayer Fabric Switch, must support POAP.

  • POAP can be initiated on any switch by erasing the startup configuration and reloading the switch.

  • POAP does not support provisioning of the switch after it has been configured and is operational. Only auto provisioning of a switch with no startup configuration is supported.

  • Important POAP updates are logged in the syslog and are available from the serial console.

  • Critical POAP errors are logged to the bootflash. The filename format is date-time_poap_PID_[init,1,2].log, where date-time is in the YYYYMMDD_hhmmss format and PID is the process ID.

  • Script logs are saved in the bootflash directory. The filename format is date-time_poap_PID_script.log, where date-time is in the YYYYMMDD_hhmmss format and PID is the process ID.

  • You can configure the format of the script log file. These formats are specified in the script. The template of the script log file has a default format. However, you can choose a different format for the script execution log file.

  • USB script execution logs are saved in the bootflash directory. The filename format is poap.log_usb_MM_DD_HR_MIN, where MM is the current month, DD is the date, HR is the current hour, and MIN is the current minute.

  • The POAP feature does not require a license, and is enabled by default.


    Note

    POAP is not supported through Cisco Data Center Network Management (DCNM).


Network Infrastructure Requirements for POAP

When there is no USB device with the required installation files, or the configuration files are not present in the USB, POAP requires the following network infrastructure:

  • A DHCP server to bootstrap the interface IP address, gateway address, and TFTP address.

  • A TFTP and SCP server that contains the configuration script used to automate the software image installation and configuration process.

  • One or more servers containing the necessary software images and configuration files.

Figure 1. POAP Network Infrastructure


Setting Up the Network Environment to use POAP

The network environment for POAP can be set up with either a USB or a DHCP server.

Using USB

Follow these guidelines when copying software images, the configuration file, and the configuration script into a USB when setting up the network environment for POAP:

  • The POAP configuration script on the USB should be titled poap_script.tcl.

    • The configuration file with the name conf_<serialnum>.cfg must be present in the USB. To obtain the serial number of the switch, run the show sprom backplane 1 command:

      switch# show sprom backplane 1 
      DISPLAY backplane sprom contents:
      Common block:
       Block Signature : 0xabab
       Block Version   : 3
       Block Length    : 160
       Block Checksum  : 0x128e
       EEPROM Size     : 512
       Block Count     : 6
       FRU Major Type  : 0x6003
       FRU Minor Type  : 0x0
       OEM String      : Cisco Systems, Inc.
       Product Number  : DS-C9148S48PK9
       Serial Number   : JAF17353076
       Part Number     : 73-15809-01
      
      
  • The names of the software images copied to the USB should have standard names and must match the names specified in the POAP script.

    For example, to boot up a Cisco MDS 9148s switch with the m9100-s5ek9-kickstart-mz.7.3.0.D1.0.159.bin and m9100-s5ek9-mz.7.3.0.D1.0.159.bin images, ensure that the POAP configuration script (poap_script.tcl ) has the following information:

    • set m9148s_image_version 7.3.0.D1.0.159

    • set m9148s_kickstart_image_src [format m9100-s5ek9-kickstart-mz.%s.bin $m9148s_image_version]

    • set m9148s_system_image_src [format m9100-s5ek9-mz.%s.bin $m9148s_image_version]


      Note

      Ensure that the POAP script identifies the switch.



Note

  • Only FAT32 USB is supported. (The file system on the USB should be FAT32).

  • Both the software images and the configuration files should be present in the USB. If no configuration is required, create an empty file named conf_serialnumber.cfg. When the configuration file is empty, the switch reloads the images twice from the USB.


Using a DHCP Server
Procedure

Step 1

Deploy a TFTP server to host the configuration script, software images, and configuration files.

Step 2

Deploy a DHCP server.

Step 3

Configure the following parameters in the DHCP server:

  • Interface address

  • Gateway address

  • TFTP server's IP address

  • Boot file name

The following example of dhcpd.conf on Linux, with bootfile name, TFTP server, and script file name:
option vlan-id code 132 = unsigned integer 32 ;
subnet 10.105.188.0 netmask 255.255.255.0 {
	max-lease-time 7200;
	class "cisco MDS" {
	  match if substring(option vendor-class-identifier, 0, 15) = "cisco MDS - tcl";
	   option bootfile-name "poap_script.tcl";
           option subnet-mask 255.255.255.0;
	   option domain-name "cisco.com";
	}
	option routers 10.105.188.1;
	option tftp-server-name "10.105.188.159";
}
Step 4

T obtain the serial number of the switch, execute the show sprom backplane 1 command.

Step 5

Create a separate directory for each switch in the base directory of the TFTP server. The name of each directory should be the same as the serial number of the switch. Creating a separate directory for each switch enables you to have separate software images or configuration files for different switches.

Note 

The base directory should contain the software images (kickstart and system images) and the server-list.cfg file. The file names of the software images should match poap_script.tcl and device-recipe.cfg.

In the newly created directory for each switch, maintain the device-recipe.cfg and the conf_SN.cfg file. (ReplaceSN with the exact serial number of the corresponding switch.)

The following is an example of device-recipe.cfg:
{"serial-number":"JAF1735307V","kick-start-image":{"image-name":"MDS9148S_boot","download-server":
"Default_SCP_Repository"},"system-image":{"image-name":"MDS9148S_isan","download-server":
"Default_SCP_Repository"},"startup-config":{"config-name":"conf_JAF1735307V.cfg","download-server":
"Default_SCP_Repository"}}

The following is an example of server-list.cfg:

{  "repositories": {"Default_SCP_Repository":{"url":"scp://server_IP/directory_path","username":
"user","password": "password","last-modified-time":"Mon Mar 24 00:22:33 PDT 2014"}  },  "resources":{  }}
Note 

You can download all the sample files for the POAP process from the following link:

https://software.cisco.com/download/release.html?mdfid=283453013&softwareid=282088132&release=6.2(11)&relind=AVAILABLE&rellifecycle=&reltype=latest

Note 

Ensure that you select the correct version of the Cisco MDS NX-OS release before downloading the sample files.


The POAP Process

The POAP process involves the following phases:

  1. Power up

  2. USB discovery

  3. DHCP discovery

  4. Script execution

  5. Post-installation reload

Within these phases, other processes and decision points occur. The following illustration shows a POAP process flow:

See Setting Up the Network Environment to use POAP for more information on the POAP process.

Figure 2. The POAP Process


The Power-Up Phase

When you power-up a switch for the first time, it loads the software image that is installed at manufacturing, and only tries to find a configuration file from which to boot. When a configuration file is not found, the POAP mode starts.

During startup, a prompt appears, asking if you want to abort POAP and continue with the normal setup. You can choose to exit or continue with POAP.


Note

No user intervention is required for POAP to continue. The prompt that asks if you want to abort POAP remains available until the POAP process is complete.


If you exit the POAP mode, you enter a script. If you continue in the POAP mode, all the front-panel interfaces are set up in the default configuration.

The USB Discovery Phase

When the POAP process begins, the switch searches the root directory for the presence of accessible USB devices with the POAP configuration script file (poap_script.tcl), configuration files, and system and kickstart images.

If the configuration script file is found on a USB device, POAP begins to run the configuration script. If the configuration script file is not found on the USB device, POAP executes DHCP discovery. (When failures occur, the POAP process alternates between USB discovery and DHCP discovery until POAP succeeds or you manually abort the POAP process.)

If the software image and switch configuration files specified in the configuration script are present, POAP uses those files to install the software and configure the switch. If the software image and switch configuration files are not on the USB device, POAP performs a clean-up operation and starts the DHCP phase from the beginning.

The DHCP Discovery Phase

The switch sends out DHCP discover messages on the management interface that solicits DHCP offers from the DHCP server or servers. (See the following Figure 1.) The DHCP client on the Cisco MDS switch uses the switch serial number in the client-identifier option to identify itself to the DHCP server. The DHCP server can use this identifier to send information, such as the IP address and script filename, back to the DHCP client.

The POAP process requires a minimum DHCP lease period of 3600 seconds (1 hour). POAP checks the DHCP lease period. If the DHCP lease period is set to less than 3600 seconds (1 hour), POAP does not complete DHCP negotiation, but enters the USB phase.


Note

The POAP process has to be aborted manually.


The DHCP discover message also solicits the following options from the DHCP server:
  • TFTP server name or TFTP server address—The DHCP server relays the TFTP server name or TFTP server address to the DHCP client, which uses this information to contact the TFTP server to obtain the script file.

  • Bootfile name—The DHCP server relays the bootfile name to the DHCP client. The bootfile name includes the complete path to the bootfile on the TFTP server. The DHCP client uses this information to download the script file.

When multiple DHCP offers that meet the requirement are received, an offer is randomly chosen. The device completes the DHCP negotiation (request and acknowledgment) with the selected DHCP server, and the DHCP server assigns an IP address to the switch. If a failure occurs in any of the subsequent steps in the POAP process, the IP address is released back to the DHCP server.

If none of the DHCP offers meet the requirements, the switch does not complete the DHCP negotiation (request and acknowledgment), and no IP address is assigned. However, the POAP process is not aborted because the switch reverts to the USB phase.

Figure 3. DHCP Discovery Process


Script Execution Phase

After the device bootstraps itself using the information in the DHCP acknowledgment, the script file is downloaded from the TFTP server.

The switch runs the configuration script, which downloads and installs the software image and downloads a switch-specific configuration file.

However, the configuration file is not applied to the switch at this point, because the software image that currently runs on the switch might not support all the commands in the configuration file. After the switch reboots, it begins to run the new software image, if any. At that point, the configuration is applied to the switch.


Note

If script execution fails, the DHCP discovery process restarts.


Post-Installation Reload Phase

The switch restarts and applies (replays) the configuration on the upgraded software image. Afterward, the switch copies the running configuration to the startup configuration.

Configuring a Switch Using POAP

Before you begin

Make sure that the requisite network environment is set up to use POAP. For more information, see the Using USB section.

Procedure


Step 1

Install the switch in the network.

Step 2

Power on the switch.

If no configuration file is found, the switch boots in the POAP mode and displays a prompt that asks if you want to abort POAP and continue with a normal setup.

No entry is required to continue booting in POAP mode.

Step 3

(Optional) To exit POAP mode and enter the normal interactive setup script, enter y (yes).

The switch boots, and the POAP process begins.


What to do next

Verify the configuration.

Verifying the Device Configuration

To verify the configuration after bootstrapping the device using POAP, use one of the following commands:

Command

Purpose

show running-config

Displays the running configuration.

show startup-config

Displays the startup configuration.

For detailed information about these commands, see the Cisco MDS 9000 Family Command Reference.