[ZT]Configuring the Catalyst 5000 Series Switch

来源:互联网 发布:notepad json插件下载 编辑:程序博客网 时间:2024/05/21 14:01

Catalyst 5000系列的交换机进行配置可以有2种方式,可以通过购买一个叫做CWSI(Cisco Works fortched Internetworks)的产品或者通过CLI进行配置.CLI可以通过交换机的console port用类似HyperTerminal的终端程序进行访问,把线缆的一端连接到PC的com口,另一端连接到交换机的console port即可 net130整理
Introduction to the Catalyst Operating System
Catalyst 5000系列使用的操作系统并不是IOS,而是CatOS(Catalyst Operating System).当交换机电源启动以后,会运行正常的bootstrap程序并且进行POST测试.下面的输出摘自使用supervisor engine II的Catalyst 5000:
ATE0
ATS0 = 1
Catalyst 5000 Power Up Diagnostics
Init NVRAM Log
LED Test
ROM CHKSUM
DUAL PORT RAM r/w
RAM r/w
RAM address test
Byte/Word Enable test
RAM r/w 55aa
RAM r/w aa55
EARL test
BOOTROM Version 2.1, Dated Apr 6 1998 16:49:40
BOOT date: 00/00/00 BOOT time: 06:10:23
SIMM RAM address test
SIMM Ram r/w 55aa
SIMM Ram r/w aa55
Start to Uncompress Image . . .
IP address for Catalyst not configured
BOOTP will commence after the ports are online
Ports are coming online . . .
Cisco Systems Console
Enter password:
Mon Apr 14 1999 13:22:11 Module 1 is online
Mon Apr 14 1999 13:22:11 Module 2 is online
Mon Apr 14 1999 13:22:11 Module 3 is online
Mon Apr 14 1999 13:22:11 Module 4 is online
如果是交换机的第一次启动,或者假如交换机的配置文件被擦除了,交换机将发出BOOTP请求,RARP将解析它的IP地址,如下:
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Sending RARP request with address 00:40:02:24:25:ff
Sending bootp request with address: 00:40:02:24:25:ff
Catalyst 5000系列的CLI有点类似Cisco路由器的CLI.同样,CatOS也有在线帮助,使用问号或者help命令查看当前可用命令和介绍,语法等信息,如下:
console> (enable) ?
Commands:
–––––––––––––––––––––––––––––––––––––––
cd         Setdefault flash device
clear         Clear, use 'clear help' for more info
configure     Configure system from network
copy         Copy files between TFTP/module/flash devices
delete       Delete a file on flash device
dir         Show list of files on flash device
disable       Disable privileged mode
disconnect     Disconnect user session
download     Download code to a processor
enable       Enable privileged mode
format       Format a flash device
help         Show this message
history       Show contents of history substitution buffer
ping         Send echo packets to hosts
pwd         Show default flash device
quit         Exit from the Admin session
reconfirm     Reconfirm VMPS
reload       Force software reload to linecard
reset         Reset system or module
session       Tunnel to ATM or Router module
set           Set, use 'set help' for more info
-More-
-More-表示还有更多的输出,可以按回车键一次显示一行,也可以按其他键1次显示1页,或者按下q键退出查看输出
当你输出一个不正确的命令的时候,将收到提示信息,如下: net130整理
Cat5000> (enable) hlp
Unknown command "hlp". Use 'help' for more info.
Cat5000> (enable)
一些快捷键如下:
Ctrl-A:跳转到命令行的第一个字母
Ctrl-B或左方向键:把光标向左移动1个字母
Ctrl-C:退出
Ctrl-D:删除光标处的文字
Ctrl-E:跳转到命令行末端
Ctrl-F或右方向键:把光标向右移动1个字母
Ctrl-K:删除光标到该行末尾的内容
Ctrl-L;Ctrl-R:另起1行,重复当前命令
Ctrl-N或下方向键:输入历史缓存里的下一条命令
Ctrl-P或上方向键:输入历史缓存里的上一条命令
Ctrl-U;Ctrl-X:删除光标到该行开头的内容
Ctrl-W:删除最后输入的一个单词
Esc-B:把光标向后移动一个单词
Esc-F:把光标向前移动一个单词
设置终端命令为24行,如下:
Cat5000> (enable) set length 24
Screen length for this session set to 24.
Cat5000> (enable)
Catalyst Modes
当交换机初次启动,或者配置文件被擦除以后,交换机会出现登陆密码提示,如下:
Cisco Systems Console
Enter password:
默认口令为回车键,输入后进到用户模式,提示符为console>,输入enable命令进如特权模式,提示符变为console>(enable).在特权模式下,可以通过set等命令对交换机的配置进行修改.set命令相当于IOS里的配置模式
the Banner
当登陆到交换机的时候,会有banner信息提示,最常用的banner信息就是MOTD(message of the day),命令如下:
Cat5000> (enable) set banner motd [beginning delimiter]
motd banner
[end delimiter]
delimiter前后必须一样
Automatic Session Logout
交换机有个令人烦恼的功能,自动注销功能:当你在一定时间内无任何动作,即所谓的空闲(idle),用户将自动注销登陆,默认这个空闲时间为5分钟,修改这一默认时间的命令为set logout [min],例子如下:
Cat5000> (enable) set logout 20
Sessions will be automatically logged out after 20 minutes of idle time.
Cat5000> (enable)
Supervisor Engine's Console Baud Rate
默认的波特率(baud rate)为9600,可以通过如下命令进行修改:
Cat5000> (enable) set system baud [baud rate]
可选baud rate为600,1200,2400,4800,9600,19200和38400
Terminal Message Logging
当有一点令人觉得讨厌的是,当你在console工作的时候,终端信息将时不时的显示出来,打断你的命令输入(即,输入到一半,命令被终端信息给分离打断了).可以使用set logging命令用来配置该信息的格式和位置,默认是发送终端信息到console,如下:
Cat5000> (enable) set logging console enable
System logging messages will be sent to the console.
Cat5000> (enable)
再次输入set logging console enable的时候,终端信息将发送到当前终端会话,如下:
Cat5000> (enable) set logging console enable
System logging messages will be sent to the current login session.
Cat5000> (enable)
把logging文件存放在TFTP服务器上,并且服务器的IP地址为172.16.1.10,如下:
Cat5000> (enable) set logging server enable
System logging messages will be sent to the configured syslog
servers.
Cat5000> (enable) set logging server 172.16.1.10
172.16.1.10 added to System logging server table.
Cat5000> (enable)
参观当前logging设置,如下:
Cat5000> (enable) show logging
Logging console: enabled
Logging server: enabled
{172.16.1.10}
Current Logging Session: enabled
Setting Passwords
设置初始的用户模式的密码,使用set password命令,然后将提示输入旧密码,接着输入2次新密码,如下:
Cat5000> (enable) set password
Enter old password: [old user mode password]
Enter new password: [new user mode password]
Retype new password: [new user mode password]
Password changed.
Cat5000> (enable)
设置特权模式的密码,使用set enablepass命令,如下:
Cat5000> (enable) set enablepass
Enter old password: [old enable password]
Enter new password: [new enable password]
Retype new password: [new enable password]
Password changed.
Cat5000> (enable)
给交换机设置主机名,使用set system name命令,如下:
console> (enable) set system name yUmi520
System name set.
yUmi520> (enable)
the Interface sc0
set interface sc0命令设置sc0接口的VLAN信息,IP地址,子网掩码和广播地址,如下: net130整理
console> (enable) set interface sc0 [VLAN] [ip_address [subnet-mask] [broadcast]]
子网掩码可以选,如果不设置的话就采用默认的掩码,比如:
console> (enable) set interface sc0 172.16.100.5
默认sc0接口的VLAN是VLAN 1,并且默认的IP地址,子网掩码和广播地址都为0.0.0.0.当IP地址设置为0.0.0.0以后,交换机将自动启用BOOTP和RARP来获取IP地址.使用show module命令查看sc0接口的MAC地址,如下:

注意上面输出中的斜线部分那行的MAC地址范围是supervisor engine(slot1)的MAC地址范围,将用于sc0的BOOTP和ARP请求
配置sc0接口的路由使用set ip route命令,如下:
Cat5000> (enable) set ip route [destination-network] [gateway-address]
例子,创建到网络172.16.2.0的路由,并指定172.16.1.1作为网关.如下图:

Console> (enable) set ip route 172.16.2.0 172.16.1.1
Route added.
但是这个命令有个问题是,它只指定了到达网络172.16.2.0的路由,假如该网络包含其他内网或Internet的话,手动一个个的指定是比较麻烦的.于是,多数情况下,为了方便,都会使用如下命令:
Cat5000> (enable) set ip route default [default-gateway-address] [primary]
其中可选参数primary为当存在多个网关的时候,指定其中1个为主网关.如果指定了多个网关,但是没有使用primary参数的话,最后输入的那个网关作为主网关.当主网关出问题以后,交换机会自动查找备用网关.最多可以配置3个默认网关,除了Catalyst 4000和Catalyst 2926G只能配置1个.例子如下图: net130整理

Cat5000> (enable) set ip route default 172.16.1.1 primary
Route added.
Cat5000> (enable) set ip route default 172.16.1.2
Route added.
验证配置的路由信息使用show ip route命令,如下:
Cat5000> (enable) show ip route
Fragmentation   Redirect   Unreachable
––––––   ––––   ––––
enabled       enabled     enabled
The primary gateway: 172.16.1.1
Destination     Gateway     Flags     Use     Interface
––––––   ––––     ––––   –––   ––––
default       172.16.1.1     G       0       sc0
default       172.16.1.2     G       0       sc0
172.16.1.0     172.16.1.5       U       0       sc0
default       default       U H     0       sl0
Cat5000> (enable)
如果你要从sc0的路由表中清除一条路由或网关的话,使用如下命令:
Cat5000> (enable) clear ip route default 172.16.1.2
Route deleted.
Cat5000> (enable) show ip route
Fragmentation   Redirect   Unreachable
––––––   ––––   ––––
enabled       enabled     enabled
The primary gateway: 172.16.1.1
Destination     Gateway     Flags     Use     Interface
––––––   ––––     ––––   –––   ––––
default       172.16.1.1     G       0       sc0
default       172.16.1.2     G       0       sc0
default       default       U H     0       sl0
IP Permit Lists
IP permit list是包含了允许访问sc0口的IP地址,这样增加了安全性,默认这一特性是关闭的,设置IP permit list的步骤如下:
1.启用或关闭IP permit list:
Cat5000> (enable) set ip permit [enable | disable]
2.设置允许访问sc0的IP地址:
Cat5000> (enable) set ip permit [ip_address subnet-mask]
3.验证IP permit list:
Cat5000> (enable) show ip permit
例子,允许节点172.16.3.10和网络172.16.2.0内的所有节点访问sc0,如下图:

