Sunday, December 25, 2011

Basic Switch Configuration

Before begin configuration we need to see the current status of switch. This can be don using verity of ‘show’ commands. Some of them are given below

  • SW1#Show int status  ;shows description of ports, status, VLAN in which port is connected to, duplex, speed of each interface  etc.
  • SW1#show int fa0/1 ;This command shows interface specific details like Transmission rate, error state, etc.
  • SW1#show run int fa0/1 ;This command shows the commands entered under the interface fa0/1, in the running configuration
  • SW1#show power inline : This command shows the power settings of each port. Used for VoIP devices. If you don’t know about inline power, please check here

Now, lets set the interface attributesCisco switch port

Setting interface attributes

The syntax is as follows:

interface type mod/port

speed {10 | 100 | 1000 | auto}  ;This command tells transmission speed. It can be set depending on Speed of Interface. Normally Switch detects the speed correctly. Default configuration is “auto” ie. automatically detect the speed

duplex {half | full | auto} ;set the duplex of interface. Default is auto. But it is better to hardcode by command on both side.  If you set duplex to auto then make it on both side. Also, if you set duplex make sure that it is typed on both side, otherwise mismatch will happen. If you don’t know about duplex, please check here

mdix auto ;This is the default setting. . This permit switch to automatically discover if a crossover connection is needed. we can change the setting by “no mdix auto” command

media-type {sfp | rj45} ;detects automatically. sfp used for fiber optic ports

Sample configuration is given below:

SW1(config)#interface fa0/1

SW1(config-if)#speed 100

SW1(config-if)#duplex full

SW1(config-if)#no shut (to enable the interface)

Ok. That’s enough. But the problem is, we have to type it on all interface. Hmm… It has an easy way – use the ‘range’ command

SW1(config)#int range fa 0/1 - 4 , fa0/15 ;comma is surrounded by space. This will select the specified range of interfaces i.e. from fa0/1 to fa0/4 and fa0/15 at the same time. Now we can set any attributes to that interface.

SW1(config-if-range)#shut

Setting inline power

SW(config-if)#power inline {auto|never} :to automatically discover power need by port or disable power

SW(config-if)#power inline {consumption mw | static max mw} : to give power specifically

No comments: