Automatic Deployment and Configuration

With the automatic deployment and configuration functionality you can deploy and configure the Cisco Nexus 3550-T Programmable Switch Platform without manual user intervention, by using a configuration script fetched from a central server.

Automatic Configuration Mode

When you power-up a Nexus 3550-T device that has no startup configuration, it displays the following message:

The device has entered automatic configuration mode because the startup
configuration is not present. The device will attempt to download and
run a configuration script from a remote system.

To cancel automatic configuration mode, login as admin and enter
'auto-config cancel'.

NX-3550-T-00001 login:

This message indicates that the device is in automatic configuration mode. In this mode, the device attempts to configure the interface management1 by using DHCP.

To automatically configure a Nexus 3550-T device, the DHCP server must provide a URL as the bootfile name (option 67). The URL protocol may be http, https, ftp, or tftp. Upon receiving a valid URL, the Nexus 3550-T downloads and run the file.

See below for an example configuration using the ISC DHCP server.

Note

Upon power-up, if the startup configuration is present, the automatic configuration mode is disabled and any URL provided by the DHCP server is ignored.

You can write the configuration script in Python 3 or Bash shell script.

Python 3 Example

Nexus 3550-T provides Python 3 bindings for scripts running on the device. See the following example of a configuration script:

#!/usr/bin/python3

import exablaze
api = exablaze.Api()

#
# Insert configuration commands here, for example:
#
# api.set_management_interface_ipv4(interface="management1", method="static",
#     static={"address":"172.16.8.146", "prefix":24, "gateway":"172.16.8.254"})

#
# Write startup configuration and reboot
#
api.save_config("startup")
api.reboot()

For details about the API commands, see the API documentation.

The Python 3 bindings also provide access to the Command Line, for example:

#!/usr/bin/python3

import exablaze
cli = exablaze.Cli()

#
# Insert configuration commands here, for example:
#
# cli.run("configure interface management1 "
#     "ip address 172.16.8.146/24 gateway 172.16.8.254")

#
# Write startup configuration and reboot
#
cli.run("copy run start")
cli.run("reboot")

Shell Script Example

The cli -c command allows a shell script to use the Nexus 3550-T Command Line, for example:

#!/bin/bash

cli -c "configure interface management1 ip address 172.16.8.146/24 gateway 172.16.8.254"
cli -c "copy run start"
cli -c "reboot"

DHCP Configuration Example

This is an example configuration file for the ISC DHCP server. It assigns a specific IP address and configuration script to a Nexus 3550-T identified by its MAC address.

subnet 172.16.8.0 netmask 255.255.255.0 {
}

host my_triton {
  hardware ethernet 64:3f:5f:83:9d:08;
  fixed-address 172.16.8.146;
  filename "http://172.16.8.20/my_triton_config.py";
}