CCNA Study Guide

This Blog highlights CCNA study materials for those pursuing the CCNA EXAM 640-801.It is a must read for those going for the exam and need last minute total recall.

Click Here for CCNA exams qns!

Tuesday, April 04, 2006

Configuring a Catalyst 1900 Switch

This page covers configuring a Cisco Catalyst 1900 Switch from the command line interface. This is the method that is tested on the CCNA 2.0 test, but you should know that you can also configure the switch from a Menu (runs on the command line) or you can use the Web interface (set the IP address on the Switch and enter the IP address in a web browser on a client to access the Switch's configuration web pages).

Setting Hostname, IP Address, and DFGW

You set these items the same way as for a router. The exception is that the IP address is for the entire device as opposed to a router, which has addresses for each interface. You should also know that you can telnet to a switch but you can't telnet from it.

   > enable
# conf t
Enter configuration commands, one per line. End with CNTL/Z.
(config)# hostname Switch1
Swicth1(config)# ip address 192.168.1.75 255.255.255.224
Switch1(config)# ip default-gateway 192.168.1.65
Switch1(config)# ip domain-name foo.org

Viewing the IP Information

Use the show ip user Exec command to display global Internet Protocol (IP) configuration information.
   Switch1# show ip

IP Address:192.168.1.75
Subnet Mask:255.255.255.224
Default Gateway:192.168.1.65
Management VLAN: 1
Domain name: foo.org
Name server 1:192.168.1.70
Name server 2:0.0.0.0
HTTP server :Enabled
HTTP port : 80
RIP :Enabled

Setting Passwords

Use the enable password <1-15> <password> global configuration command to set unencrypted user Exec or privileged Exec passwords. Level 1-14 is for user Exec privileges while Level 15 is for privileged Exec privileges. The Password is a noncase-sensitive string of between 4 and 8 characters, spaces, and punctuation (except double quotes). Password strings with blank spaces must be enclosed in double quotes.

   Switch1(config)# enable password level 1 "CcNa 2.0"
Switch1(config)# enable password level 15 CiScO123
Enable Secret Password

Use the enable secret global configuration command to set encrypted user Exec or privileged Exec passwords. The enable secret password is used in place of the enable password if it is set since the enable secret password is encrypted and therefore more secure.

   Switch1(config)# enable secret PaSs&oRd

Interfaces

Use the interface type slot/port global configuration command to choose an interface type and to enter interface configuration mode.

   Switch1(config)# interface ethernet 0/5
Switch1(config-if)#
Setting the Interface Description

While in interface configuration mode you can use the description string command to set a description for an interface. The description can be from 1 to 80 alphanumeric characters. Use double quotes to enclose strings with spaces.

   Switch1(config-if)# description "Marketing VLAN"
Set the Port's Duplex

Use the duplex {auto | full | full-flow-control | half} interface configuration command to enable duplex mode for an interface.

Syntax Description:
auto Auto-negotiation of duplex mode.
full Full-duplex mode.
full-flow-control Force full-duplex mode with flow control.
half Half-duplex mode.

Example:
   Switch1(config-if)# duplex full

Show Version

This example shows how to display the switch hardware and firmware versions accessible from privileged Exec mode for the Catalyst 1900 switch.

   Switch1# show version

Cisco Catalyst 1900/2820 Enterprise Edition Software
Version V9.00.00(12)
Copyright (c) Cisco Systems, Inc. 1993-1999
Switch1 uptime is 2day(s) 22hour(s) 50minute(s) 21second(s)
cisco Catalyst 1900 (486sxl) processor with 2048K/1024K bytes of memory
Hardware board revision is 1
Upgrade Status: No upgrade currently in progress.
Config File Status: No configuration upload/download is in progress
27 Fixed Ethernet/IEEE 802.3 interface(s)
Base Ethernet Address: 00-E0-1E-7E-BE-80
Switch1#

MAC Address Tables

Since layer 2 switches use MAC addresses to filter network traffic, it stands to reason that you can control MAC related functions. A Catalyst 1900 switch can store up to 1024 MAC addresses in its filter table. When the filter table is full, the switch will flood the network with all new incoming frames until one of the existing addresses in the table expires and is removed. To view the table of MAC addresses, use the following command:

   Switch1#show mac-address-table

Number of permanent addresses :0
Number of restricted static addresses :0
Number of dynamic addresses :9

Address Dest Interface Type Source Interface List
----------------------------------------------------------------------------------
00D0.5868.F583 FastEthernet 2 Dynamic All
00E0.1E74.6ADA FastEthernet 1 Dynamic All
00E0.1E74.6AC0 FastEthernet 1 Dynamic All
0060.47D5.2770 FastEthernet 2 Dynamic All
00D0.5868.F580 FastEthernet 2 Dynamic All
00D0.5868.C8C0 FastEthernet 2 Dynamic All
00D0.5868.EF00 FastEthernet 2 Dynamic All
00E0.1E74.6080 FastEthernet 2 Dynamic All
00D0.C0F5.5B80 FastEthernet 2 Dynamic All
Clearing the MAC Address Table

If clear mac-address-table is invoked with no options, all dynamic addresses are removed. If you specify an address but do not specify an interface, the address is deleted from all interfaces. If you specify an interface but do not specify an address, all addresses on the specified interface are removed.

   Switch1#clear mac-address-table
Setting Static MAC Addresses

Use the mac-address-table restricted static global configuration command to associate a restricted static address with a particular switched port interface (specified as type module/port). Use the no mac-address-table restricted static command to delete a restricted static address.

The following example shows how to configure a packet with MAC address of 0040.C80A.2F07 to come in on either Ethernet interface 1 or Ethernet interface 2 and be forwarded to the Fast Ethernet interface 27.

   Switch1(config)#mac-address-table restricted static 0040.C80A.2F07 f0/27 e0/1 e0/2
Setting Permanent MAC Addresses

Use the mac-address-table permanent global configuration command to associate a permanent unicast or multicast MAC address with a particular switched port interface (specified by type and module/port). Use the no mac-address-table permanent command to delete a permanent MAC address. This example shows how to specify that packets with the multicast destination address 0140.C80A.2F07 should be forwarded on the Fast Ethernet interface 27.

   Switch1(config)# mac-address-table permanent 0140.C80A.2F07 fastethernet 0/27
Using Port Security

Use the port secure interface configuration command to enable addressing security. Use the no port secure command to disable addressing security or to set the maximum number of addresses allowed on the interface to the default value. The default is 132, but can be from 1 to 132. The following example shows how to set the maximum MAC address count to 100 on the ethernet slot 0 port four interface.

   Switch# conf t
Switch1(config)# interface ethernet 0/4
Switch1(config-if)# port secure max-mac-count 100

Upgrading/ Restoring the IOS for a Catalyst 1900

You can upgrade or restore the IOS, but you can't back it up on Catalyst 1900 switches. To copy an IOS from a TFTP host use the following command.

Syntax:
   copy tftp://tftp_host's_address/IOS_filename opcode
Example:
   Switch1#copy tftp://192.168.1.70/cat1900EN_9_.bin opcode

Backing Up and Restoring the Catalyst 1900's Configuration

The configuration file is called nvram on a 1900 switch. To copy the file to a TFTP host, use the following command:

Syntax:
   copy nvram tftp://tftp_host's_address/config_name
Example:
   Switch1#copy nvram tftp://192.168.1.70/1900en
To restore the file from a TFTP host to the switch, use the following command:

Syntax:
   copy tftp://tftp_host's_address/config_name nvram
Example:
   Switch1#copy tftp://192.168.1.70/1900en nvram

Deleting the Startup-Configuration

To delete the startup-config (nvram), use the following command:

   Switch1#delete nvram

Change the LAN Switch Type

You can view the switch type with the privileged EXEC command show port system. To change the switch's switch type, use the following command:

   Switch1(config)#switching-type ?
fragment-free Fragment Free mode
store-and-forward Store-and-Forward mode

Switch1(config)#switching-type store-and-forward