北京企业网站建设多少钱,济南建设工程,市场营销案例150例,展示型网站举例本节书摘来自异步社区《CCIE路由和交换认证考试指南#xff08;第5版#xff09; #xff08;第1卷#xff09;》一书中的第1章#xff0c;第1.6节虚拟交换系统#xff0c;作者 【美】Narbik Kocharians#xff08;那比克 科查理安#xff09; , 【斯洛伐克】Peter Pal… 本节书摘来自异步社区《CCIE路由和交换认证考试指南第5版 第1卷》一书中的第1章第1.6节虚拟交换系统作者 【美】Narbik Kocharians那比克 科查理安 , 【斯洛伐克】Peter Paluch彼得 派拉奇更多章节内容可以访问云栖社区“异步社区”公众号查看 1.6 虚拟交换系统在所有现代网络中我们发现最重要的事情是创建一个能够为设备、连接和服务提供高可用性和高可靠性的拓扑。为了配置这些特性和功能网络工程师通常使用的方法是创建冗余的二层交换环境比如使用冗余的一对或多条链路来提供多路径。图1-10展示了常见的交换网络配置。 可以看出这些冗余网络设备和链路的应用和配置会快速提高网络设计和操作的复杂性。有一个方法可以解决这种复杂性设计就是部署虚拟交换系统。这项技术能够实际地简化网络因为它减少了网络设备的数量工程师无需再对冗余的交换机和链路进行复杂管理了。运行IOS-XE在本章后文“IOS-XE”小节中详细介绍的Cisco Catalyst 6500和4500系列交换机能够支持该特性。 在本节的讨论中我们使用VSS虚拟交换系统将一对Catalyst 4500或4500-X系列交换机合并到一台网络设备中。VSS管理冗余链路的方式从外部设备看来就像是管理单个Port-Channel。 这种部署方式简化了网络配置和操作因为它不仅减少了三层路由邻居的整体数量同时还提供了无环的二层拓扑。 1.6.1 虚拟交换系统想要部署VSS最基本的原因是想要将一对交换机在逻辑上合并到一台网络设备中这一点之前已经提过了。为了更好地理解其中的过程我们需要进一步查看这个特性为逻辑拓扑做哪些事情。举例来说位于网络中分布层的VSS会与低于自己的接入层和高于自己的核心层进行通信就好像它是一台交换机如图1-11所示。 从图1-11中可以看出接入层的每台交换机各自使用一个逻辑的Port-Channel连接了两台VSS交换机因为对于外部设备来说VSS看起来就是一台单独的交换机——或者说逻辑交换机。VSS设备也做出了相应的改进比如它们可以在Port-Channel上管理冗余特性和负载均衡特性以此来掌控链路的行为即使它实际上连接了两台设备。虽然我们倾向于把VSS配置中的这些交换机看作是独立的设备但这么说并不准确。虽然这些交换机在物理上是相互分离的实体但从操作和控制平面看来它们实际上是一个单元。这种改进提供了无环的二层网络拓扑。由于减少了网络中路由对等体的数量因此VSS也简化了三层网络拓扑从而也将网络的简单化扩展到了数据平面中。 1.6.2 VSS主用和VSS备用交换机前文中讨论的更新提到了VSS中每台设备的操作相关内容也可以延伸到“基于角色”的行为。在VSS的环境中每台独立的交换机首先会为自己争取到一个VSS进程中的特定工作角色然后根据自己的角色作出相应行为。每一次工程师创建或重启VSS时对等体交换机之间都会协商各自的角色。最终结果就是一台设备成为VSS主用Active交换机另一台设备成为VSS备用Standby交换机。 VSS主用交换机负责控制VSS并在两台交换机上为交换模块运行二层和三层控制协议。VSS主用交换机也为VSS提供管理功能比如模块的在线插拔OIR操作和接口的控制。 VSS主用和备用交换机在自己本地的接口上为入向数据流量执行数据包转发。但VSS备用交换机会把所有控制流量发送到VSS主用交换机让主用交换机进行 处理。 1.6.3 虚拟交换链路前文提到过为了使VSS中的两台交换机看起来像是一台网络设备它们之间需要共享控制信息和数据流量为了实现这种共享它们需要具备各自的角色以及诸多不同用途的机制。在这些不同用途的机制设计中最重要的是连接两台VSS设备的虚拟交换链路。 虚拟交换链路VSL是一条特殊的链路它负责承载VSS两台交换机之间的控制流量和数据流量详见图1-12。VSL通常被配置为EtherChannel最多支持8条链路捆绑在一起。并不是只有这种特殊用途的链路能够在VSS对等体之间提供通信路径但它的优势是能够为控制和管理平面的流量提供更高的优先级使其优先于数据流量从而保障控制和管理消息从不会被丢弃。多条VSL链路之间的数据流量负载均衡可以通过默认的方法实现也可以通过配置EtherChannel负载均衡算法来实现。 1.6.4 多机框EtherChannelMEC读者从前文中已经可以看出EtherChannel的重要性了。EtherChannel也可以称为Port-Channel是两条或多条物理链路的集合将这些物理链路合并成为一条逻辑链路。EtherChannel作为一个单独的逻辑实体交换机可以在它之上运行二层协议。这一概念也使另一些协议进行了相应调整比如生成树协议STPSTP通常会阻塞设备之间的冗余链路以防止产生交换环路。但我们这里所描述的概念是一种特殊类型的Port-Channel它不仅可以建立在两台物理设备之间还可以建立在多个机框Chassis之间提供了普通EtherChannel环境中无法提供的硬件或设备故障倒换功能。这是因为VSS能够创建MEC而MEC这个EtherChannel中的成员接口可以分布在多台VSS成员交换机上。非VSS交换机连接到VSS的话MEC在它看来就是标准的EtherChannel非VSS交换机可以使用双站Dual-Homed的方式进行连接。流经MEC的流量可以在VSS成员交换机中实现负载均衡这与标准EtherChannel非常类似。Cisco MEC支持动态EtherChannel协议包括工业标准的LACP链路汇聚控制协议和Cisco私有的PAgP端口汇聚协议MEC还支持静态EtherChannel配置。总的来说VSS最多可以支持256条EtherChannel这一数量限制是普通EtherChannel和MEC的总和。 1.6.5 基本VSS配置为了创建VSS所需的最基本配置首先需要在VSS的两台设备上创建相同的虚拟交换域。在VSS的两台交换机上这个交换域体现为一个编号这个编号必须在1255的范围内。在分配好域编号后工程是必须将其中一台路由器配置为switch 1另一台交换机配置为switch 2如例1-8所示。 例1-8 分配虚拟交换域和交换机号码 SW1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)# switch virtual domain 10
Domain ID 10 config will take effect only
after the exec command switch convert mode virtual is issued
SW1(config-vs-domain)# switch 1
SW1(config-vs-domain)# exit
SW1(config)#SW2# conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)# switch virtual domain 10
Domain ID 10 config will take effect only
after the exec command switch convert mode virtual is issued
SW2(config-vs-domain)# switch 2
SW2(config-vs-domain)# exit
SW2(config)#
接下来工程师需要创建VSL这需要在每台交换机上都创建一个唯一的Port-Channel详见例1-9。在配置过程中两个Port-Channel都是在VSS主动交换机上建立的。如果VSS备用交换机的VSL Port-Channel号码已经用于了其他用途VSS将会启动为路由处理器冗余模式。为了避免这种情况要确保使用的Port-Channel号码在两台交换机上都是可用的。例1-9 配置VSL Port-ChannelSW1(config)# int port-channel 5
SW1(config-if)# switchport
SW1(config-if)# switch virtual link 1
SW1(config-if)# no shut
SW1(config-if)# exit
*Jan 24 05:19:57.092: %SPANTREE-6-PORTDEL_ALL_VLANS: Port-channel5 deleted from allVlansSW2(config)# int port-channel 10
SW2(config-if)# switchport
SW2(config-if)# switch virtual link 2
SW2(config-if)# no shut
SW2(config-if)# exit
SW2(config)#
*Jan 24 05:14:17.273: %SPANTREE-6-PORTDEL_ALL_VLANS: Port-channel10 deleted fromall Vlans
现在已经配置好Port-Channel接口了接下来需要将VSL物理成员接口添加到相应的Port-Channel中。在例1-10中SW1上的接口GE 7/3和7/4将要与SW2上的接口GE 4/45和4/46连接在一起。例1-10 配置VSL接口SW1(config)# int range gig7/3 - 4
SW1(config-if-range)# switchport mode trunk
SW1(config-if-range)# channel-group 5 mode on
WARNING: Interface GigabitEthernet7/3 placed in restricted config mode. Allextraneous configs removed!
WARNING: Interface GigabitEthernet7/4 placed in restricted config mode. Allextraneous configs removed!
SW1(config-if-range)# exitSW2(config)# int range gig4/45 - 46
SW2(config-if-range)# switchport mode trunk
SW2(config-if-range)# channel-group 10 mode on
WARNING: Interface GigabitEthernet4/45 placed in restricted config mode. Allextraneous configs removed!
WARNING: Interface GigabitEthernet4/46 placed in restricted config mode. Allextraneous configs removed!
SW2(config-if-range)# exit
注释
在使用channel-group命令将接口放入VSL Port-Channel后接口会进入“notconnect无连接”状态。接口状态会显示为“up”但线路协议状态将显示为“down”。在交换机重启之前接口将一直为up/down (notconnect)状态。
接着工程师需要在SW1上使用命令switch convert mode virtual完成交换机转换过程。系统会提示工程师确认这一行为这时输入yes详见例1-11。这时系统会创建一个转换配置文件并存入系统的bootflash中。在两台交换机上都确认完毕后运行配置文件running-config会被保存为启动配置文件startup-config并且交换机会重启。重启后交换机就进入了虚拟交换模式。例1-11 将交换机转换为虚拟交换模式SW1# switch convert mode virtualThis command will convert all interface names
to naming convention interface-type switch-number/slot/port,
save the running config to startup-config andreload the switch.
Do you want to proceed? [yes/no]: yes
Converting interface names
Building configuration...
Compressed configuration from 6551 bytes to 2893 bytes[OK]
Saving converted configuration to bootflash: ...
Destination filename [startup-config.converted_vs-20130124-062921]?
Please stand by while rebooting the system...
Restarting system.Rommon (G) Signature verification PASSED
Rommon (P) Signature verification PASSED
FPGA (P) Signature verification PASSEDSimilarly you need to enter the switch convert mode virtual command on Switch 2for converting to Virtual Switch Mode.SW2# switch convert mode virtualThis command will convert all interface names
to naming convention interface-type switch-number/slot/port,
save the running config to startup-config and
reload the switch.
Do you want to proceed? [yes/no]: yes
Converting interface names
Building configuration...
Compressed configuration from 6027 bytes to 2774 bytes[OK]
Saving converted configuration to bootflash: ...
Destination filename [startup-config.converted_vs-20130124-052526]?
Please stand by while rebooting the system...
Restarting system.Rommon (G) Signature verification PASSED
Rommon (P) Signature verification PASSED
FPGA (P) Signature verification PASSED************************************************************
* *
* Welcome to Rom Monitor for WS-X45-SUP7-E System. *
* Copyright (c) 2008-2012 by Cisco Systems, Inc. *
* All rights reserved. *
* *
************************************************************ 1.6.6 VSS检查过程工程师可以使用简单的show命令来查看与特定VSS对相关的VSS配置信息通过命令show switch virtual可以查看每台交换机的交换机号码和角色详见例1-12。 例1-12 查看虚拟交换域编号 SW1# sh switch virtualExecuting the command on VSS member switch role VSS Active, id 1Switch mode : Virtual Switch
Virtual switch domain number : 10
Local switch number : 1
Local switch operational role : Virtual Switch Active
Peer switch number : 2
Peer switch operational role : Virtual Switch StandbyExecuting the command on VSS member switch role VSS Standby, id 2Switch mode : Virtual Switch
Virtual switch domain number : 10
Local switch number : 2
Local switch operational role : Virtual Switch Standby
Peer switch number : 1
Peer switch operational role : Virtual Switch Active
要想让VSS正常运行最重要的一点是确保一台交换机是主用交换机另一台是备用交换机。备用交换机的控制模式应该与例1-13所示相同。例1-13 备用交换机的控制模式SW2-standby
Standby console disabled 正如理论部分所讨论的对于VSS来说有很多角色和配置要求。工程师可以使用命令show switch virtual role来查看VSS中每台交换机的变量。例1-14展示了使用这条命令输出的类型和详细信息。 工程师可以使用命令show switch virtual link来查看有关VSL的信息详见例1-15。 例1-14 虚拟角色分配和优先级 SW1# sh switch virtual role
Executing the command on VSS member switch role VSS Active, id 1
RRP information for Instance 1
--------------------------------------------------------------------
Valid Flags Peer Preferred ReservedCount Peer Peer
--------------------------------------------------------------------
TRUE V 1 1 1
Switch Switch Status Preempt Priority Role Local RemoteNumber Oper(Conf) Oper(Conf) SID SID
--------------------------------------------------------------------
LOCAL 1 UP FALSE(N ) 100(100) ACTIVE 0 0
REMOTE 2 UP FALSE(N ) 100(100) STANDBY 6834 6152Peer 0 represents the local switchFlags : V - Valid
In dual-active recovery mode: NoExecuting the command on VSS member switch role VSS Standby, id 2RRP information for Instance 2--------------------------------------------------------------------
Valid Flags Peer Preferred ReservedCount Peer Peer--------------------------------------------------------------------
TRUE V 1 1 1Switch Switch Status Preempt Priority Role Local RemoteNumber Oper(Conf) Oper(Conf) SID SID
--------------------------------------------------------------------
LOCAL 2 UP FALSE(N ) 100(100) STANDBY 0 0
REMOTE 1 UP FALSE(N ) 100(100) ACTIVE 6152 6834Peer 0 represents the local switchFlags : V - Valid
In dual-active recovery mode: No
例1-15 虚拟交换链路详情SW1# sh switch virtual linkExecuting the command on VSS member switch role VSS Active, id 1VSL Status : UP
VSL Uptime : 3 minutes
VSL Control Link : Gi1/7/4Executing the command on VSS member switch role VSS Standby, id 2VSL Status : UP
VSL Uptime : 3 minutes
VSL Control Link : Gi2/4/45 除此之外工程师还可以使用命令show switch virtual link port-channel来查看有关VSL Port-Channel配置的信息详见例1-16。 例1-16 查看VSL Port-Channel SW1# sh switch virtual link port-channelExecuting the command on VSS member switch role VSS Active, id 1Flags: D - dow- P - bundled in port-channelI - stand-alone s - suspendedH - Hot-standby (LACP only)R - Layer3 S - Layer2U - in use N - not in use, no aggregationf - failed to allocate aggregatorM - not in use, no aggregation due to minimum links not metm - not in use, port not aggregated due to minimum links not metu - unsuitable for bundlingd - default portw - waiting to be aggregatedGroup Port-channel Protocol Ports
-----------------------------------------------
5 Po5(SU) - Gi1/7/3(P) Gi1/7/4(P)
10 Po10(SU) - Gi2/4/45(P) Gi2/4/46(P)Executing the command on VSS member switch role VSS Standby, id 2Flags: D - dow- P - bundled in port-channelI - stand-alone s - suspendedH - Hot-standby (LACP only)R - Layer3 S - Layer2U - in use N - not in use, no aggregationf - failed to allocate aggregatorM - not in use, no aggregation due to minimum links not metm - not in use, port not aggregated due to minimum links not metu - unsuitable for bundlingd - default portw - waiting to be aggregatedGroup Port-channel Protocol Ports
-------------------------------------------------
5 Po5(SU) - Gi1/7/3(P) Gi1/7/4(P)
10 Po10(SU) - Gi2/4/45(P) Gi2/4/46(P)SW1#