Cat5000> (enable) set ip permit enable
IP permit list enabled.
WARNING!! IP permit list has no entries.
Cat5000> (enable) set ip permit 172.16.3.10
172.16.3.10 added to IP permit list.
Cat5000> (enable) set ip permit 172.16.2.0 255.255.255.0
172.16.2.0 with mask 255.255.255.0 added to IP permit list.
Cat5000> (enable)
接下来验证IP permit list,如下:
Cat5000> show ip permit
IP permit list feature enabled.
Permit List       Mask
––––––   –––––
172.16.3.10
172.16.2.0     255.255.255.0
Denied IP Address   Last Accessed Time       Type
––––––   –––––––––     –––––
172.16.3.1       03/20/99,12:45:20       Telnet
Cat5000>
要清除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命令查看配置文件 net130整理
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命令,如下: net130整理
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信息统计,如下: net130整理
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
VTP

实现VLAN的2个步骤:
1.创建VLAN
2.把交换机端口分配给VLAN

2种VLAN的定义:active VLAN和transit VLAN,如下图:

如图,中间的交换机并没有分配端口给VLAN 20,数据帧只经过它的trunk端口进行穿越,所以,在中间的交换机上,VLAN 20是transit VLAN,其他的都是active VLAN

划分VLAN的时候要设置的几个参数,比如VLAN ID,用来鉴别不同的VLAN;还可以给VLAN起个名字,作为描述用途,当然该参数是可选的;把交换机端口分配在同一个VLAN ID里,就构成一个VLAN(不是根据名字划分,是根据VLAN ID).如果你的VLAN要跨越多个VLAN,注意要保持这几个交换机上的VLAN配置保持一致

VTP(VLAN Trunk Protocol)就是用来在交换机之间交换VLAN信息,使得VLAN信息保持一致.如下图:


如图,当VLAN 10和VLAN 20跨越交换机1和交换机2的时候,在设置的时候出现了一个问题,就是VLAN 10和VLAN 20的名字,弄反了.这样对排错很不利甚至会产生更长远的错误影响.VTP是在trunk line上工作的,有了VTP,它将自动修复这个错误,如下图:

 

修复之后如下图,VLAN名字保持一致:


目前有2种版本的VTP:版本1和版本2.默认运行的是版本1.版本1和版本2的主要差异是版本2支持Token Ring
VTP Modes

VTP的3种模式:
1.服务器模式(server mode):该模式下,可以创建,修改和删除VLAN信息,并且向外发送和转发VTP信息,对VLAN配置信息进行同步,保存配置信息到NVRAM中

2.客户模式(client mode):该模式下,不能够创建,修改和删除VLAN信息,不向外发送VTP信息,但是可以转发VTP信息,同步VLAN配置信息,不把配置信息保存在NVRAM中

3.透明模式(transparent mode):只可以本地的创建,修改和删除VLAN信息,不向外发送VTP信息,但是可以转发VTP信息,不对VLAN配置信息进行同步,把配置信息保存在NVRAM中 net130整理

VTP Pruning

VTP pruning技术:用来节约带宽,减少不必要的流量.如下图:


可以看出,Switch 3不属于Red VLAN,VTP信息不会经过Switch 2到达Switch 3上去 net130整理
要注意的是,VTP pruning只能工作在VTP server modeManagement Domains

管理域(或VTP domain)是一组在处于相同管理之下的交换机的集合,在VTP domain里,VTP在trunk line上发送VTP更新(update).处于同一个VTP domain里的交换机才能交换VTP更新.所以在同一个VTP domain里的交换机的VTP域名要设置成一样的
VTP域名是大小写敏感的,使用set domain name命令进行设置,如下:
console> (enable) set vtp domain [name]
例子如下图:

Switch_A> (enable) set vtp domain ACC
VTP domain ACC modified
Switch_A> (enable)
在A上设置VTP域名为ACC,在B上无须设置,因为B是通过trunk line直连到A,会自动加到AAC的管理范围(但是这个方法不推荐,推荐在B上进行手动设置VTP域名)
设置VTP的工作模式,使用set vtp mode命令,默认是server模式.如下:
Switch_A> (enable) set vtp mode [mode]
例子:
Switch_A> (enable) set vtp mode client
VTP domain ACC modified
Switch_A> (enable) set vlan 30
Cannot add/modify VLANs on a VTP client.
Switch_A> (enable)
由于把VLAN 30设置为了client模式,添加新的VLAN将收到错误提示 net130整理

Configuring Secure Management Domains

