Configuring a switch management interface involves assigning an IP address to VLAN 1, setting a default gateway, and enabling Telnet access through the virtual terminal lines so the device can be administered remotely over the network.
Switch Remote Management Setup
Initially, when you get your devices, you have to console into it to start managing it. We console into it, we start programming it. But long term, we probably want to remote manage our equipment. An example of this is if you get a really large network and you're trying to go from a piece of equipment to piece of equipment, and you're plugging into each one of those and trying to manage it, that's going to take forever. So what we need to do is set up our devices so we can remote manage them.
Let's set up a management interface so that way we can configure this device. What I'm going to do is get into VLAN 1, and I do that by going into the global configuration mode and then typing in interface vlan 1. And then I'm inside of VLAN 1. The reason why I'm going to do this is I'm going to assign an IP address to this switch right here that is part of VLAN 1, and all of the switch ports are also part of VLAN 1. So anything that's plugged into any of these ports on this switch — since by default they're all VLAN 1 — will be able to access this IP address and therefore access this switch.
I'm in interface VLAN 1. I'm going to type in ip address, and then I'll do a question mark. It's asking for an IP address, so now I need to come up with what IP address I'm going to assign it. Hopefully I'd know this information ahead of time. I'm going to type in cmd to bring up a command prompt, and I'll do ipconfig to see what this computer is assigned to, and its Ethernet port, which is plugged into Fa0/14. So it's plugged into Fa0/14, and its IP address is 192.168.74.12.
I need to assign this switch onto that same network in order for my laptop to talk to this switch, and I'm going to assign it dot two, so this switch is going to be dot two. I'll assign it that. Does it need any more information? Yes, it does. It needs to know the network that it's on. The network is a class C, so it's 255.255.255.0. Then I'm going to hit enter. Now it has an IP address assigned to it. I'm going to type in no shutdown to make sure that this interface is up. So VLAN 1 interface is up and it has an IP address.
So do we have connectivity? Let's see. I'm going to pull up this device right here and I'm going to ping the address I assigned it, and then we'll see if this pings correctly. Now keep in mind, the reason why this works is this device is plugged into VLAN 1 and the IP address is assigned to VLAN 1. And so we do in fact have a successful ping, so these two devices are talking through the network now, and not just through the console port. This right here is still connected in the console port, but we can ping via the Ethernet connection, so we do have connectivity to this.
Now if this was two different networks, then the switch doesn't know how to get outside of its network. If we look back here at our computer, it has a default gateway that's assigned to it, and it's 192.168.74.1. It's got this default gateway assigned to it so it knows how to get outside its network, but the switch does not. So if we wanted this accessible from outside the network, what we'd have to do is assign it a default gateway.
I'm going to exit out of this interface. We're in the global configuration mode. I can type in ip default-gateway and then see what it's looking for. It's looking for an IP address — this is the gateway that we're saying is for this address. Then I hit enter, and now this switch will be able to be managed from somewhere outside of the network as well.
So that's how we set up the management interface, and we're soon going to learn how to then set it up so that we can actually remote in and connect into this. But for now, I am going to show you one more thing. I'm going to exit out of here, and we're going to do a show ip interface brief. I just wanted to show you that this VLAN 1 does show up now with an IP address, and says that it's up.
Now that we have the management interface set up and we can ping that management interface, let's see if we can make a connection into it. What I'm going to do is start a new PuTTY connection here. I do that by clicking the icon in the upper left hand corner, saying new session. I'm going to choose other and Telnet, and then I'm going to type in the IP address of what I want to remote into: 192.168.74.2. I click that and I'm going to open the connection, and it says password required but none is set. So we need to set a password in order for this to work. We've got to get into the virtual terminal and set a password in it.
What I'm going to do now is get into — I'm on the console of this switch — I'm going to type in configure terminal to get into the global configuration mode. I'm going to type in line, and this is not the console, but this is the VTY, or the virtual terminal lines that are coming in. So the VTY lines. And the console — there is one port on most of these switches that's a console zero, and there's not other ones. But the virtual, you can actually have multiple people connected into this, or maybe even you have something that's monitoring it that might be using one of these. So you can have multiple things that are connected to this at any given time.
So we're going to actually want to configure a range, and the range is going to depend on what switch you have or what device you have. Some of them will support just 0 through 4, while others will do 0 through 15. This one has 16 virtual lines and it's from 0 through 15. So we're going to type in the range and configure the whole range at once. To do that we type in 0 space 15, and that's how Cisco sees that this is a range. So 0 15, I'm going to hit enter. You can see now I'm in the line configuration mode, so I'm configuring this line.
The next thing that I need to do is assign it the password — that's what it's missing. I'm going to assign it a password. Once again, normally what I'd like to do is something that is well encrypted, but for the training we're just going to keep this simple. We're going to do secret four on this particular one, and then I'm going to hit enter. And then I will type in that login command, which pretty much just activates this. It says, okay, yes, you're going to accept this as an entry point, here's a password. So there we go.
Now that we have our password set up, let's see if it works. I'm going to click our icon again up in the upper left in PuTTY, say new session. In order to connect to this device I click open. Yes, in fact it does have the password set up here. So we are successful, we are in. We are remoted into this machine and we're managing it through the Ethernet interface, and we're managing it remotely and not through the console port at this point. So I can type in my secret four, hit enter, and now I'm in the switch.
Now one thing to note though is if I now try to go into the enable mode, or the privileged exec mode, it says no password set. So one thing I'm going to have to do in order to do this is set a password on that privileged exec mode. I'm going to go into global config mode, enable secret, and we'll call it secret. Hit enter.
And then we bring up that Telnet session again. I'm going to go into enable, and now it's asking me for a password, and I can type in secret, hit enter, and now I'm in the privileged exec mode on this switch. I'm remote administering this switch, I'm remote managing this switch. So we now have Telnet all set up, it's working, and we no longer have to sit here and manage this device through the console cable. Instead we can remote into it.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →