Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5186
  • 博文数量: 1
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2017-10-16 11:21
文章分类
文章存档

2017年(1)

我的朋友
最近访客

分类:

2017-10-16 11:22:00

原文地址:Cisco 设备 MLS和CEF区别 作者:network527

MLS配置
要配置路由器上的MLS,采取下列步骤:
1)  启用路由器上的MLS。使用mls rp命令启用Cisco交换机上的MLS:
c4500(config)#mls rp ip
c4500(config)#
2)  定义将要运行MLS接口的管理域名:
c4500(config)#mls rp vtp-domain kaka
3)连接到Catalyst交换机接口中的一个必须配置为管理接口。 MLSP信息包将通过该接口进行交换。
在本例中,我选择使用快速以太网0.10接口,但它可以是以下接口中的任意一个:
c4500(config)#interface fa0.10
c4500(config-subif)#mls management-interface
4)在所有将加入到 MLS的接口上启用MLS:
c4500(config)#interface fa0.10
c4500(config-subif)#mls rp ip
c4500(config)#interface fa0.20
c4500(config-subif)#mls rp ip
5)最后ACL可以配合MLS
c4500(config-subif)#mls rp ip input-acl

MLS-SE配置:
1. 在交换机上使用Set mls enable 打开mls 功能
2. 定义参与mls 的外部路由器,在路由器上输入show mls rp
然后在交换机上设置:
Set mls include   209.118.4.184
MLS可选参数:
1. 超时时间:
Set mls agingtime
2. 最小的IP MLS 流掩码
Set mls flow {destination | destination-source | full } 

22.3.2   MLS配置实例

There are four VLANs (IP subnetworks):
VLAN 1 (the management VLAN), subnet 10.1.1.0/24 
VLAN 10, subnet 10.1.10.0/24 
VLAN 20, subnet 10.1.20.0/24 
VLAN 30, subnet 10.1.30.0/24 
The MLS-RP is a Cisco 7505 router with a Fast Ethernet interface (interface FastEthernet 2/0) 
The subinterfaces on the router interface have these IP addresses:
FastEthernet 2/0.1 – 10.1.1.1 255.255.255.0 
FastEthernet 2/0.10 – 10.1.10.1 255.255.255.0 
FastEthernet 2/0.20 – 10.1.20.1 255.255.255.0 
FastEthernet 2/0.30 – 10.1.30.1 255.255.255.0 
A standard output ACL  is configured on subinterface FastEthernet 2/0.20 (the  interface  in VL
the MLS-RP. The ACL denies all traffic from VLAN 30. 
Switch A, the MLS-SE, is a Catalyst 5509 switch with Supervisor Engine III and the NF
Switch B and Switch C are Catalyst 5505 switches. 
Switch A is the VTP server in domain “Corporate".
Switch B and Switch C are VTP clients. 

MLS-RP配置如下:
Cisco7505(config)#mls rpip 
Cisco7505(config)# access-lsit 1 deny 10.1.30.0 0.0.0.255
Cisco7505(config)# access-list 1 permit any
Cisco7505(config)# interface fa 2/0
Cisco7505(config-if)# speed 100
Cisco7505(config-if)# full-duplex
Cisco7505(config-if)# mls rp vtp-domain corporate
Cisco7505(config-if)# interface fa2/0.1
Cisco7505(config-subif)# encapsulation dot1q 1
Cisco7505(config-subif)# ip address 10.1.1.1 255.255.255.0
Cisco7505(config-subif)# mls rp management-interface
Cisco7505(config-subif)# interface fa 2/0.10
Cisco7505(config-subif)# encapsulation dot1q 10
Cisco7505(config-subif)# ip address 10.1.10.1 255.255.255.0
Cisco7505(config-subif)# mls rp ip
Cisco7505(config-subif)# interface fa 2/0.20
Cisco7505(config-subif)# encapsulation dot1q 20
Cisco7505(config-subif)# ip address 10.1.20.1 255.255.255.0
Cisco7505(config-subif)# mls rp ip
Cisco7505(config-subif)# interface fa 2/0.30

Cisco7505(config-subif)# encapsulation dot1q 30
Cisco7505(config-subif)# ip address 10.1.30.1 255.255.255.0
Cisco7505(config-subif)# mls rp ip

MLS-SE配置
MLS-SE配置相对简单,仅需配置端口相应的vlan和VTP 即可

22.3.3   MLS检验
Cisco7505#sh mls rp
ip multilayer switching is globally enabled
ipx multilayer switching is globally disabled
ipx mls inbound acl override is globally disabled

mls id is ca00.2fc4.0000
mls ip address 0.0.0.0
mls ip flow mask is destination
mls ipx flow mask is unknown
number of domains configured for mls 1

Cisco7505#sh mls rp vtp-domain    corporate
vlan domain name: corporate
current ip flow mask: destination
ip current/next global purge: false/false
ip current/next purge count: 0/0
current ipx flow mask: destination
ipx current/next global purge: false/false
ipx current/next purge count: 0/0
current sequence number: 859638665
current/maximum retry count: 0/10
current domain state: no-change
domain uptime: 00:00:54
keepalive timer expires in 0 seconds
retry timer not running
change timer not running
fcp subblock count = 2

1 management interface(s) currently defined:
vlan 1 on FastEthernet0/0.1

0 mac-vlan(s) configured for multi-layer switching
0 mac-vlan(s) enabled for ip multi-layer switching:
0 mac-vlan(s) enabled for ipx multi-layer switching:

router currently aware of following 0 switch(es):
no switch id's currently exists in domain
清除 MLS条目
kaka>(enable) clear mls entry destination    1.1.1.1 source 2.2.2.2 flow tcp 1652 23
MLS IP entry cleared


22.3.4   CEF
CEF 的操作模式有 2 种,即集中 CEF 模式和分散 CEF 模式。可以通过其中的任意一种来启用 CEF,
同一时刻用户只能使用其一种模式。
集中CEF模式
当启用集中 CEF 模式时,CEF 的 FIB 和邻接表驻留在路由处理器中,路由处理器来执行
快速转发。对于 CEF 交换来说,当线路卡不可用时,或者需要使用的功能与分散 CEF 交换不
兼容时,就可以使用集中CEF模式。
分布CEF模式
当启用分布式 CEF(dCEF)时,线路卡(例如 VIP 线路卡或者 GSR 线路卡)维护着一个与 FIB
和邻接表相同的拷贝。线路卡在端口适配器之间执行快速转发,这样,在进行交换操作时就
无须RSP的参与了。 dCEF使用一个“内部过程通信” (Inter Process Communication, IPC)机制,
在路由处理模块和线路卡上,保证FIB 和邻接表的同步。
在Cisco12000 系列路由器中,线路卡负责执行CEF交换。在其他路由器中,或许您使用
的不是同一种类型的线路卡,有可能某个接口卡不支持 CEF 交换。当某个不支持 CEF 交换的
线路卡收到数据包时,她将数据包转发给更高的交换层(比如路由处理模块)或者把数据包转

发给下一跳处理。这种机制允许旧的接口模块和新的接口模块并存。
1  Cisco12000系列千兆交换路由器上只运行dCEF模式。
2  一个VIP卡上不允许同时运行分布式CEF 交换和分布式快速交换。
3  Cisco7200系列路由器不支持分布式CEF交换。

附加的新功能
在配置集中模式 CEF和分布模式CEF时,您还可以配置以下功能:
分布式CEF支持访问控制列表
分布式CEF支持帧中继包
分布式CEF支持数据包分片
支持基于每一个包或者每一个目标的负载均衡
支持网络计费,可以收集数据包的个数和字节数
分布式CEF支持跨隧道的交换


22.3.5   CEF操作
启用和禁用CEF或者dCEF
如果用户的Cisco路由器中有接口处理器支持CEF时,就可以启用CEF。为了启用或禁用CEF,
可以在全局配置模式下利用下面的命令进行配置。
启用标准CEF 模式
ip cef switch
禁用标准CEF 模式
no ip cef switch
当线路卡执行快速转发时,则启用 dCEF,这样,路由处理模块就可以处理路由协议或
者负责交换从旧的接口模块(不支持 CEF 交换的模块)过来的数据包。在 Cisco12000 系列路由
器上,dCEF模式是缺省启用的。所以启用dCEF的命令(ip  cef  switch)在Cisco12000系列路由
器上是没有意义的,在配置清单上也不会列出dCEF 模式被启用。

为了启用或禁止dCEF操作,可以在全局配置模式下利用下面的命令进行配置。
启用dCEF模式
ip cef distributed switch
禁用dCEF模式 
no ip cef distributed switch

有时候,在某个接口配置了一项功能,而CEF或dCEF并不支持该功能,这时您就可能需
要在这个特定的接口上禁止CEF或dCEF。例如,策略路由和CEF就不能一起使用。您可能想
让一个接口支持策略路由,而让其他的接口支持 CEF。在这种情况下,可以按全局模式启用
CEF,而在那个打算配置策略路由的接口上禁用 CEF。这样,除了那一个接口外,在其他所有
接口上都启用了快速转发。
在某个接口上禁用CEF 或dCEF,可以在接口配置模式 
no ip route-cache cef
尔后又想重新启用CEF,在接口配置模式下,可以使用:
ip route-cache cef
在Cisco12000 系列路由器上,您不可以在某个接口上禁用dCEF模式。
阅读(3018) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:没有了

给主人留下些什么吧!~~