如果你不想把直连的新的交换机自动加到某个VTP域的管理范围内,就可以设置VTP域的密码(password).把VTP域设置一个密码,上述情况就不会发生,设置密码的时候要注意,所有在同一个VTP域里的交换机上的密码要设置成一样的.设置命令,只需要在set vtp domain [name]后加上passwd [password]就可以了,刚才的例子,如下:
Switch_A> (enable) set vtp domain ACC passwd TobaccoRoad
Generating MD5 secret for the password ....
VTP domain ACC modified
Switch_A> (enable)
Switch_B> (enable) set vtp domain ACC passwd TobaccoRoad
Generating MD5 secret for the password ....
VTP domain ACC modified
Switch_B> (enable)

Configuring VTP Version 2

默认Catalyst上是没有启用版本2的.在启用之前要先看下你的交换机是否全部支持VTP版本2.设置VTP版本2,使用set vtp v2 enable命令,如下:
Switch_A> (enable) set vtp v2 enable
This command will enable the version 2 function in the entire management domain.
All devices in the management domain should be version2-capable before enabling.
Do you want to continue (y/n) [n]? y
VTP domain ACC modified
Switch_A> (enable)

Configuring VTP Pruning

VTP pruning默认是没有启用的,如果在一个VTP域里启用了VTP pruning,整个VTP域里的交换机都自动进行VTP pruning,即无须在第二台交换机上进行设置VTP pruning.命令如下: net130整理
console> (enable) set vtp pruning enable
例子:
Switch_A> (enable) set vtp pruning enable
This command will enable the pruning function in the entire
management domain.
All devices in the management domain should be pruning-capable before enabling.
Do you want to continue (y/n) [n]? y
VTP domain ACC modified
Switch_A> (enable)
要注意的是VTP版本1不支持VTP pruning
Verifying the VTP Settings

要查看VTP信息统计,可以使用show vtp domain或show vtp statistics命令

Configuring VLANs

创建VLAN的命令如下:
Switch_A> (enable) set vlan [vlan_number] name [VLAN_name]
可以使用show vlan验证VLAN的设置.一旦在一个交换机上创建了VLAN以后,这个VLAN信息将通过VTP被宣告给整个VTP域
接下来把端口分配给VLAN,如下:
Switch_A> (enable) set vlan [vlan_num] [module/ports]
如果端口连续,可以使用连字号(hyphen)或逗号如下:
Switch_A> (enable) set vlan 10 3/1-12
VLAN 10 modified.
VLAN 1 modified.
VLAN Mod/Ports
–––– ––––––––––
10 3/1-12
Switch_A> (enable) set vlan 20 3/13-23,24
VLAN 20 modified.
VLAN 1 modified.
VLAN Mod/Ports
––– ––––––––––
20 3/13-24
Switch_A> (enable)

Configuring Dynamic VLANs

可以通过采用VMPS(VLAN membership policy server),根据每个端口所连的计算机,随时改变端口所属的VLAN,最常见的就是基于MAC地址的划分.VMPS实际上也是Catalyst交换机,只不过是从TFTP服务器上下载了一个VLAN到MAC地址映射的文本文件
当交换机收到一个帧以后,交换机检查VMPS(有可能是它自己)的数据库,并比较帧的源MAC地址,如果数据库里有相应条目,收到这个帧的端口就把它转发到指定的VLAN上去;如果数据库中没有相应条目,那么端口有可能:
1.如果VMPS没有处于安全模式(secure mode),就返回access-denied信息
2.如果VMPS处于安全模式,端口将shut down
3.将把帧分配给特定的fallback VLAN
基于MAC地址动态划分VLAN的第一步是要搜集MAC地址,再来做MAC地址到VLAN的映射,然后保存为文本文件(数据库),存放到TFTP服务器上.一般VMPS数据库格式如下:
!VMPS Database for ACC
!
!
vmps domain ACC                     指定VTP域名
vmps mode open                       指定VMPS模式
vmps fallback -NONE-                   定义fallback VLAN
!
!MAC Addresses
!
vmps-mac-addrs
!
!address vlan-name
!
address 0001.1111.1111 vlan-name hardware       定义MAC地址到LAN的映射
address 0001.2222.2222 vlan-name hardware
address 0001.3333.3333 vlan-name Green
VMPS数据库完成以后,接下来就把Catalyst配置为VMPS服务器,命令如下:
Switch_A> (enable) set vmps tftpserver [ip_address] [filename_VMPS_Database]
这个命令告诉交换机从哪下载数据库文件,并且在交换机启动以后加载到RAM中,交换机每次启动的时候,都会重新从TFTP服务器加载一次数据库文件,所以,要时时刻刻保持TFTP服务器可以访问.数据库的文件名可以任意设置,如果不设置,默认名为vmps-config-database.1
第三步要做的是,使用命令激活VMPS,如下: net130整理
Switch_A> (enable) set vmps state enable
设置端口为动态分配,如下:
Switch_A> (enable) set port membership [mod_num/port_num] dynamic
最后,配置其他交换机为VMPS的客户机,如下:
Switch_A> (enable) set vmps server [ip_address_of_VMPS] [primary]
可以使用show vmps mac显示整个VMPS数据库的信息,如下:
Switch_A> (enable) show vmps mac
MAC Address   VLAN Name Last Requestor   Port ID Last Accessed Last Response
––––––
12-23-56-78-9a-bc DUKE     0.0.0.0             0,00:00:00     Success
aa-bb-cc-dd-ee-ff   FSU     0.0.0.0             0,00:00:00     Success
fe-dc-ba-98-76-54   -NONE-   0.0.0.0             0,00:00:00     Success
Configuring Trunking

