科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网网络频道在部分设备支持STP协议的网络中实施STP

在部分设备支持STP协议的网络中实施STP

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

1.营业部网络结构中心采用两台3com 3300作为主干交换机,确认二级交换机此时都为单线上联到主交换机,备份主交换机没有连接主交换机。elect menu option (bridge): dis //将备份主交换机也按照上述步骤设置STP优先级为ox7000 

作者:中国IT实验室 2007年9月16日

关键字: 路由协议 EIGRP igrp SNMP CISCO 网络协议

  • 评论
  • 分享微博
  • 分享邮件

  网络拓扑结构图:

  

  

  

  现在的趋势是IT越来越成为一种不可停顿的服务,常常对网络的可靠性要求很高。因此要求系统的核心、网络骨干不存在单点故障,主要服务器、网络设备在部件、设备上都要求有冗余。在这种背景下,STP(spanning-tree protocol)协议得到了广泛的应用。STP协议是一个二层的链路管理协议,它在提供链路冗余的同时防止网络产生环路。如果服务器上安装两块网卡,形成一个AFT(或ALB)组,一块连接主交换机,另一块连接备份主交换机,二级交换机都采用双链路分别上联到主交换机和备份主交换机,那么当主交换机失效时,工作站仍可通过备份主交换机上的备份网卡访问,服务不至于中断。

  尽管STP是一种分布式算法,它要求网络中交换机的全部支持,但在实际工作中往往出现只有主干交换机支持STP协议,而二级交换机不支持STP的情况。

  在去年我的同事曾经做过两个案例:

  第一个,主交换机为一台cisco 4006和一台cisco 4003,二级交换机为inter 410T(不可网管交换机,不支持STP协议)。

  第二个,主交换机为两台inter 480T,二级交换机为inter 460T和inter 410T。

  最近,我也遇到了同样的情况。主交换机为两台3com 3300,二级交换机为四台华为2026B(替换原来的HUB,也不知道是谁推荐的,这种交换机也不支持STP协议,甚至连IP也不能配,VLAN也只能在本地划分)。甲方希望能够做到链路冗余,尽管我极力反对,反复强调网络收敛时间很长,甚至导致广播风暴的产生,但他还是决定要做。后来我知道他这样做是有道理的,机房一共两个人,一个人(领导)长期不来,另一个人显然更愿意面对外面的MM而不是机房里的设备。

  

  步骤如下:

  

  1.营业部网络结构中心采用两台3com 3300作为主干交换机,确认二级交换机此时都为单线上联到主交换机,备份主交换机没有连接主交换机。将主交换机的STP优先级设为0X6000,将副主交换机的STP优先级设为0X7000

  

  Login: admin //用admin用户登录

  Password:

  

  Menu options: --------------3Com SuperStack 3 Switch 3300---------------

  bridge - Administer bridging/VLANS

  ethernet - Administer Ethernet ports

  feature - Administer system features

  ip - Administer IP

  logout - Logout of the Command Line Interface

  snmp - Administer SNMP

  system - Administer system-level functions

  

  Type ? for help.

  -----------------------------------Switch 3300 (1)----------------------

  Select menu option: bri //选择bridge菜单

  

  Menu options: --------------3Com SuperStack 3 Switch 3300---------------

  agingTime - Set the bridge address aging time

  display - Display bridge information

  multicastFiltering - Administer multicast filtering

  port - Administer bridge ports

  stpForwardDelay - Set the bridge Spanning Tree forward delay

  stpHelloTime - Set the bridge Spanning Tree hello timer

  stpMaxAge - Set the bridge Spanning Tree maximum age

  stpPriority - Set the Spanning Tree bridge Priority

  stpState - Enable/Disable Spanning Tree on a bridge

  vlan - Administer VLANs

  

  Type "q" to return to the previous menu or ? for help.

  -----------------------------------Switch 3300 (1)----------------------

  Select menu option (bridge): dis //选择display菜单

  

  stpState: disabled agingTime: 1800  //现在stp协议状态是disabled

  

  Time since topology change: 0 hrs 0 mins 0 seconds

  Topology Changes: 0

  Bridge Identifier: 8000 00051a5e92f8

  Designated Root: 0000 000000000000

  

  maxAge: 0 bridgeMaxAge: 20

  helloTime: 0 bridgeHelloTime: 2

  forwardDelay: 0 bridgeFwdDelay: 15

  holdTime: 1 rootCost: 0

  rootPort: No Port priority: 0x8000 //此时STP缺省优先级为32768

  

  Menu options: --------------3Com SuperStack 3 Switch 3300---------------

  agingTime - Set the bridge address aging time

  display - Display bridge information

  multicastFiltering - Administer multicast filtering

  port - Administer bridge ports

  stpForwardDelay - Set the bridge Spanning Tree forward delay

  stpHelloTime - Set the bridge Spanning Tree hello timer

  stpMaxAge - Set the bridge Spanning Tree maximum age

  stpPriority - Set the Spanning Tree bridge Priority

  stpState - Enable/Disable Spanning Tree on a bridge

  vlan - Administer VLANs

  

  Type "q" to return to the previous menu or ? for help.

  -----------------------------------primary3300 (1)----------------------

  Select menu option (bridge): stpsta //选择stpState菜单

  Enter new value (disable, enable)[disable]: en //enable STP协议

  

  Select menu option (bridge): dis //display状态

  

  stpState: enabled agingTime: 1800

  

  Time since topology change: 0 hrs 0 mins 6 seconds

  Topology Changes: 0

  Bridge Identifier: 8000 00051a612eb8

  Designated Root: 8000 00051a612eb8

  

  maxAge: 20 bridgeMaxAge: 20

  helloTime: 2 bridgeHelloTime: 2

  forwardDelay: 15 bridgeFwdDelay: 15

  holdTime: 1 rootCost: 0

  rootPort: No Port priority: 0x8000

  

  Select menu option (bridge): stppri     //选择stpPriority菜单

  Enter new hexadecimal value (0x0-0xffff) [0x8000]: 0x6000 //将优先值设为十六进制的6000,这将导致该交换机成为根交换机

  

  Select menu option (bridge): stpfor     //选择stpForwardDelay菜单

  Enter new value in seconds (4-30) [15]: 9  //想改变ForwardDelay值为9,但不成功

  Failed to Set value due to dependencies

  //forward值是一个端口从它的spanning-tree协议的学习和聆听状态转到转发状态所等待的秒数。

  此举主要是考虑参照CISCO的手册,此时网络直径为3,即任意两终端结点之间的最大跳数,执行spanning-tree vlan 1 root primary diameter 3将导致以下3条语句的出现,这是自动优化的结果

  spanning-tree vlan 1 priority 24576

  spanning-tree vlan 1 forward-time 9

  spanning-tree vlan 1 max-age 12

  

  Select menu option (bridge): stpmax     //选择stpMaxAge菜单

  Enter new value (6-40) [20]: 12

  //maximum-aging time值是交换机在拓扑变化时在接收spanning-tree配置信息之前所等待的秒数。

  Select menu option (bridge): dis             //display状态

  

  stpState: enabled agingTime: 1800

  

  Time since topology change: 0 hrs 4 mins 8 seconds

  Topology Changes: 0

  Bridge Identifier: 6000 00051a612eb8

  Designated Root: 6000 00051a612eb8

  

  maxAge: 12 bridgeMaxAge: 12

  helloTime: 2 bridgeHelloTime: 2

  forwardDelay: 15 bridgeFwdDelay: 15

  holdTime: 1 rootCost: 0

  rootPort: No Port priority: 0x6000

  

  -----------------------------------primary3300 (1)----------------------

  Select menu option (bridge): stpmax        //为了稳妥起见,maxujum-aging time还是用缺省的20

  Enter new value (6-40) [12]: 20

  

  Select menu option (bridge): dis         //再display状态

  

  stpState: enabled agingTime: 1800

  

  Time since topology change: 0 hrs 6 mins 2 seconds

  Topology Changes: 0

  Bridge Identifier: 6000 00051a612eb8

  Designated Root: 6000 00051a612eb8

  

  maxAge: 20 bridgeMaxAge: 20

  helloTime: 2 bridgeHelloTime: 2

  forwardDelay: 15 bridgeFwdDelay: 15

  holdTime: 1 rootCost: 0

  rootPort: No Port priority: 0x6000

  

  -------------------------------------------------------------------------

  elect menu option (bridge): dis //将备份主交换机也按照上述步骤设置STP优先级为ox7000

  

  stpState: enabled agingTime: 1800

  

  Time since topology change: 0 hrs 0 mins 42 seconds

  Topology Changes: 0

  Bridge Identifier: 7000 00051a5e92f8

  Designated Root: 7000 00051a5e92f8

  

  maxAge: 20 bridgeMaxAge: 20

  helloTime: 2 bridgeHelloTime: 2

  forwardDelay: 15 bridgeFwdDelay: 15

  holdTime: 1 rootCost: 0

  rootPort: No Port priority: 0x7000

  ---------------------------------------------------------------------------

  2.连接冗余链路,调

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章