The Dynamic Host Configuration Protocol (DHCP) image upgrade feature on a switch can be used to configure a DHCP server to download both a new image and a new configuration file to one or more switches in a network. Simultaneous image and configuration upgrade for all switches in the network helps ensure that each new switch added to a network are synchronous with the network.
The DHCP Image Upgrade on your switch works in two ways: DHCP Auto Configuration and Image Auto Update. Configuring these features could be very beneficial in managing more than one switch or stacked switches in the network.
This article provides instructions on how to configure DHCP image upgrade on your switch in two ways: DHCP Auto Configuration and Image Auto Update.
Important: Before you start the configuration, an active DHCP server must be set up in the network with the locations and names of the configuration file and firmware image of your devices. The devices in the network are configured as DHCP clients by default. When the devices are assigned their IP addresses by the DHCP server, they also receive information about the configuration file and firmware image.
Make sure your TFTP or SCP server is configured. If the configuration file and/or firmware image are different from the ones currently used on the device, the device reboots itself after downloading the file and/or image. Place a configuration file in the working directory. This file can be created by copying a configuration file from a device. When the device is booted, this becomes the Running Configuration file.
DHCP autoconfiguration downloads a configuration file to one or more switches in your network from a DHCP server. The downloaded configuration file becomes the running configuration of the switch. It does not overwrite the bootup configuration saved in the flash, until you reload the switch.
Note: The available commands may vary depending on the exact model of your device. In this example, SG350X-48MP switch is used.
Step 1. Log in to the switch console.
Note: In this example, the username and password used is cisco/cisco.
Step 2. Enter the Global Configuration mode of the switch by entering the following:
Boot Host Auto-config
Step 3. Enter the boot host auto-update Global Configuration mode command to enable the support of auto update via DHCP.
The options are:
- extension — The SCP file extension. When no value is specified, scp is used. The range is 1 to 16 characters.
Note: In this example, boot tftp is used.
Step 4. (Optional) Enter the no form of the boot host auto-config command to disable DHCP auto configuration.
Boot Host Auto-update
Step 5. Enter the boot host auto-update Global Configuration mode command to enable the support of auto update via DHCP.
The options are:
- extension — The SCP file extension. When no value is specified, scp is used. The range is 1 to 16 characters.
Note: In this example, boot tftp is used.
Step 6. (Optional) Enter the no form of the boot host auto-update command to disable DHCP auto update.
Step 7. Exit the Global Configuration mode by entering the following command:
Show Boot
Step 8. Enter the show boot Privilege EXEC mode command to show the status of the IP DHCP Auto Config process.
The boot host auto-config and auto-update settings should be displayed.
You should now have successfully configured the DHCP auto-config and auto-update settings on your switch through the CLI.
IP DHCP TFTP-Server IP Address
Step 1. Enter the Global Configuration mode of the switch by entering the following:
Step 2. Enter the ip dhcp tftp-server ip address Global Configuration mode command to set the backup IP address of the server. This IP address serves as the default address used by a switch when it has not been received from the DHCP server.
Note: For the ip-addr, you can use IPv4 address, IPv6 address, or Doman Name System (DNS) name of TFTP or SCP server.
Note: In this example, the IP address used is 192.168.1.102.
Step 3. (Optional) Enter the no form of the ip dhcp tftp-server ip address command to revert the default settings.
IP DHCP TFTP-Server File
Step 4. Enter the ip dhcp tftp-server file Global Configuration mode command to set the full file name of the configuration file to be downloaded from the backup server when it has not been received from the DHCP server.
SG350X# ipdhcptftp-server file [file-path]
Note: For the file-path, you can enter the file path and the name of the configuration file on the server.
Note: In this example, TFTP/config is used.
Step 5. (Optional) Enter the no form of the ip dhcp tftp-server file command to revert the default settings.
IP DHCP TFTP-Server Image File
Step 6. Enter the ip dhcp tftp-server image file Global Configuration mode command to set the indirect file name of the image file to be downloaded from the backup server when it has not been received from the DHCP server.
Note: For the file-path, you can enter the file path and the name of the image file on the server.
Note: In this example, TFTP/image is used.
Step 7. (Optional) Enter the no form of the ip dhcp tftp-server image file command to remove the file name.
Step 8. Exit the Global Configuration mode by entering the following command:
Show IP DHCP TFTP-Server
Step 9. Enter the show ip dhcp tftp-server EXEC mode command to display information about the backup server.
The IP DHCP TFTP Server settings should be displayed.
You should now have configured the IP DHCP TFTP Server Settings on your switch through the CLI.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Dec-2018 |
Initial Release |