在配置trunk之前,要看下端口是否具备trunk的能力,使用show port capabilities命令查看,如下:
Switch_A> (enable) show port capabilities 1/1
Model             WS-X5530
Port             1/1
Type             1000BaseSX
Speed             1000
Duplex           full
Trunk encap type       802.1Q,ISL
Trunk mode         on,off,desirable,auto,nonegotiate
Channel           no
Broadcast suppression   percentage(0-100)
Flow control         receive-(off,on,desired),send-(off,on,desired)
Security           no
Membership         static
Fast start           yes
Rewrite             no
5种trunk模式如下:
1.on:启用trunk
2.off:不启用trunk
3.disirable:只要对方能够trunk,它就trunk
4.aut默认的模式,不关心是否能够trunk
5.nonnnegotiate:进行trunk但是不会和对方进行协商   net130整理
设置trunk port的命令如下:
Switch_A> (enable) set trunk [module_number/port_number] [on|off|desirable|auto|nonegotiate] [trunk_encapsulation_method]
例子:
Switch_A> (enable) set trunk 1/1 on isl
Port(s) 1/1 trunk mode set to on.
Port(s) 1/1 trunk type set to isl.
Switch_A> (enable)
2004 Jul 12 20:31:18 %DTP-5-TRUNKPORTON:Port 1/1 has become isl
trunk
Switch_A> (enable)
使用show trunk命令进行验证trunk信息
设置Fast Ethernet的命令如下:
Switch> (enable) set port channel [ports_to_be_channeled] [on|off|desirable|auto]
如下是把快速以太网端口1和2合并为Fast EtherChannel:
Switch_A> (enable) set port channel 1/1-2
Port(s) 1/1-2 channel mode set to on.
使用show port channel命令验证查看channel信息
Configuring Port Protocol Filtering

协议过滤是指端口根据协议,来对流量进行过滤.比如在只基于IP环境工作的工作站,就没必要接收基于IPX协议的广播.这样就减轻了带宽和CPU资源的占用.在协议过滤中,包被分成了4个类别: net130整理
1.IP包
2.IPX包
3.AppleTalk,DECnet,和Banyan Vines包
4.其他类型的包

协议过滤的3种模式:
1.on:允许来自某组的从该端口传输出去
2.off:不允许来自某组的从该端口传输出去
3.aut不允许来自某组的从该端口传输出去,除非该端口先收到该组的流量.比如设置为auto的某端口是不会转发IPX流量,除非IPS流量从该端口进去过
要启用端口的协议过滤,首先使用set protocolfilter命令,如下:
Switch_B> (enable) set protocolfilter enable
Protocol filtering enabled on this switch.
Switch_B> (enable)
要注意的是,端口的协议过滤这一特性不是所有的Catalyst上都具备的,如下:
Switch_A> (enable) set protocolfilter enable
Protocol filtering not supported by this hardware.
Switch_A> (enable)
接下来设置端口协议过滤的模式和对流量的分组,如下:
Switch_B> (enable) set port protocol [mod_num/port_num] [ip|ipx|group] [on|off|auto]
比如,只允许Switch B上的端口2/1-12转发IP流量,如下:
Switch_B> (enable) set port protocol 2/1-12 ip on
IP protocol set to on mode on ports 2/1-12.
Switch_B> (enable) set port protocol 2/1-12 ipx off
IPX protocol disabled on ports 2/1-12.
Switch_B> (enable) set port protocol 2/1-12 group off
Group protocol disabled on ports 2/2-12.
Switch_B> (enable)
验证端口的协议过滤使用show port protocol命令,如下:
Port   Vlan   IP   IP Hosts   IPX   IPX Hosts   Group   Group Hosts
–– ––– – –––– ––   ––––   –––   –––––
2/1     1   on   0     off     0       off       0
2/2     1   on   0     off     0       off       0
Configuring Port Security

另外一种安全机制,叫安全端口过滤(secure port filtering),这样的机制只允许端口转发来自某个特定MAC地址的帧,这个MAC地址可以手动指定或者动态决定.设置命令如下:
Switch_B> (enable) set port security [mod_num/port_num] [enable|disable] [mac_addr]
假如你没有指定MAC地址的话,它将自动锁定收到的第一个帧的MAC地址,如下:
Switch_B> (enable) set port security 2/2 enable
Port 2/2 port security enabled with the learned mac address.
Trunking disabled for Port 2/2 due to Security Mode
Switch_B> (enable)
通过自动锁定所学习到的MAC地址可以通过命令show port security查看,如下:
Switch_B> (enable) show port security 2/2
Port   Security   Secure-Src-Addr   Last-Src-Addr   Shutdown   Trap   IfIndex
––   ––––   ––––––     –––––   –––– –––   ––––
2/2   enabled     22-22-22-22-22-22     No       disabled           10
(略)
Switch_B> (enable)


