The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
The objective of this document is to show you how to create a text file to adjust the IP settings on a switch.
Is your switch not allowing you to convert a dynamically assigned IP address to a static IP address? If you are having difficulty assigning a static IP address to a switch, due to a bug or another issue, this document can help. This document introduces an alternative to performing interaction in the Graphical User Interface (GUI). It is possible to load commands using the file operations through a text file that can help automate some of the steps required.
In this document, you will be provided the steps to create a text file with some commands that will help change your dynamic IP address to a static IP address of your choice. Then you will learn how to upload the text file using the file operations of the switch.
Step 1. Right-click on your desktop and navigate to New > Text Document. This will allow you to create a new text file.
Note: In this document, we will be using a Windows operating system to demonstrate creating a text file and uploading it onto the switch.
Step 2. Name the text file. The naming conventions will not matter for the text file. Then double-click the file to edit it.
In this example, we will use switch runconfig as our file name.
Step 3. Below are the commands that are required to populate the text file.
Note: These IPs included may be replaced with applicable IP, subnet, and gateway IP respectively.
Cisco 300 Series Managed Switches Command Reference Guide.
Cisco 350 Series Managed Switches Command Reference Guide.
Cisco 350X Series Stackable Managed Switches Command Reference Guide.
Cisco 500 Series Stackable Managed Switches Command Reference Guide.
Cisco SG550X Series Stackable Managed Switches Command Reference Guide.
The file should contain something similar to this:
config t – Enter the global configuration mode.
int vlan 1 – Enter the interface configuration (VLAN) mode for a specific VLAN.
no ip address dhcp – use the no form of this command to release an acquired IP address.
no ip address – use the no form of this command to remove an IP address definition.
ip address 192.168.1.99 255.255.255.0 – use this command to define an IP address for an interface.
exit – To exit any mode and bring the user to the next higher mode in the CLI mode hierarchy.
ip default-gateway 192.168.1.1 – Use this command to define a default gateway (device).
Step 4. Save the file by navigating to File > Save or holding down Ctrl key and then pressing the s key.
Once you have saved your text file, you will upload the file onto the switch.
Step 1. Log in to the web configuration page of your switch.
Note: In this example, we will be using an SG550X-24 switch.
Step 2. Navigate to Administration > File Management > File Operations.
Step 3. In the File Operations page, select the following operations.
· Update File – Operation Type field.
· Running Configuration – Destination File Type field.
· HTTP/HTTPS – Copy Method field.
Note: Any configurations that are in the Running Configuration file is volatile which means that it is not retained between reboots. To retain the configuration between the device reboots, copy the Running Configuration file to the Startup Configuration file after you have completed all your changes.
Step 4. In the File Name, click Browse… to select a file that you want to upload.
Step 5. A File Upload window will appear. Navigate to where your text file is located and select the file. Click Open.
Step 6. Click Apply to update the file to the running configuration.
Step 7. A Processing Data bar will appear. This occurs when the switch uploads the text file to the running configuration. Please wait a few minutes before proceeding onto step 8.
Note: There won’t be any indication that tells you that the file is uploaded.
Step 8. After waiting a couple of minutes, the switch should have loaded the new configuration file to the running configuration of the switch. Open a new browser and enter the IP address of the switch in the URL to which it was assigned in your text file.
In this example, 192.168.1.99 was used. You may need to include https:// in front of the IP address. If it is successful, your page will load into a Warning: Potential Security Risk Ahead page. Click Advanced… and then Accept the Risk and Continue. This will bring you to the web configuration page of the switch.
Note: The screenshot that was taken was used in a Firefox browser, you should get a similar page if you are using a different browser.
Step 9. Log in to the web configuration page of the switch.
Step 10. Navigate to IP Configuration > IPv4 Interface.
Step 11. The IPv4 Interface Table will display the new static IP address assigned to the switch. In this example, we can see that our IP address is 192.168.1.99 with the IP Address Type of Static.
You should now have successfully assigned a static IPv4 address on the VLAN interface through the web-based utility of the switch using a text file.