Basic Network Device Commands – CompTIA Network+ N10-009 – 5.5

Some commands are the same across multiple devices. In this video, you’ll learn about show route, show interface, show config, and other common device commands.


In your first job working with networks, you’ll probably work with one of the major providers of network equipment. And you’ll become very accustomed to using the command line for that particular equipment. But your company might purchase equipment from many different manufacturers.

Fortunately, the commands at the command line are very similar between these manufacturers. So if you learn the basics of how to use one manufacturer’s switch, you can often use that knowledge to also manage another manufacturer’s switch. This doesn’t mean that the syntax of the command line is exactly the same between all of these different manufacturers. But it does come very close to each other. And the output has very similar information from one manufacturer to another.

Once you learn the technology behind the commands, it becomes relatively easy to move back and forth from one manufacturer to another. And you’ll begin to memorize the different commands for the different manufacturers. And it will soon become very second nature.

In our videos where we talk about the switching process, we talk a lot about the MAC address table. This is the table inside of the switch that has a list of all of the MAC addresses that it’s learned. And it knows which ports that it learned that MAC address on. Now, when the switch needs to make a decision about where certain traffic should be sent, it can reference that MAC address in the table, identify the port, and send that traffic directly out that port.

On many manufacturers’ equipment, there is a show command that provides this view. This is a Cisco switch. And I use the show mac-address-table command to list out all of the MAC addresses in the MAC address table. So if you’re troubleshooting a switch and you’re wondering why certain traffic may be sent out every interface or you’re wondering if you’ve hit the maximum number of entries in your MAC address table, you can use the show mac-address-table to get more details.

We’ve also talked a lot about routing in this course. And if you’d like to see a list of the routes inside of the routing table, you can use the show route command. This is a very useful command to be able to see exactly where the routes are for a particular router. And you can use this command on each router to be able to build the path that it should take to get traffic from one end of the network to the other.

It’s very common to use the show route command, have a look at the routes in the table, find the route that would apply to the traffic that you’re looking at, and then follow that traffic out the specific interface. You can then use that process on every route throughout the path to track it from one end of the network to the other. Here’s an example of the show route command from a Cisco router.

At the top of the show route command is a list of all of the abbreviations that are used in the routing table itself. On the left side, you can see these abbreviations. There are only two that are used in this particular routing table. One is the R abbreviation. That correlates back to a RIP protocol that was used to build that route. And then we also have a C, which is a connected route. This means that this particular network is directly connected to an interface of this router.

You can then step through each one of these routes to see which might apply towards the traffic that you’re looking at. This first line of the routing table is for all traffic that would need to go to 1.0.0.0/8. It would get to that route through 20.20.0.2. And you would reach that next hop by leaving Serial3/0 as the interface. There may be a more specific route inside of this routing table. So you would need to evaluate each one of these routes to see if you have a more specific route that could apply to your traffic.

Maybe our problem is not with switching or routing. But instead we’re more concerned with the speed and duplex of a particular interface. Or we may want to know if there’s any errors associated with a particular interface. And you would view that by using the show interface command.

The show interface command will show you if an interface is up, if it’s down, if it’s connected, or if you’ve administratively disabled that interface. You can also view information about the speed, MTU, and any encapsulation types for that interface. And you may be able to identify problems. You can see if there’s been any CRC errors on that interface, if you’ve dropped any of the frames coming through that particular connection, or if there is any input or output errors. And you might be able to get an overall performance view. You might want to see the total number of frames or the total number of broadcasts that have gone through a particular interface.

Here’s a view of the show interface command. This is an interface that is a FastEthernet 0/0. So that tells us that it’s a 100-megabit interface. And it’s connected on slot 0 and port 0. We can see that this particular interface is up and the line protocol is up. So we are getting signal on this particular interface.

We can see the hardware configuration. This is running at full duplex at 100 megabits per second. And the media type is an RJ45. We can then see input and output rates. We can view any errors, such as CRC errors, and get an overall view of how this interface might be performing.

When you make a configuration change to a device, this sometimes is done in a web front end. But very often, you can view a text-based view of the configuration itself. Some devices only support a text-based view for configuration. And you can view that configuration right at the command line using the show config command.

This will show you information about the configuration that’s currently running inside of that device. And you may be able to view configurations that are stored on the storage drive of that device. Each manufacturer has a different format and a different syntax that they use when they’re storing information as part of a configuration. So you’ll need to become more familiar with that manufacturer’s specific syntax and layout to really understand what’s inside of this configuration file.

Here’s a configuration file from a router. The configuration was so long that I had to separate it into separate columns. You can see the command is up here– show running-config. That’s the command on this particular device that shows us the configuration that is currently active inside of this router.

We can see the configuration is 830 bytes, the version that we are using, information about timestamps that will be stored. We can see router information. And then we have IP addresses, subnet masks, and other details that are associated with the individual router ports. There are many other details in this configuration. But it is nice that you’re able to read through all of these details. And if you need to modify a configuration, you can simply change it at the command line and then view the configuration again.

In an earlier video, we talked about viewing the ARP cache that’s inside of the operating system that you’re using. But there’s also a way to view the ARP cache inside of switches and routers. You can do that with the show arp command. This views the Address Resolution Protocol cache that is loaded inside of that device. And it’s very similar to the ARP cache that you would see inside of your operating system.

So if you’re trying to determine if a switch or router sees a particular MAC address that’s associated with an IP address, you can view all of that inside of your ARP table. This is the protocol, the IP address, the hardware or MAC address associated with that IP address, and the interface that was used to identify that particular pair.

If you’re working a lot with switches, then you’re probably doing a lot of VLAN configurations as well. So it’s important to be able to view what VLANs are associated with which interfaces on that switch. You would view this by using the show vlan command. This will list out all of the VLANs on this device. And it will show you what interfaces have been assigned to that VLAN.

Not only can we view the assigned VLAN IDs. You can also see what the default VLAN is for this entire switch. You can see interfaces that are part of the default VLAN. Or you can view any interfaces that may have been specifically assigned to a different VLAN.

A lot of the switches that we use today can support Power over Ethernet, or PoE. This means that we’re going to use the Ethernet cable to power up devices that are on the other end of this switch. But to do this, we need to monitor the switch and make sure that we have enough power for all of these devices. We can view this power usage through the show power command. This will give us a list of all of the interfaces. It shows us if PoE is turned on or turned off for a particular interface. And then we can see how much power is being used by that particular device.

This also lets us know if we can add additional devices to this switch. This particular switch supports 370 watts. We’re using 40 watts. So we have 330 watts remaining. So if we need to add additional devices, we probably have enough wattage to be able to support those using this PoE switch.