Working with Sniffers
port mirroring(或叫port spanning)是Catalyst的一种特性,它可以在一个端口上监视流量到达另一端口的过程,这个端口就叫span port.设置监视到达span port的帧的命令如下:   net130整理
Switch_B> (enable) set span [source] [span port] [rx | tx | both]
参数source可以为单独的一个端口或者几个端口,还可以是VLAN ID;参数[rx | tx | both]可选,默认为both
例子,监视从端口2/3到端口2/2的帧,如下:
Switch_B> (enable) set span 2/3 2/2
Enabled monitoring of Port 2/3 transmit/receive traffic by Port 2/2
Switch_B> (enable)
监视从端口2/3-12到端口2/2的帧,如下:
Switch_B> (enable) set span 2/3-12 2/2
Enabled monitoring of Port 2/3-12 transmit/receive traffic by Port 2/2
Switch_B> (enable)
监视从VLAN 10到端口2/2的帧,如下:
Switch_B> (enable) set span 10 2/2
Enabled monitoring of VLAN 10 transmit/receive traffic by Port 2/2
Switch_B> (enable)
检查当前span port的设置,使用show span命令,如下:
Switch_B> (enable) show span
Status           : enabled
Admin Source       : VLAN 10
Oper Source       : Port 2/49
Destination       : Port 2/2
Direction         : transmit/receive
Incoming Packets     : disabled
Switch_B> (enable)
Controlling Broadcasts   net130整理

可以在交换机的端口进行广播的控制.广播的控制可能因模块的不同而不同.有的模块不能限制单独的某个端口的广播,必须限制全部端口;有的就可以限制单独某个端口.限制广播的命令(百分比),如下:
Switch_A> (enable) set port broadcast [mod_num/port_num] [threshhold%]
例子,限制端口2/1-12的广播流量的百分比不得高于50%,如下:
Switch_A> (enable) set port broadcast 3/1-12 50%
Port 3/1-24 broadcast traffic limited to 50%.
还可以通过广播包数量而不是百分比的方式来进行限制,如下:
Switch_A> (enable) set port broadcast 3/1-12 500
Ports 3/13-24 broadcast traffic unlimited.
Ports 3/1-12 broadcast traffic limited to 500 packets/second.
Switch_A> (enable)
验证端口的广播控制使用show port broadcast命令,如下:
Switch_A> (enable) show port broadcast
Port     Broadcast-Limit       Broadcast-Drop
––   –––––––     –––––––
1/1       -               0
1/         -               0
3/1       500p/s             0
3/2       500 p/s             0
3/3       500 p/s             0
3/4       500 p/s             0
Working with CAM

bridge table,也叫content address memort(CAM) table.可以使用set cam命令往CAM table中添加条目,这些条目可以是单播或多播.默认交换机会把多播当广播处理,会从每个端口都转发出去,可以使用set cam命令,来把多播和某些端口进行静态的映射.set cam命令语法如下:
Switch_A> (enable) set cam [dynamic|static|permanent] [MAC_address] [mod/port] [VLAN]
注意,当参数指定了VLAN的时候,注意所有端口必须处于同一个VLAN
存放在CAM table中的条目的生存周期是有限的.默认,通过动态学习到的条目将保存5分钟,如果空闲时间超过5分钟,条目将被删除.如果要让条目暂时的保存在cam table中,使用dynamic参数;如果想一直保存直到交换机重启,使用static参数;如果想永久保存,使用permanent参数
例子,把多播映射到某些端口上,如下:   net130整理
Switch_A> (enable) set cam static 01-00-12-11-11-11 3/3,3/5,3/7,3/12
Static multicast entry added to CAM table.
Switch_A> (enable)
验证cam table,使用show cam命令,如下:
Switch_A> (enable) show cam [dynamic|static|permanent|system]
如果想修改动态学习到的条目的生存时间,使用set cam agingtime命令(单位为秒),如下:
Switch_A> (enable) set cam agingtime 1-1005 600
Vlans 1-1005 CAM aging time set to 600 seconds.
Switch_A> (enable)
Routing VLANs with an External Router (One-Armed Routing)
可以在外部路由器上,创建子接口(subinterface),来路由多个VLAN,每个子接口对应一个VLAN,IOS版本至少要为11.1(2).如下图:

Cisco4500(config-if)#int fa 0.10
Cisco4500(config-subif)#encap isl 10
Cisco4500(config-subif)#ip addr 172.16.10.1 255.255.255.0
Cisco4500(config-subif)#^Z
Cisco4500#conf t
Cisco4500(config)#int fa 0
Cisco4500(config-if)#int fa 0.20
Cisco4500(config-subif)#encap isl 20
Cisco4500(config-subif)#ip addr 172.16.20.1 255.255.255.0
Configuring the RSM
Route Switch Module(RSM)运行自己的操作系统,IOS.配置命令和配置Cisco路由器是一样的,不同的地方是RSM使用叫做VLAN interface的虚拟接口取代物理接口.按刚才的例子配置VLAN间通信,只需按如下配置即可:   net130整理
interface Vlan10
description VLAN 10 FSU
ip address 172.16.10.1 255.255.255.0
!
interface Vlan20
description VLAN 20 Duke
ip address 172.16.20.1 255.255.255.0
!
Multilayer Switching (MLS) Defined
多层交换(multilayer switching)或3层交换(layer 3 switching)有点像路由器的仿制品,它查找路由的方式和路由器查找路由的方式是有所区别的
如下图:

