Automatic Deployment and Configuration
Version
This feature requires version 1.9.0 or later
This section contains information related to the automatic deployment and configuration features on the Cisco Nexus 3550-F Fusion (formerly ExaLINK Fusion).
The automatic deployment and configuration functionality allows a user to setup their network in such a way that new Nexus 3550-F devices added to that network will query a DHCP server to download and execute a script defined by the user. Executing this script means a user can configure or communicate to and from the Nexus 3550-F remotely at the time of deployment.
Displaying Automatic Configuration State
When inspecting the Nexus 3550-F the show auto-config
command can be invoked to see the current enabled or disabled state of the automatic configuration functionality.
For Nexus 3550-F devices the initial empty configuration should look as follows:
admin@N3550-F> show auto-config
Automatic startup configuration enabled
Note
Newly purchased Nexus 3550-F devices will have this feature enabled to allow for streamlined deployment. Once configured or if not desired a user can disable this feature.
Configuring Automatic Configuration
First enter configuration mode of the Nexus 3550-F.
admin@N3550-F> configure
When in configuration mode a user can enable this feature with the auto-config enable
command.
admin@N3550-F(config)> auto-config enable
Enabled auto-configuration
To disable this feature
admin@N3550-F(config)> auto-config disable
Disabled auto-configuration
or
admin@N3550-F(config)> no auto-config
Disabled auto-configuration
Running show auto-config
will now show it is in the disabled state
admin@N3550-F> show auto-config
Automatic startup configuration disabled
The automatic configuration feature will only execute when the Nexus 3550-F is connecting to a DHCP server (which is the factory default mode). This can either happen at start up or when the user configures the Nexus 3550-F for DHCP mode. To do this run management address dhcp
admin@N3550-F(config)> management address dhcp
Enabled DHCP on management interface
Remember to save the running configuration to the startup configuration if you want these settings to take remain over a reboot.
admin@N3550-F(config)> copy running-config startup-config
Saved running config to startup config
Configuring a DHCP Server
If desired when a DHCP client starts, and after it receives a DHCPOFFER response from a DHCP server, the client can communicate directly with a boot server (instead of the DHCP server) to download a boot file
.
The Nexus 3550-F auto-config feature relies on this behaviour, that is its DHCP client being able to contact a DHCP server on a local LAN. The DHCP server can then be configured to provide a boot file
address to the Nexus 3550-F. The Nexus 3550-F will fetch this file and apply it once downloaded. Note the boot file
may have various names depending on the DHCP server e.g. boot-file
, filename
etc
Example script for dhcpd
#
# DHCP Server Configuration file.
#
option domain-name "autoconfig.exablaze.com";
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
filename "http://192.168.111.11/fusion_autoconf.sh";
subnet 192.168.111.0 netmask 255.255.255.0 {
range 192.168.111.111 192.168.111.130;
}
The Nexus 3550-F can download a boot file via HTTP:
filename "http://192.168.111.11/fusion_autoconf.sh";
or TFTP:
filename "tftp://192.168.111.11/fusion_autoconf.sh";
Note
When downloading via HTTP boot file names should use HTTP encoding for special characters such as spaces. For example:
filename "http://192.168.111.11/my%20new%20pythontest.py";
Example script files
The script files will execute as if executed by the admin user on the Nexus 3550-F. Therefore can operate standard tools like ip a
, journalctl
or Nexus 3550-F tools such as cli
. Calling cli
allows execution of commands from bash that you would normally execute through the Nexus 3550-F command line interpreter (cli
)
A simple bash example to configure basic management details:
#!/bin/sh
cli -c 'configure management name-server 10.11.12.13'
cli -c 'configure hostname MYFUSION'
cli -c 'configure timesync gps'
cli -c 'configure copy running-config startup-config'
A simple bash example to configure the data path:
#!/bin/sh
cli -c 'conf patch A1 A2'
cli -c 'conf tap B1 B15'
cli -c 'conf tap B1 B16'
cli -c 'conf copy running-config startup-config'
A bash example configuring remote logging and snmp and then turning off auto-config once complete:
#!/bin/sh
cli -c 'conf snmp read community public'
cli -c 'conf snmp enable'
cli -c 'conf remote-logging target udp my-logging-server all all'
cli -c 'conf remote-logging enable'
cli -c 'conf auto-config disable'
cli -c 'conf copy running-config startup-config'
A Python example utilising the Fusion API which fetches a firmware update and applies it:
#!/usr/bin/python
# Example python script for running on Fusions
# Uses python bindings for the Fusion API
# Refer to https://exablaze.com/docs/fusion/api/ for full API details
import exalink
exalink.set_hostname(hostname='MYFUSION')
exalink.set_management_address_ipv4(mode="static", static={"address":"172.16.0.153","netmask":"255.255.255.0", "gateway":""})
exalink.save_startup_config()
exalink.update_tftp(server="172.16.0.160", file="exalink_fusion_1.9.0.tar")
# note that when update_tftp() completes it will automatically reboot the box
A Python example configuring the data path:
#!/usr/bin/python
import exalink
exalink.create_patch(ports=["A10","C1"])
exalink.create_tap(port="A16", src_port="A10", direction="input")
exalink.create_object(type="mux", name="my_mux", mode="layer2")
exalink.add_object_port(object={"type":"mux","name":"my_mux"}, port="B1", side="up")
exalink.add_object_port(object={"type":"mux","name":"my_mux"}, port="B10", side="down")
exalink.save_startup_config()
This page was last updated on May-28-2021.