Configuring the Catalyst 5000 Series Switch

来源:互联网 发布:软件开发 部门分类 编辑:程序博客网 时间:2024/05/21 10:26

Configuring the Catalyst 5000 Series Switch

对Catalyst 5000系列的交换机进行配置可以有2种方式,可以通过购买一个叫做CWSI(Cisco Works fortched Internetworks)的产品或者通过CLI进行配置.CLI可以通过交换机的console port用类似HyperTerminal的终端程序进行访问,把线缆的一端连接到PC的com口,另一端连接到交换机的console port即可
  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键退出查看输出
当你输出一个不正确的命令的时候,将收到提示信息,如下:
  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个.例子如下图:
  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>
 


--  作者: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
  (略)
 
原创粉丝点击