当工作站A要发送帧给工作站B,帧先到达交换机,帧的目标MAC地址为路由器的MAC地址,源MAC地址为工作站A的MAC地址;目标IP地址为工作站B的IP地址,源IP地址问工作站A的IP地址.交换机把帧打上标签,表明该帧来自VLAN 10,转发给路由器

路由器收到帧以后,读取标签,解封装,然后根据目标IP地址做路由决定。由于路由器发现目标IP地址位于和交换机相连的VLAN 20,路由器又重新封装帧,转发给交换机,帧的源MAC地址更改为路由器的MAC地址,目标MAC地址更改为工作站B的MAC地址,并打上标签暗示帧目前属于VLAN 20

交换机收到帧以后,读取标签和目标MAC地址,转发帧给工作站B
整个过程,帧经过trunk line两次,经过路由器一次,经过交换机两次.路由器根据路由表做转发决定,这样有个缺点,就是增加了延时(latency).如果采用MLS或3层交换,可以在不产生多余延时的情况下达到同样效果,这样就不用查找路由表,也无需经过trunk line两次。
配置MLS的时候,要用到路由器,它可以是外部路由器,或者是RSM,并且路由器的IOS版本必须至少是11.3(3)Wa4(4),这样的路由器也可以叫做MLS-RP

3层交换机使用supervisor engine III,并搭载NFFC(NetFlow Feature Card).CatOS版本必须至少是4.1(1).这样的3层交换机也叫MLS-SE
下面以一个图例来说明如何配置MLS,如下图: net130整理

 

步骤1:在Cisco 4500上启用MLS,使用以下命令:
C4500(config)#mls rp ip
C4500(config)#
步骤2:定义实行MLS的接口所属的VTP域,如下:
C4500(config-if)#mls rp vtp-dom ACC
C4500(config-if)#
步骤3:在Cisco 4500上选择1个和交换机相连的接口作为管理接口,MLSP包通过这个接口交换,如下:
C4500(config)#int fa0.10
C4500(config-subif)#mls rp management-interface
C4500(config-subif)#
这里选的是fa0.10作为管理接口,当然还可以使用其他的子接口作为管理接口 net130整理
步骤4:在参与MLS的接口上启用MLS,如下:
C4500(config-subif)#int fa0.10
C4500(config-subif)#mls rp ip
C4500(config-subif)#int fa0.20
C4500(config-subif)#mls rp ip
C4500(config-subif)#
步骤5:验证MLS是否配置正确,如下:
C4500#sh mls rp
multilayer switching is globally enabled
mls id is 0010.7b9b.3eb1
mls ip address 209.118.4.184
mls flow mask is destination-ip
number of domains configured for mls 1

vlan domain name: ACC
current flow mask: destination-ip
current sequence number: 3513170556
current/maximum retry count: 0/10
current domain state: no-change
current/next global purge: false/false
current/next purge count: 0/0
domain uptime: 00:12:15
keepalive timer expires in 0 seconds
retry timer not running
change timer not running
fcp subblock count = 3

1 management interface(s) currently defined:
vlan 10 on FastEthernet0.10

2 mac-vlan(s) configured for multi-layer switching:

mac 0010.7b9b.3eb1
vlan id(s)
10 20

router currently aware of following 0 switch(es):
no switch id's currently exists in domain
一般的,只要交换机能够支持MLS,默认的配置就足够了.但是如果使用的是外部路由器的话,还应该在交换机上做如下配置: net130整理
步骤1:启用MLS,如下:
Switch_A> (enable) set mls enable
Multilayer switching is enabled.
Switch_A> (enable)
步骤2:定义MLS-RP的地址,如下:
Switch_A> (enable) set mls include 172.16.10.1
Multilayer switching enabled for router 172.16.10.1.
Switch_A> (enable)
步骤3:一些可选的设置.定义MLS条目的生存时间,默认为256秒,可选的值的为64秒的倍数,范围是64-1920秒,如果你不知道64的5倍是多少,(320),假如你输入319,它将自动修正为320.如下:
Switch_A> (enable) set mls agingtime 340
Multilayer switching agingtime set to 344
Switch_A> (enable)
步骤4:验证交换机的MLS-RP设置,如下:
Switch_A> (enable) sh mls include
Included MLS-RP
–––––––––
172.16.10.1
Switch_A> (enable)
验证MLS条目生存时间使用show mls命令   net130整理


Pt.9 Configuring Token Ring & FDDI

Configuring the Port Speed

配置端口速率的命令如下:
Switch_A> (enable) set port speed [module_number/port_number] [4|16|auto]
如下,设置端口3/1的速率为16Mbps:
Switch_A> (enable) set port speed 3/1 16
Port 3/1 speed set to 16Mbps.
Switch_A> (enable)
默认是为auto(自动检测)
几种双工模式,如下: net130整理
1.aut自动检测,为默认模式
2.fdxcport:端口以全双工的模式连接到MAU
3.hdxcport:端口以半双工的模式连接到MAU
4.fdxstation:端口和工作站以全双工的模式直连
5.hdxstation:端口和工作站 <SCRIPT language=javascript src="/CMS/JS/newsad.js"></SCRIPT> 以半双工的模式直连

