Configuring the Catalyst 5000 Series Switch
来源:互联网 发布:软件开发 部门分类 编辑:程序博客网 时间:2024/05/21 10:26
-- 作者:admin
-- 发布时间:2006-4-28 上午 03:35:23
--
要清除IP permit list中的某条条目或者所有条目,使用如下命令:
Cat5000> (enable) clear ip permit [ip_address or all] [subnet-mask(if necessary)]
例子:
Cat5000> (enable) clear ip permit all
IP permit list cleared.
WARNING!! IP permit list is still enabled.
Cat5000> (enable)
DNS and an IP Host Table
配置交换机使用DNS服务器,使用set ip dns命令,首先要启用DNS,如下:
Cat5000> (enable) set ip dns enable
DNS is enabled.
Cat5000> (enable)
默认是disable的,接下来设置DNS服务器的IP地址,如下:
Cat5000> (enable) set ip dns server 172.16.1.6
198.92.30.32 added to DNS server table as primary server.
Cat5000> (enable) set ip dns server 172.16.1.7
171.69.2.132 added to DNS server table as primary server.
Cat5000> (enable) set ip dns server 172.16.1.8 primary
171.69.2.143 added to DNS server table as primary server.
DNS服务器表里的条目最多可以有3条,参数primary指定该地址为主要的DNS服务器地址
可以使用show ip dns查看当前DNS设置,如下:
Cat5000> show ip dns
DNS is currently enabled.
The default DNS domain name is: ar-inc.com
DNS name server status
––––––– –––
172.16.1.6
172.16.1.7 primary
172.16.1.8
Cat5000>
还可以设置主机表,使用set ip alias命令,如下:
Cat5000> (enable) set ip alias [name] [ip_address]
该命令添加一条条目到主机表中
验证主机表使用show ip alias [name]命令.例子如下:
Cat5000> (enable) set ip alias Cat-1 172.16.1.1.
IP alias added.
Cat5000> (enable) set ip alias Cat-2 172.16.1.2
IP alias added.
Cat5000> (enable) set ip alias Cat-3 172.16.1.3
IP alias added.
Cat5000> (enable) set ip alias Cat-4 172.16.1.4
IP alias added.
Cat5000> (enable) show ip alias
default 0.0.0.0
cat-1 172.16.1.1
cat-2 172.16.1.2
cat-3 172.16.1.3
cat-4 172.16.1.4
Cat5000> (enable)
上面输出里的default 0.0.0.0通常代表默认路由
the Interface sl0
为了能够远程拨号访问交换机,sl0接口允许在sonsole口上建立SLIP(Serial Line Internet Protocol)连接.使用set interface sl0来配置sl0口运行SLIP,如下:
Cat5000> (enable) set interface sl0 [slip_address] [destination_address]
如果要使得console口接受SLIP呼叫的话,还要使用slip attach命令.例子如下:
Cat5000> (enable) set interface sl0 172.16.1.1 172.16.1.2
Interface sl0 slip and destination address set.
Cat5000> (enable) slip attach
Console Port now running SLIP.
可以使用show interface命令,查看sl0和sc0口的汇总信息,如下:
sl0: flags = 51
slip 172.16.1.1 dest 172.16.1.2
sc0: flags = 63
vlan 1 inet 172.16.100.1 netmask 255.255.255.0 broadcast
172.16.100.255
Cat5000> (enable)
the Reset Command
如果要重启交换机,使用reset system命令,当然也可以简写为reset.当然也可以单独的重启某个模.比如重启slot3上的line card,如下:
Cat5000> (enable) reset 3
This command will reset module 3 and may disconnect your telnet session.
Do you want to continue (y/n) [n]? y
Resetting module 3 . . .
Cat5000> (enable) 04/06/1999,18:53:35:SYS-5:Module 3 reset from telnet/172.16.1.5/
Cat5000> (enable) 04/06/1999,18:53:57:SYS-5:Module 3 is online
the Configuration File
Catalyst 5000不像路由器,配置文件不存在running-config和startup-config之分,当RAM中的配置文件变动以后,自动同步到NVRAM中去.配置文件是以文本文件的形式保存的,可以使用show config命令查看配置文件
Backing Up and Restoring a Configuration File
对于supervisor engine I和II,把配置文件备份到TFTP服务器上,使用write network命令,如下:
Cat5000> (enable) write network
IP address or name of remote host? 172.16.1.10
Name of configuration file?tch.txt
Upload configuration to config-file-name on address (y/n) [n]? y
. . . . .
. . . . . . . . . .
. . . . . . . . . .
. .
/
Finished network upload. (124356 bytes)
Cat5000> (enable)
对于supervisor engine III或者Catalyst 4000,使用copy config tftp命令,如下:
Cat5000> (enable) copy config tftp
IP address or name of remote host? 172.16.1.10
Name of configuration file?tch.txt
Upload configuration to config-file-name on address (y/n) [n]? y
. . . . .
. . . . . . . . . .
. . . . . . . . . .
. .
/
Finished network upload. (124356 bytes)
Cat5000> (enable)
要从TFTP服务器上恢复备份配置文件的话,对于supervisor engine I和II,使用configure network命令,如下:
Cat5000> (enable) configure network
IP address or name of remote host []? 172.16.1.10
Name of file to copy from []?tch.txt
Configure using tftptch.txt (y/n) [n]? y
/
Finished network download. (124356 bytes)
对于supervisor engine III或Catalyst 4000,使用copy tftp config命令,如下:
Cat5000> (enable) copy tftp config
IP address or name of remote host []? 172.16.1.10
Name of file to copy from []?tch.txt
Configure using tftptch.txt (y/n) [n]? y
/
Finished network download. (124356 bytes)
要注意的是这些是supervisor engine的配置文件而不是RSM或ATM LANE card的配置文件.这些模块运行的是IOS并且有着自己的配置文件
Managing the Catalyst IOS Files
对CatOS的版本进行升级,推荐根据以下几个步骤进行升级:
1.先决定你要进行升级的版本号
2.建立一个TFTP服务器,把新的CatOS放在特定目录
3.备份当前旧的CatOS.可以使用show version命令查看版本号.如下:
Cat5000> (enable) sh ver
WS-C5000 Software, Version McpSW: 4.3(1a) NmpSW: 4.3(1a)
Copyright (c) 1995-1998 by Cisco Systems
NMP S/W compiled on Nov 23 1998, 15:22:34
MCP S/W compiled on Nov 23 1998, 15:19:30
System Bootstrap Version: 3.1.2
Hardware Version: 2.0 Model: WS-C5000 Serial #: 010847706
(略)
备份到TFTP服务器上,对于supervisor engine I和II,使用upload命令,对于supervisor engine III,使用copy flash tftp命令.如下:
Cat5000> (enable) upload 172.16.10.1 sup-412a.img
Upload Module 1 image to sup-412.img on 172.16.10.1 (y/n) [n]?
y -
Finished network upload. (2718432 bytes)
Cat5000> (enable)
4.从TFTP服务器上下载新的CatOS镜象文件,对于supervisor engine I和II,使用download命令,对于supervisor engine III,使用copy tftp flash命令.如下:
Cat5000> (enable) copy tftp flash
Upload Module 1 image to sup-412.img on 172.16.10.1 (y/n) [n]?
y -
Finished network upload. (2718432 bytes)
Cat5000> (enable)
5.至此新的CatOS已经下载到Flash中去了,使用reset命令重启交换机,升级过程完毕
要注意的是supervisor engine I和II只有1个区域用来存放闪存,但是对于supervisor engine III,有3个区域,如下图:
复制文件的语法如下:
Cat5000> (enable) copy [source-memory-area]:[file-name] [destination-memory-area]
复制的过程中还可以定义新的文件名,如下:
Cat5000> (enable) copy [source-memory-area]:[file-name] [destination-memory-area]:[new-name]
例子如下图:
Cat5000> (enable) copy bootflash:sup-412a.img slot0:
Supervisor engine III还有个特性是闪存区域还可以存放配置文件,如下:
Cat5000> (enable) copy config flash
Flash device [bootflash]? bootflash:
Name of file to copy to [test_image]?tch.txt
Upload configuration to bootflashtch.txt
678324 bytes available on device slot1, proceed (y/n) [n]? y
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . .
.
/
Configuration has been copied successfully. (175664 bytes).
Cat5000> (enable)
the Boot System Command
可以使用set boot system命令来定义启动时加载的文件,如下:
Cat5000> (enable) set boot system flash [memory area]:[filename]
比如,要让交换机下次启动的时候,从slot0的PCMCIA卡加载sup3-441.img到操作系统中去,如下:
Cat5000> (enable) set boot system flash slot0:sup3-441.img
Configure the Ethernet, FastEthernet, and Gigabit Ethernet Ports
可以给Ethernet,FastEthernet和Gigabit Ethernet端口分配一个名字,使用set port name命令,如下:
Cat5000> (enable) set port name [module_number/port_number] [name_string]
例子如下:
Cat5000> (enable) set port name 1/1 Connection to Backbone Catalyst 5500
Port 1/1 name set.
端口到背板的访问由port priority或port level决定,3种级别为high,normal和critical.critical是不可设置的,默认级别为normal.设置命令如下:
Cat5000> (enable) set port level [module_number/port_number] [normal | high]
例子如下:
Cat5000> (enable) set port level 1/1 high
Port 1/1 level set to high.
Cat5000> (enable)
有的line card同时支持10Mbps和100Mbps,可以使用set port speed来指定速率,或者让它自动与对方协商,决定自身速率.,命令如下:
Cat5000> (enable) set port speed module_number/port_number [10/100/auto]
例子如下:
Cat5000> (enable) set port speed 1/1 100
Port 1/1 speed set to 100 Mbps.
Cat5000> (enable)
对于只支持10Mbps或100Mbps的Ethernet和FastEthernet的双工模式的设置(Gigabit Ethernet不支持半双工),使用set pot duplex命令,如下:
Cat5000> (enable) set port duplex module_number/port_number [full | half]
例子如下:
Cat5000> (enable) set port duplex 1/1 full
Port 1/1 set to full-duplex.
Cat5000> (enable)
对于同时支持10Mbps或100Mbps的端口,默认双工模式为auto,并且这个是和端口速率的关系是绑定了的,如果端口速率设置为auto,双工模式即为auto;如果端口速率设置为10Mbps或100Mbps,双工模式默认为半双工,但是可设置成全双工
使用show port命令对设置进行验证,如下:
Working with STP
修改桥的优先级,使用set spantree priority命令,默认是32765.优先级值低的选作根桥.如下:
Cat5000> (enable) set spantree priority [bridge_priority] [vlan]
如果没有定义VLAN,默认是VLAN 1
如下,设置VLAN 10的根桥:
Cat5000> (enable) set spantree priority 1 10
端口作为转发端口的几个因素:port cost和port priority.设置特定某个VLAN的port cost,命令如下:
Cat5000> (enable) set spantree portvlancost [module_number/port_number] cost [cost] [VLAN]
设置所有VLAN,如下:
Cat5000> (enable) set spantree portcost [module_number/port_number] [cost]
例子,设置所有的VLAN的port cost为10,如下:
Cat5000> (enable) set spantree portcost 1/1 10
Spantree port 1/2 path cost set to 10.
设置VLAN 1中的port cost为10,如下:
Cat5000> (enable) set spantree portvlancost 1/2 cost 10 1
Port 1/1 VLANs 2-1005 have path cost 19.
Port 1/1 VLANs 1 have path cost 10.
Cat5000> (enable)
默认所有端口的port priority的值为32,范围是1到63,值越低,就越容易被选为转发端口
设置优先级的命令,对于所有的VLAN,命令如下:
Cat5000> (enable) set spantree portpri mod_num/port_num priority [vlans]
对于特定VLAN,如下:
Cat5000> (enable) set spantree portvlanpri mod_num/port_num priority [vlans]
例子,设置对于所有VLAN,端口2/1的优先级为1:
Cat5000> (enable) set spantree portpri 2/1 1
Bridge port 2/1 port priority set to 1.
Cat5000> (enable)
设置对于VLAN 1,端口2/1的优先级为1,如下:
Cat5000> (enable) set spantree portvlanpri 2/1 1 10
Port 2/1 vlans 1-9,11-1005 using portpri 32.
Port 2/1 vlans 10 using portpri 1
Cat5000> (enable)
在端口处于学习和监听的时候启用转发,如下:
Cat5000> (enable) set spantree portfast [module_number/port_number] [enable | disable]
例子,比如端口2/1和服务器直接相连,这就没必要在端口学习和监听的时候对端口进行block,如下:
Cat5000> (enable) set spantree portfast 2/1 enable
Warning: Spantree port fast start should only be enabled on ports connected to a single host. Connecting hubs, concentrators,tches, bridges, etc. to a fast start port can cause temporary spanning tree loops. Use with caution.
Spantree port 2/1 fast start enabled.
这些参数可以通过show spantree命令来查看,如下:
Cat5000> (enable) show spantree [module/number] [vlan_number]
例子:
Cat5000> (enable) show spantree 2/1
Port Vlan Port-State Cost Priority Fast-Start Group-method
–– –––– –––– ––– –––– ––––– ––––––
2/1 1 forwarding 10 32 enabled
2/1 10 forwarding 19 1 enabled
2/1 20 forwarding 19 1 enabled
2/1 30 forwarding 19 1 enabled
2/1 40 forwarding 19 1 enabled
2/1 1003 not-connected 19 1 enabled
2/1 1005 not-connected 19 1 enabled
Cat5000> (enable)
查看VLAN 1的所有端口的Spanning Tree信息统计,如下:
Cat5000> show spantree 1
VLAN 1
Spanning tree enabled
Designated Root 00-40-0b-73-64-c2
Designated Root Priority 1
Designated Root Cost 0
Designated Root Port 1/0
Root Max Age 6 sec Hello Time 2 sec Forward Delay 4 sec
Bridge ID MAC ADDR 00-40-0b-73-64-c2
Bridge ID Priority 1
(略)
- Configuring the Catalyst 5000 Series Switch
- [ZT]Configuring the Catalyst 5000 Series Switch
- Understanding and Configuring Switching Database Manager on Catalyst 3750 Series Switches
- Linkin Park - The Catalyst
- Cisco Switch Catalyst serial community string 配置
- Configuring IP Uplink Redirect on Catalyst 2948G-L3 Switches
- Catalyst 2960 and 2960-S Software -Configuring VTP
- Configuring the network Script
- Configuring the Stenciling State
- Configuring the RMAN Environment
- Configuring the Avatar
- Catalyst
- config guide:Catalyst 3560 & 3750 Switch Cisco IOS Commands
- The Video4Linux2 API series
- The Swift Beginner Series
- Installing the ATI Catalyst Drivers for 13.04
- Configuring the Smartphone Connection Manager
- Configuring the Cisco PIX Firewall
- 一篇被台湾网站封杀的帖子
- 谈谈模拟足球游戏中人工智能的应用
- NTFS文件系统特性概述
- 开始运行命令集合
- .NET程序中常用的代码
- Configuring the Catalyst 5000 Series Switch
- 智能足球攻防战— AI-RCJ使用浅例(1)
- Asp.net 1.0 升级至 ASP.NET 2.0十个问题总结
- 有意思!瞧瞧这位毕业生的“数字”简历
- 导师送给我的15条人生建议
- 初始,重点将放在.net和windows应用上,希望和圈子里的朋友交流
- 南京生活初始
- WINDOWS启动程序揭密
- ASP.NET小贴士