Basics of cisco switch administration


Published on

Basics of cisco switch administration

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Basics of cisco switch administration

  1. 1. Basics of Cisco Switch AdministrationBasics of Cisco Switch Administration–Part 1IntroductionPerhaps you are asked to configure a switch port or see what MAC address is onwhat port. Maybe this isn’t something you do every day and need a refresher courseon the most basic Cisco switch administration tasks. Let’s find out how to performsome basic Cisco switch administration tasks.Log inBefore you can administer the switch you are going to need some basic information: What is the switches IP address or DNS name? What is the username/password you can use to login? What Ethernet switch port is the device in question connected to?One option to configure the switch might be a web-based administration interface. Ifthis is the case, basic configurations aren’t going to be that difficult and perhaps youdon’t need much more help. On the other hand, GUI interfaces aren’t alwaysavailable, but on Cisco IOS switches, the Cisco IOS Command Line Interface (CLI)always is. Plus, in a GUI interface, you won’t be able to configure every possibleconfiguration as you can with the CLI. For that reason, I encourage you to use the IOSCLI. The Cisco IOS CLI will be used in this article to perform several common switchadministration tasks.Showing the switch configurationJust like on a router, the most common switch IOS command is to show the switch’sconfiguration. This will show you the configuration for the entire switch, including allthe Ethernet ports on the switch. To see switch configuration, just type showrunning-config, like this:
  2. 2. Showing interface port statusMost of the time you are going to a switch, you want to troubleshoot a switch port,or change a switch port configuration. The quickest way to see the status of yourswitch ports is to use the show interfaces status, like this:This command shows each port: if the port is connected to the device, the VLAN theport is in, the port duplex, the port speed, and port type. This is an excellent quickway to see status for your switch ports.Changing interface speed & duplexSay that you see that interface Fa0/21 is set to auto (auto negotiate) for its speed butit needs to be set to 10Mb/sec. To change the speed of any port, you go to interface
  3. 3. configuration mode and use the speed command, like this:On this switch, the possible speeds for the 10/100 Ethernet ports are auto, 10, and100. On the Gigabit Ethernet ports, you can only tell the switch to either negotiateport speed or not to negotiate port speed. Once the speed is configured to 10Mb,you can verify it with the show interfaces fa0/21 status, like this:As you can see, the speed is now set to 10. To change the duplex of a port, youperform the same steps but use the duplex command. Duplex can be set to auto, full,or half.Enabling and disabling interfacesTo enable and disable interfaces, you use the no shutdown and the shutdowncommand in interface configuration mode. Here is an example:Notice how when the port was shutdown, console messages appear that told you theadministrative state had changed to down, and the line protocol changed to down.When the port was enabled (no shutdown), the link went down, then the line whenup, then the line protocol changed to up.You could now do a show interfaces status to see the state of the interface.
  4. 4. SummaryHere is what we have learned: How to show a switch’s configuration How to show the status of switch interfaces Change the speed and duplex of a switch port How to disable (shutdown) and enable (no shutdown) ports on a Cisco IOS switchBasics of Cisco Switch Administration– Part 2IntroductionIn Basics of Cisco Switch Administration - Part 1, we covered some of the basics ofCisco switch administration – how to log in, how to show configuration, how tochange interface speed & duplex, how to enable switch ports, and how to showswitch port status. In Part 2, we will stick to the basics of switch administration bycovering how to save your configuration, how to use the Cisco Network Assistant,how to speed up switch port startup, and basic VLAN commands.How to save your switch configurationIn Part 1 of this series, we talked about how to enable/disable ports and how tochange speed & duplex settings. Those are necessary administrator functions but,when you are done, you must save your configuration. Cisco switches will notautomatically save your changes. If you make these changes and the switch losespower, those changes are gone. You must save your changes when you are done. Theminimum that is required is to save your changes to the local switch NVRAM. Thereare two ways to do this, let me demonstrate:The textbook method of savings your configuration is: Switch# copy running-configstartup-config However, a legacy command that is short and sweet is:Switch# wr Both of these commands save your running configuration in RAM to thefile NVRAM:startup-config. When the switch is powered off, the running-config is lost.The startup-config is read when the switch boots and the running-configis created. I
  5. 5. also highly recommend that you save your configuration onto TFTP server, in caseyour switch’s local NVRAM is completely lost. Once you have a TFTP server running,you can easily save your configuration to it like this: Switch#copy running-configtftpHow to use the Cisco Network AssistantThe Cisco Network Assistant (CNA) is a free graphics tool included when youpurchase a new switch. It is used to administer Cisco network devices. CNA is afeature-rich tool and I cannot possibly go into everything it can do in this short article.I recommend CNA to anyone who would like a graphical interface for their Cisconetwork devices. Basically, CNA gives you an overview screen of your Cisco devices,like this:Once you click on Configure then Port Settings, you will see something like this:From here, you can configure the state, duplex, speed, and other options for yourswitch ports. In fact, you can configure most switch features with the CNA. Keep inmind that for all Cisco switches, there is also the web-based interface. It may bemore limited than what CNA offers. This interface can be accessed directly with yourweb browser, or it can be launched via CNA. Here is a sample screenshot of my Cisco
  6. 6. 3550 web-based interface:How to speed up switch port startupSwitch ports could be connected to a variety of devices – other switches, routers,trunk ports, PC’s, or VoIP phones. Each of these devices has a different configuration.When a device is connected to a switch port, the switch will attempt to negotiatesettings to match this device. These negotiations include ones for the Dynamic TrunkProtocol (DTP) (to see if the connected device wants to setup a trunk) and SpanningTree Protocol (STP) (Used to ensure that the connection will not cause a loop).These both take time and will delay the ability of your device (such as a PC) totransmit and receive data from the network. Most of the time, you are connecting aPC to a switch and you just want to be able to use the network as soon as possible,right?The commands I recommend enabling on all PC/laptop/printer switch ports includethese (All configured in interface configuration mode):switchport mode access: Sets the switchport into a non-trunking modeswitchportnonegotiate (optional): Disables the switchport from negotiatingspanning-treeportfast: Disables STP negotiations which speeds switchportforwarding (ensure this switchport only connects to an endpoint device)
  7. 7. Basic VLAN commandsMost companies today use Virtual LANs (VLANs). As an administrator, you shouldknow how to 1) see what device is on what VLAN and 2) to change the VLAN that adevice is in. As you know, if your device is in the wrong VLAN, it won’t be able tocommunicate with the servers that it needs to talk to and/or it may be on the wrongIP subnet. To see what VLAN a device is in, my favorite command is show vlan brief.Here is an example:As you can see, this command shows you what VLANs exist on this switch, and whatswitch ports are in what VLAN. Now, say that you want to change interface/portFa0/21 from VLAN 1 (the default) to vlan 131. Let me show you how to do that:That’s right, you simply go into interface configuration mode on the interface youwant to change the VLAN, and use the switchport access vlan XXX command. Onceyou are done, to verify the vlan membership, just run the show vlan brief commandagain, like this:
  8. 8. You can see from the command output that Fa0/21 is now a member of VLAN 131.SummaryHere is what we have learned: How to save your switchs configuration How to use the Cisco Network Assistant How to speed up your switch port startup Basic VLAN commands---Original resources from CISCO Switch Tips:How to Configure A Cisco Switch?General Information of Cisco Switch CommandsLayer 2 Switches & Layer 3 switchesSwitch Types and LAN SwitchingHow to Configure DHCP on a Cisco Router or Cisco Switch?How to Know What Device is on What Port on a Cisco Switch?