设置命令如下:
Switch_A> (enable) set tokenring portmode [mod_num/port_num] [duplex_method]
例如,配置连接到MAU的3/1端口,以全双工模式操作,如下:
Switch_A> (enable) set tokenring portmode 3/1 fdxcport
Port 3/1 mode set to fdxcport
Switch_A> (enable)
Configuring Early Token Release   net130整理

Catalyst的Token Ring line card支持Early Token Release.在端口上启用Early Token Release输入以下命令:
Switch_A> (enable) set tokenring etr [module_number/port_number] [enable|disable]
默认是启用的

Reducing the Number of All Routes Explorer (ARE) Packets

启用减少ARE的功能,命令如下:
Switch_A> (enable) set tokenring reduction [enable | disable]
默认是启用的

Viewing Token Ring Port Settings

要验证某一端口的设置,使用如下命令:
Switch_A> (enable) show tokenring [module_number/port_number]

Token Ring VLANs

多个环的Token Ring网络通常可以用SRB(源路由桥接)或SRT(源路由透明桥接)连接在一起.Token Ring line card上的每个端口是个物理环,并且一般的,每个物理环都有1个ring number,SRB或SRT把它们连在一起形成一个逻辑环.如下图:


可以在交换机上,把一些端口分组到一起,形成虚拟的一个环,所有在一个虚拟环里的端口拥有相同的ring number,这就是源路由交换(SRS,source-route switching),如下图:

 

如图,所有的端口(物理环)被组合,分成了3个虚拟的环,这样使得管理起来更为简便.分组到同一个虚拟环里的所有端口将被分配给TrCRF VLAN(Token Ring concentrator relay function VLAN).为了在TrCRF之间进行桥接,就要创建TrBRF VLAN(Token Ring bridge relay function VLAN),TrBRF通过SRB或SRT来达到桥接TrCRF的目的,并且给TrCRF分配父子关系,如下图:   net130整理


并且逻辑示意图如下:


一般的,TrCRF是只在一个交换机上创建,不过可以通过Cisco的ISL trunk封装把TrCRF分布到多个交换机上,如下图:


TrCRF减少了环的树数目,可以避免最大SRB跳数带来的问题
Configuring Token Ring VLANs   net130整理

要在交换机上配置Token Ring VLAN,先要决定是否使用默认的设置.默认交换机上分别设置的有一个TrCRF和一个TrBRF,所有的端口分配给TrCRF,并且TrCRF是TrBRF的子关系.如下: net130整理
Switch_A> (enable) show vlan
VLAN   Name     Status     Mod/Ports
–––   –––     –––     –––––
1       default     active     1/1-2
2/1-12
3/1-2
1002   fddi-default   active
1003   trcrf-default   active
1004   fddinet-default   active
1005   trbrf-default   active
如上,VLAN 1003是TrCRF,VLAN 1005是TrBRF.要创建更多的TrCRF,就得创建父关系的TrBRF.不可以在创建新的TrCRF使用默认的TrBRF,必须手动创建新的TrBRF.还有,要启用VTP版本2
在创建TrBRF的时候,必须指定一个bridge number,并且选择一种STP(可以选用IEEE STP或IBM STP,默认为IBM STP).MTU可以设置为1500或4472,默认为4472.创建TrBRF的命令如下:
Switch_A> (enable) set vlan [vlan_num] name [name] type trbrf mtu [mtu] bridge [bridge_number] stp [ieee | ibm]
创建TrCRF的命令如下:
Switch_A> (enable) set vlan vlan_num name [name] type trcrf mtu [mtu] ring [hex_ring_number or decring decimal_ring_number] parent [vlan_num]
ring number可以为16进制或10进制,如果要采用10进制的表示方法,必须加上关键字decring.并且父关系的VLAN必须存在,否则TrCRF不能被创建
例子如下图: net130整理


Switch_A> (enable) set vlan 900 name Bridge_1 type trbrf bridge 1
Vlan 900 configuration successful
Switch_A > (enable) set vlan 901 name Ring_101 type trcrf ring 101 parent 900
Vlan 901 configuration successful
Switch_A > (enable) set vlan 902 name Ring_102 type trcrf ring 102 parent 900
Vlan 902 configuration successful
Vlan 902 configuration successful
Switch_A> (enable) set vlan 901 3/1-8
VLAN 1003 modified.
VLAN 901 modified.
VLAN   Mod/Ports
–––   –––––
900                 3/1-8
Switch_A> (enable) set vlan 901 3/9-16
VLAN 1003 modified.
VLAN 902 modified.
VLAN   Mod/Ports
–––   –––––
901                 3/9-16


Fin

yUmi#sh start

阅读(1086) | 评论(0) | 转发(0) |
0

上一篇:利用google突破各种封锁来下载你要的东西- -

下一篇:一天又过去了

相关热门文章
  • IP Sec VPN与NAT破镜重圆
  • 网站导航
  • UT2.0正式版下载
  • tomcat6.0配置(含配置视频下载...
  • Gomez中国网站用户体验排行榜(...
  • IBM DS3400 盘阵怎么查看是单...
  • 启动auditd时,报错如下,怎么...
  • CGSL系统中root密码正确,但无...
  • 在CGSL系统中,如何为不同的用...
  • CGSL系统如何设置交换分区的大...
给主人留下些什么吧!~~
评论热议
0 0
原创粉丝点击