In this continuation of getting familiar with the CLI (Command Line Interface) of your Cisco or Stratix switch, we will go beyond getting connected and look at some important features for remote connection and maintenance that will need to be utilized in maintaining your network for any environment whether it would be IT or OT.
IP Address Configuration
Each vlan in your network switch will need an IP address. This gives identity to each network for routing as connected to other switches and routers in your network as well as management of the switch remotely.
When you assign an IP address for a particular vlan, you must also provide the subnet mask.
To assign an IP address:
- HMINET1(config)#int vlan 30
- HMINET1(config-if)#ip address 10.20.1.50 255.255.255.0
IP Default Gateway
Your switch also needs a default gateway if it will be connected either directly or indirectly to a routed interface upstream in your network.
If you want to switch to be able to route information to other networks, then you will need to assign that routed interface to your switch’s default gateway.
- A switch can have only one default gateway
- HMINET1(config)#ip default-gateway 192.168.1.1
Backup and Restore Configuration
There is probably nothing more important than backing up your switch configuration and being able to restore it in the event of a failure.
During a network failure, users cannot access needed systems or maybe machines cannot run, depending on the network or environment.
Hopefully in a truly critical network environment, you are utilizing a redundant topology, but even in a redundant network topology, it is important to restore the network to a state of its full stability as soon as possible.
This can be done utilizing Windows Powershell with a telnet connection. We set up the line vty (telnet) capability in a previous article, so now it is easy to fire up Powershell. Right-Click on Powershell and “Run as Administrator”
- Telnet to the switch using the connected IP Address & provide password
- One way to back up & restore switch configuration is to use a TFTP server. There are plenty of free TFTP servers online to download. Simply have one running on a network server or your laptop if you are directly connected to the switch.
Backing Up Configuration
- HMINET1#Copy running-config tftp
- Restore a switch configuration from a TFTP server
- HMINET1#copy tftp running-config
In this article, part four of our series, we have made some additional changes to our switch to provide the capability for the switch to have unique vlan IP addresses to route to other networks and provided the switch with a default gateway address to know how to get to the router to communicate with other networks.
We then switched to the maintenance side of the switch and show examples of how to back up a switch configuration and restore its configuration.
While this is simply an introduction, I hope it gives you some insight into how to get started with your switch configuration and if you were previously unfamiliar with switch configuration and this series has sparked interest in you, then you are probably an IT or OT engineer in the making and this will spark interest for you to dive in further on your own.
I’ve found that making devices communicate comes with a sense of reward and accomplishment when the job is done.
Written by Brandon Cooper
Senior Controls Engineer and Freelance Writer
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
- Rockwell Patch Rollup – How To Download and Install (2022) - August 4, 2022
- Studio 5000 – Resolve .Net Framework 3.5 Installation Error 0x80D05001 - July 26, 2022
- Studio 5000 – v34: What’s New - May 9, 2022