Configuring a Switch (part1)

Hello all , i  decided to make a quick series for commands used in configuring cisco devices (routers & switches) .

Here  all commands (part1) used in configuring a cisco switch . It’s pleasure if you add any command that i don’t mention all in its categorey .

i covered these points :

Switch Modes .

Help Commands .

Show Commands .

Setting Hosts Names .

Setting Passwords .

Setting IP Addresses and Default Gateways .

Seeting Interface Description .

Setting Duplex Operation .

Setting Operation Speed .

Managing the MAC Address table .

Configuring Static MAC Addresses .

You can see the topic as a .pdf format Configuring a Switch(part1.pdf

Switch  Modes

switch > enable User mode .
switch # Privileged mode (also known as EXEC-level mode).
switch (config)# Global configuration mode.
switch (config-if)# Interface mode.
switch (config-subif)# Subinterface mode.
switch (config-line)# Line mode.

Help Commands

switch > ? The “?” works here for list help commands.

Show  Commands

switch # show version Displays information about software and hardware.
switch # show flash: Displays information about flash memory (for the 2900/2950 series only ).
switch # show mac-address-table Displays the current MAC address table.
switch # show controllers ethernet-controller Displays information about  the Ethernet controller .
switch # show running-config Displays the current configuration in RAM .
switch # show startup-config Displays the current configuration in NVRM .
switch # show post Displays whether the switch passed POST.
switch # show vlan Displays the current VLAN configuration .
switch # show interfaces Displays the interface configuration and status of line : up/up , up/down , admin down .
switch # show interfaces vlan1 Displays setting of virtual interface VLAN1 , the default VLAN on the switch .

Setting Host Names

switch # configure terminal Moves to global configuration mode.
switch (config)# hostname ciscawy Creates a locally significant host name of the switch.
ciscawy (config)# switch name changed to “ciscawy” .

Setting Passwords

1-      on enable mode

ciscawy (config)# enable password cisco Sets the enable  password to cisco.
ciscawy (config)# enable secret yahoo Sets the encrypted secret password to yahoo.

2-      on line mode

a-      Console mode

ciscawy (config)# line console 0 Enters line console mode.
ciscawy (config-line)# login Enables password checking .
ciscawy (config-line)# password cisco Sets the password cisco .
ciscawy (config-line)# exit Exits line console mode .

b-      Auxiliary mode

ciscawy (config)# line aux 0 Enters line auxiliary mode.
ciscawy (config-line)# login Enables password checking .
ciscawy (config-line)# password cisco Sets the password cisco .
ciscawy (config-line)# exit Exits line auxiliary mode .

c-       Vty mode

ciscawy (config)# line vty 0 4 Enters line vty mode for all five virtual ports from 0 to 4.
ciscawy (config-line)# login Enables password checking .
ciscawy (config-line)# password cisco Sets the password cisco .
ciscawy (config-line)# exit Exits line vty mode .
ciscawy (config)#

Setting IP Addresses and Default Gateways

ciscawy (config)# interface vlan1 Enters the virtual interface for VLAN1 , the default VLAN on the switch .
ciscawy (config-if)# ip address 192.168.1.2 255.255.255.0 Sets the IP address and netmask to allow remote access to the switch .
ciscawy (config-if)#exit Exits interface mode .
ciscawy (config)# ip default-gateway 192.168.1.1 Allows IP information an exit past the local network .

Setting Interface Descriptions

ciscawy (config)# interface fastethernet 0/1 Enters interface configuration mode .
ciscawy (config-if)# description HR VLAN Adds a description of the interface .

Setting Duplex Operation

ciscawy (config)# interface fastethernet 0/1 Moves to interface configuration mode.
ciscawy (config-if)# duplex full Forces full-duplex operation .
ciscawy (config-if)# duplex auto Enables auto-duplex config .
ciscawy (config-if)# duplex half Forces half-duplex operation .

Setting Operation Speed

ciscawy(config)# interface fastethernet 0/1 Moves to interface configuration mode.
ciscawy (config-if)# speed 10 Forces 10-Mbps operation .
ciscawy (config-if)# speed 100 Forces 100-Mbps operation .
ciscawy (config-if)# speed auto Enables autospeed configuration .

Managing the MAC Address Table

ciscawy # show mac address-table Displays current MAC address table .
ciscawy # clear mac address-table Deletes all entries from MAC address table .
ciscawy # clear mac address-table dynamic Deletes only dynamic entries from table .

Configuring Static MAC Addresses

ciscawy (config ) # mac address-table static HHHH.HHHH.HHHH vlan1 interface fastethernet 0/1 Sets a permanent address to port fastethernet 0/1 in VLAN1 .
ciscawy (config ) #no  mac address-table static HHHH.HHHH.HHHH vlan1 interface fastethernet 0/1 Removes the permanent address to port fastethernet 0/1 in VLAN1 .

7 Responses to “Configuring a Switch (part1)”

  1. Yap Chin Hoong Says:

    Hi there, visit my blog http://itcertguides.blogspot.com/ to download my free CCNA workbook + companion CD. ^_^

  2. Yap Chin Hoong Says:

    Hi Ahmed, thanks and please help to share with your friends and classmates too. ^_^

  3. ciscawy Says:

    Good Luck Chin🙂

  4. omar Says:

    thanks for tremendous efforts
    praise be to allaah, hero

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: