Cisco IP多层交换(IP MLS)
MLS(MultiLayer Switching,多层交换)为交换机提供基于硬件的第三层高性能交换。它采用先进的专用集成电路(ASIC)交换部件完成子网间的IP包交换,可以大大减轻路由器在处理数据包时所引起的过高系统开销。MLS是一种用硬件处理包交换和重写帧头,从而提高IP路由性能的技术。Cisco多层交换技术支持所有传统路由协议,而原来由路由器完成的帧转发和重写功能现在已经由交换机的硬件完成。MLS将传统路由器的包交换功能迁移到第三层交换机上。当然,这首先要求交换的路径必须存在。
传统路由器典型地执行两个主要功能:根据路由表的路由处理计算的和数据包交换(媒体访问控制地址重写,恢复校验和,生存时间减少量,等等)。路由器和L3交换机之间的主要区别是在路由器的数据包交换在软件方面完成由基于微处理机的引擎,而在L3交换机的数据包交换在硬件方面完成由特定特殊用途的集成电路(ASIC)。
MLS由以下三个部分组成:
多层交换引擎(MLS-SE) —负责对数据包交换和重写功能在自定义ASIC和能够识别L3流。
多层交换路由处理器(MLS-RP) —通知MLS-SE MLS配置,并且用路由协议(RP)路由计算的。
多层交换协议(MLSP) —由通知MLS-RP、路由和访问列表更改使用的MLS-SE的MLS-RP的组播协议发送的消息MAC地址,等等。MLS-SE用途该信息编程自定义ASIC。
网络图
使用RSM,如此网络图所显示,本文显示IP MLS配置示例, :
MLS 运行
在以上图表, PC-A (a)要与PC-B (b)联络。他们用不同的VLAN,因此流量通过RSM (PCs的默认网关路由)。第一数据包由PC-A发送和由往PC-B的RSM路由。快捷方式(A “B)创建,并且后续信息包由MLS-SE将是第三层交换机的,使用运行在NFFC的Supervisor引擎。
注意: 快捷方式的条目是单向的,因此另一个条目将创建,当PC-B与PC-A联络。
下面的示例显示PC通信、MLS快捷方式和其他MLS信息。
PC-A# ping 12.12.12.12
!--- Pinging PC-B.
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 12.12.12.12, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
此输出通过发出指示的on命令生成交换机。
switch-MLS-SE (enable) show mls entry
Destination IPSource IP Prot DstPrt SrcPrt Destination Mac Vlan Port
--------------- --------------- ---- ------ ------ ----------------- ---- -----
MLS-RP 11.11.11.1:
11.11.11.11 12.12.12.12 ICMP - - 00-d0-58-43-9f-60 11 6/11
!--- As in the note above, there are two shortcuts A » B and B » A.
12.12.12.12 11.11.11.11 ICMP - - 00-00-0c-07-ac-01 12 6/12
switch-MLS-SE (enable) show mls
Multilayer switching enabled
!--- By default, MLS is enabled on the switch.
Multilayer switching aging time = 256 seconds
Multilayer switching fast aging time = 0 seconds, packet threshold = 0
Current flow mask is Destination flow
Configured flow mask is Destination flow
Total packets switched = 8
!--- Five echoes and five replies were sent; the first echo and reply went !--- through the RSM, and subsequent echoes and replies were L3 switched, !--- which gives us a total of eight L3 switched packets and two shortcuts.
Active shortcuts = 2
Netflow Data Export disabled
Total packets exported = 0
MLS-RP IP MLS-RP ID XTAG MLS-RP MAC-Vlans
---------------- ------------ ---- ------------------ --------------
11.11.11.1 00100b108800 2 00-10-0b-10-88-0011-12
switch-MLS-SE (enable) show mls statistics rp
Total packets switched = 8
Active shortcuts = 2
Total packets exported= 0
Total switched
MLS-RP IP MLS-RP ID packets bytes
--------------- ------------ ---------- ------------
11.11.11.1 00100b108800 8 944
RSM-MLS-RP# show mls rp
multilayer switching is globally enabled
mls id is 0010.0b10.8800
mls ip address 11.11.11.1
!--- IP address of MLS-RP.
mls flow mask is destination-ip
number of domains configured for mls 1
vlan domain name: sales
current flow mask: destination-ip
current sequence number: 3150688457
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: 1d00h
keepalive timer expires in 8 seconds
retry timer not running
change timer not running
1 management interface(s) currently defined:
vlan 11 on Vlan11
2 mac-vlan(s) configured for multi-layer switching:
mac 0010.0b10.8800
vlan id(s)
11 12
!--- VLANs and interfaces participating in MLS.
router currently aware of following 1 switch(es):
switch id 0050.d133.2bff
!--- MAC address of the MLS-SE.
配置
在本例中, RSM使用作为MLS-RP,与此软件版本:
IOS (tm) C5RSM Software (C5RSM-JSV-M), Version 11.3(9)WA4(12) RELEASE SOFTWARE
Copyright (c) 1986-1999 by Cisco Systems, Inc.
在交换机的软件版本如下:
WS-C5509 Software, Version McpSW: 4.5(2) NmpSW: 4.5(2)
Copyright (c) 1995-1999 by Cisco Systems, Inc.
默认情况下在交换机上, MLS启用。如果它是RSM,没有需要指定MLS-RP IP地址。相反地,为作为MLS-RP的外部路由器,您需要通过发出此命令配置交换机用此IP地址, IP地址是外部MLS-RP的IP地址:
set mls include IPaddress
使用此步骤配置路由器:
通过发出mls rp ip命令启用在全局配置模式的MLS。
Router(config)# mls rp ip
分配在一个MLS接口的虚拟终端协议(VTP)域。
Router(config-if)# mls rp vtp-domain VTP_domain_name
注意: 您能通过发出show vtp domain命令确定VTP域名(在以上示例的VTP_domain_name)在交换机。
启用在接口的MLS,以便能参加快捷方式进程。
Router(config-if)# mls rp ip
指定路由器接口作为管理接口,使用组播协议(MLSP),允许MLS-SE和MLS-RP通信。
Router(config-if)# mls rp management-interface
重复参加MLS的所有接口的步骤2和3。
注意: 步骤4在MLSP的一个接口只一次必要能允许通信(MLS-RP “” MLS-SE)。
MLS-RP当前配置如下:
MLS-RP (RSM)
Current configuration:
!
version 11.3
!
hostname RSM-MLS-RP
!
!
mls rp ip
!
!
interface Vlan11
ip address 11.11.11.1 255.255.255.0
mls rp vtp-domain sales
mls rp management-interface
mls rp ip
!
interface Vlan12
ip address 12.12.12.1 255.255.255.0
mls rp vtp-domain sales
mls rp ip
!
ip classless
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
end
MLS 注意事项
为了使工作的MLS, MLS-SE必须发现数据包去MLS-RP和从同样MLS-RP回来到同样MLS-SE。
MLS-SE从未涉及所有路由协议或路由计算。所有路由协议由MLS-RP用;例如,开放最短路径优先(OSPF),增强的内部网关路由选择协议(EIGRP),增强型内部网关路由协议(EIGRP),路由信息协议(RIP),等等。
MLS-RP不知道MLS-SE转发代表其的一些数据包。
如果MLS-SE不能因故设立L3条目,发送数据包对常规路由的MLS-RP;它不丢弃数据包。
热备份路由协议(HSRP)和MLS能兼容不出任何问题。
MLS和IP CEF在确切的路由命令同样DA的产生不同的结果。这是正常的行为。ip cef命令信息基于软件的。这从路由表和MAC地址表计算。然而, cef命令的MLS是根据软件CEF,并且可以由负载均衡算法更改的硬件转发信息。
mls ip CEF负载均衡简单命令在转发引擎里给一个更加好的负载平衡并且避免一新的邻接。并且, mls ip CEF负载均衡完整命令是包括L4端口的一种负载均衡算法为一单阶CEF推荐的负载均衡算法。为了达到最好的CEF负载均衡,备选L3和L4散列在访问、分配和核心路由器和使用这类配置:
在访问和核心路由器上- mls ip CEF负载均衡简单
在分布式路由器上- mls ip CEF负载均衡全双工
如果有L4网络的,端口的好混合mls ip CEF负载均衡完整命令能改进负载均衡。使用SRB2镜像它在所有邻接能使用例如ip2ip、ip2tag、tag2tag和tag2ip案件。然而,与SRA它仅与ip2ip一起使用, ip2tag邻接。
感谢楼主分享! 好东西谢谢楼主分享 :loveliness:感谢楼主分享! ddddddddddd
页:
[1]