Automatic Deployment and Configuration
The automatic deployment and configuration functionality allows the the Cisco Nexus 3550-H Hydra (formerly ExaLINK Hydra) to be deployed and configured without manual user intervention, using a configuration script fetched from a central server.
Automatic configuration mode
When an Nexus 3550-H device is powered up with no startup configuration, it will display 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'.
EXAHYD-A-00001 login:
This message indicates the device is in automatic configuration mode.
In this mode the device will attempt to configure the interface management1
using DHCP.
To automatically configure an Nexus 3550-H device,
the DHCP server should provide a URL as the bootfile name (option 67).
The URL protocol may be http
, https
, ftp
, or tftp
.
When a valid URL is received, the Nexus 3550-H will download and run the file.
Please see below for an example configuration using the ISC DHCP server.
Note that if the startup configuration is present on power up, automatic configuration mode will be disabled and any URL provided by the DHCP server will be ignored.
The configuration script may be written in Python 3 or Bash shell script.
Python 3 example
Nexus 3550-H provides Python 3 bindings for the ExaLINK Hydra API for scripts running on the device. See below for an example 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()
Please see the API documentation for details of the API commands.
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 3500-H 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 an Nexus 3550-H identified by its MAC address.
subnet 172.16.8.0 netmask 255.255.255.0 {
}
host my_hydra {
hardware ethernet 64:3f:5f:83:9d:08;
fixed-address 172.16.8.146;
filename "http://172.16.8.20/my_hydra_config.py";
}