Example of the test configuration for the Smart-config

  • Home
  • News
  • Example of the test configuration for the Smart-config

Example of the test configuration for the Smart-config

Smart config Working process of the functions:

  1. Power up equipment. Determine whether smart config is required: Device enables smart config function (default enabled, configuration command: smartconf initial-switch-deploymen); no startup-config file exists on the device;
  2. The DHCP server assigns the IP address and carries the TFTP server IP address through the option 150;
  3. The device finds startup-config and imageon the TFTP server, downloads to local, restart and applies.

operating steps:

1. Complete the physical connection by topology

Build a simple experimental environment as follows. There is no physical connection port in the figure, and any physical port belonging to this vlan is OK. Requirements: a TFTP server, a DHCP server, and a test switch supporting Smart config.

2. Configuring the DHCP-Server

Here we use a switch that supports the DHCP-Server function (or other DHCP-Server servers, including Option150: TFTP-Server IP). These configurations can refer to the user manual for the corresponding series Switch.

The configuration is as follows:

Switch# configure terminal

Switch(config)# service dhcp enable

Switch(config)# dhcp server

Switch(config)# dhcp pool pool100

Switch(config-dhcp)# network

Switch(config-dhcp)# gateway

Switch(config-dhcp)# tftp-server-address

Switch(config-dhcp)# exit

Switch(config)# dhcp excluded-address

Switch(config)# interface vlan1

Switch(config-if)# ip address

Switch(config-if)# dhcp server enable

Switch(config-if)# exit


3. Prepare the TFTP-Server

Build a TFTP server

Here, use the application software to open the TFTP service on PC(, and create the “smartconfig” folder under PC TFTP service directory with the following directory structure (the configuration files in conf directory and the image files in images directory):







Control image files and configuration files downloaded from the “smartdeploy.xml” file. There are three types of labels in the xml file: MAC, product-id, and SN. Find the image files and configuration files in the of MAC, SN, and product-id. The specific contents are shown as follows:






























Note: In this example,the switch find its own image file (S5624.v7.4.50.1014.bin) and configuration file (5624-startconf.conf) by matching the MAC address (d85b.2200.0423).

Also matched by productid or SN.

If the above match fails, the file specified in <defItem> will be downloaded.

4. Operation on the DUT

  1. The Smart config function can be “disable”and “enable”, and the default is “enable” without any operation;
  2. Delete the configuration files beforetesting:

delete flash:/startup-config.conf

delete flash:/boot/startup-config.conf

  1. Ensure the DUT is properly connected, then power off the switch and then power on (simulate the first use of the switch). After finishing startup, the switch automatically downloads the matching files and then automatically resets.

Note: After one startup, the switch has startup-config.conf file and smart config function fails.