本实验是对Cisco Catalyst 1900系列交换机的启动和基本设置的操作。
1.实验目的
通过本实验,读者可以掌握以下技能
熟悉交换机的开机界面;
对交换机进行基本的设置;
理解交换机的端口及其编号。
2.设备需求
本实验需要以下设备:
Cisco Catalyst 1900系列交换机1台,型号不限,企业版软件,本实验中使用了1912交换机;
PC机1台,操作系统为Windows系列。装有超级终端程序;
Console电缆1条及相应的接口转换器。
3.线缆连接及配置说明
如图3.1所示,PC机通过串口与交换机的Console端口相连。
 


和路由器一样,Cisco交换机的Console端口的缺省设置如下
端口速率:9600bit/s
数据位:8
奇偶校验:无
停止位:1
流控:无
把PC机超级终端程序中串行端口的属性设置成与上述参数一致后,便可以开始实验。
4.实验配置及监测结果
在PC机启动正常,PC机与交换机使用Console电缆连接起来,并且已经进入超级终端程序的情况下。接通交
换机电源。
由于交换机没有电源开关,接通电源即直接插上电源插头。
监测清单3.1记录了Catalyst 1912交换机启动的全过程。
监测清单3-1 Catalyst 1912交换机启动及基本配置
第1段:交换机的启动
Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1999
All rights reserved.
Emter[rose Edotopm Software
Ethernet Address: 00-04-DD-4E-9C-80
PCA Number: 73-3122-04
PCA Serial Number: FAB0503D0B4
Model Number: WS-C1912-EN
System Serial Number: FAB0503W0FA
Power Supply S/N PHI044207FR
PCB Serial Number: FAB0503D0B4,73-3122-04
1 user(s)now active on Management Console.
User Interface Menu
[M] Menus
[K] Command Line
[1] IP Configuration
[P] Console Password
Enter Selection:
第2段:进行交换机基本配置
Enter Selection: K
CLI session with the switch is open.
To end the CLI session, enter [Exit].
>?
Exec commands:
enable Turn on privileged commands
exit Exit from the EXEC
help Description of the interactive help system
ping Send echo messages
session Tunnel to module
show Show running system information
terminal Set terminal line parameters
>enable
#
#conft
Enter configuration commands, one per line. End with CNTL/Z
(config)#?
Configure commands:
address-violation Set address violation action
back-pressure Enable back pressure
banner Define a login banner
bridge-group Configure port grouping using bridge groups
cdp Global CDP configuration subcommands
cgroup Enable CGMP
cluster Cluster configuration commands
ecc Enable enhanced congestion control
enable Modift enable password parameters
end Exit from configure mode
exit Exit from configure mode
help Description of the interactive help system
hostname Set the system's network name
interface Select an interface to configure
ip Global IP configureation subcommands
line Configure a terminal line
login Configure options for logging in
mac-address-table Configure the mac address table
monitor-port Set port monitoring
--More--
mlilticast-store-and-forward Enables multicast store and forward
network-port Set the network port
no Negate a cominand or set its defaults
port-channel Configure Fast EtherChannel
rip Routing information protocol configuration
service Configuration Command
sump-server Modify SNMP parameters
spantree Spanning subsystem
spantree-template Set bridge template parameter
storm-control Configure broadcast storm contfolpirameters
switching-mode Set the switching mode
tacacs-server Modify TACACS query parameters
tftp Configure TFTP
uplink-fast Enable Uplink fast
vlan VLAN configuration
vlan-membership VLAN membership server configuration
vtp Global VTP configuration commands
(config)#SiostBiame SW1912
SW1912(config)#enabSe password ?
level Set exec level password
SW1912(config)#enable password level 1 pass1
SW1912(config)#enabSe password level 15 passl5
SW1912(config)#enable secret Cisco
SW1912#disable
SW1912>
SW1912>en
Enter password: ***** ( 键入cisco )
SW1912#conf t
Enter configuration commands, one per line. End with CNTL/Z
SW1912(config)#ip address 192.168.1.1255.255.255.0
SW1912(config)#ip default-gateway 192.168.1.254
SW1912(config)#ip domain-name ?
WORD Domain name
SW1912(config)#ip domain-name cisco.com
SW1912(config)#ip name-server 200.1.1.1
SW1912(config)#end
SW1912#sh version
Cisco Catalyst 1900/2820 Enterprise Edition Software
Version V9.00,05 written from 192.168.000.005
Copyright (c) Cisco Systems, Inc. 1993-1999
SW1912 uptime is 0day(s)00hour(s)12minute(s)44secibd(s)
cisco Catalyst 1900(486sxl)processor with 2048K/1024K bytes of memory
Hardware board revision is 5
Upgrade Status: No upgrade currently in progress.
Config File Status: No configuration upload/download is in progress
15 Fixed Ethernet/IEEE802.3interface(s)
Base Ethernet Address: 00-04-DD-4E-9C-80
SW1912#show ip
IP Address:192.168.1.1
Subnet Mask:255.255.255.0
Default Gateway:192.168.1.254
Management VLANl: 1
Domain name:cisco.com
Name server1:200.1.1.1
HTTP server:Enabled
HTTP port: 80
RIP:Enabled
SW1912#show running-config
Building configuration...
Current configuration:
!
tftp accept
tftp server "192.168.0.5"
tftp filename "catl900EN.9.00.05.bin"
!
hostname "SW1912"
!
ip address 192.168.1.1255.255.255.0
ip default-gateway 192.168.1.254
ip domain-name "cisco.com"
ip name-server 200.1.1.1
!
enable secret 5 $l$FMFQ$mlNHW7EzaJpG9uhKPWBvf/
enable password level 1 "PASS 1"
enable password level 15 "PASS 15"
!
interface Ethernet 0/1
!
interface Ethernet 0/2
!
interface Ethernet 0/3
!
interface Ethernet 0/4
!
interface Ethernet 0/5
!
interface Ethernet 0/6
!
interface Ethernet 0/7
!
interface Ethernet 0/8
!
interface Ethernet 0/9
interface Ethernet 0/10
!
interface Ethernet 0/11
!
interface Ethernet 0/12
!
interface Ethernet 0/25
!
interface FastEthernet 0/26
!
interface FastEthernet 0/27
!
line console
end
SW1912#show int e0/l
Ethernet 0/1 is Suspended-no-linkbeat
802.1 dSTP State: Forwarding Forward Transitions:1
Port monitoring: Disabled
Unknown unicast flooding: Enabled
Unregistered multicast flooding: Enabled
Description:
Duplex setting: Half duplex
Back pressure: Disabled
Receive Statistics Transmit Statistics
Total good frames 0 Total frames 0
Total octets 0 Total octets 0
Broadcast/multicast frames 0 Broadcast/multicast frames 0
Broadcast/multicast octets 0 Broadcast/multicast octets 0
Good frames forwarded 0 Deferrals 0
Frames filtered 0 Single collisions 0
Runt frames 0 Multiple collisions 0
No buffer discards 0 Excessive collisions 0
Queue full discards 0
Errors: Errors:
第3段:重新启动交换机查看配置保持情况
SW1912#reload
This command resets the switch. All configured system parameters and
static addresses will be retained. All dynamic addresses well be removed.
Reset system, [Y]es or [N]o? Yes
Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1999
All rights reserved.
Enterprise Edition Software
Ethernet Address: 00-04-DD-4E-9C-80
PCA Number: 73-3122-04
PCA Serial Number: FAB0503D0B4
Model Number: WS-C 1912-A
System Serial Number: FAB0503W0FA
Power Supply S/N: PH1044207FR
PCB Serial Number: FAB0503DOB4,73-3122-04
----------------------
1 user(s) now active on Management Console.
User Interface Menu
[M]Menus
[K]Command Line
Enter Selection: K
Enter password: *****
CLI session with the switch is open.
To end the CLI session, enter [Exit].
SW1912>enable
Enter password: ***** (键入cisco )
SW1912#show running-config
…(与第2段中配置清单相同,此处省略)
(1)第1段是1912交换机加电后出现的显示内容,依次列出了版权信息、软件版本信息(企业版)、以太网地址(00.04,DD-4E-9C.80)以及各种序列号。
在以上信息之后,列出的"1 user(s)now active on Management Console"信息表明当前正有1个用户使用管理控制台,此用户即超级终端程序。
最后列出了用户接口菜单,有4项可供选择,分别是菜单式(M)、命令行(K)、IP配置
(1)和控制台口令(P)。4项中,CCNA考试主要考察命令行方式。
(2)第2段中选择命令行方式,进入用户命令模式。键入问号,可以看到此模式下的可用命令"它们都是非常简单的命令。
(3)键入enable命令,进入特权执行模式。
(4)键入conft命令,进入配置模式。问号显示了在全局配置模式下可以发出的全部指令,可以看到命令非常多,我们关心的是那些常用的并且可能会出现在CCNA考试中的命令。
(5)hostname SW1912命令给交换机命名为SW1912,命令立即生效,可以看到提示符已经变为"SW1912(config)#"。
(6)enable password(使能口令)是分等级的,从1到15共15个等级,其中等级1是最低等级;等级15是最高等级。即特权命令等级。
实验中分别设置了level 1和level 15的使能口令pass1和pass15。
(7)在1912交换机的配置中,还可以设置enable secret(使能密码)。使能密码与使能口令的不同之处在于,使能口令在配置清单中是明码显示的,而使能密码在配置清单中是密码显示的。
当交换机上设置了使能密码后,level 15的使能口令便不再生效,在进入特权命令模式时。应输入使能密码。
(8)ip address命令设置当前交换机的IP地址为192.168.1.1,这是用于交换机管理的IP地址。
(9)ip default-gateway命令设置当前交换机的缺省网关。应注意的是,这个网关是为交换机本身设置的,与它所连接的其他网络设备无关。换言之,此交换机所连接的所有PC机。服务器等设备都应在其操作系统中设置网关,交换机上的网关设置只对其自身有效。
(1O)ipdomain-name命令设置了交换机所在域的域名,实验中设置的域名为cisco.com。
(11)ipname-server命令用来设置交换机所使用的域名服务器地址,此地址也是为交换机本身所使用的,所有与交换机相连的主机还应该设置自身的域名服务器地址。
(12)show version命令列出了交换机的版本、存储器和端口等信息。本例中,主要信息包括:
软件版本:Cisco Catalyst 100/2820企业版;
版本号:V9.00.05;
开机时间:0天0小时12分44秒;
处理器:Catalyst 1900(486sxl);
内存:2048KB/1024KB,共3MB内存 ;
端口信息:15个固定配置以太网端口;
基本以太网地址:00.04.DD.4E.9C.80。
(13)show ip命令列出了交换机有关IP协议的配置信息,可以看到前面相关命令的设置是否已生效。
(14)show running.con的命令列出了交换机的配置清单,它是检查配置时最常用的命令。
除了刚刚设置的项目被显示出来外,清单还显示了端口信息,其中interface Ethernet是1OM以太网端口,interface FastEthernet是1OOM快速以太网端口。
编号O/n中的0是模块号,1912交换机只有1个模块,其编号是0。
编号O/n中的m的取值是1-22、25、26和27。1-12是10M以太网端口编号;25是AUI
端口(在机箱后面板上方26和27是100M快速以太网端口的编号,即前面板上标号为A和B的2个端口。
从配置清单可以看出,对于所有接口没有进行任何配置。它们所使用的是缺省配置。
show interface命令可以列出接口(端口)的具体配置和统计信息。清单中列出了EO/l端口的有关信息,在接收和发送数据帧的统计中均为0,这是因为此端口没有连接任何设备。
(15)第3段开始时使用reload命令重新启动交换机,提示行表明配置参数和静态MAC地址将被保留。而动态MAC地址将被清除。
(16)重新启动后;交换机启动界面有所变化。在用户接口菜单项中只有菜单和命令行两种方式可供选择,这是因为IP参数和口令等已被设置。
(17)进入特权模式后,使用show running-config命令列出的配置清单与重新启动交换机之前完全一样,说明配置己经被完整地保存进NVRAM了。