雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3454|回复: 3

[讨论/求助] CDP、DTP、EtherChannel

[复制链接]
发表于 2013-3-12 09:36:00 | 显示全部楼层 |阅读模式
本帖最后由 子杰 于 2013-3-12 09:38 编辑

目录
1        CDP 协议   
1.1        CDP的特点      
1.2        CDP能记录下列信息  
1.3        CDP的配置      
1.4        CDP的信息查看        
2        DTP        
2.1        DTP(Dynamic Trunking Protocol)cisco专有        
2.2        起trunk的条件   
2.3        DTP的模式        
2.4        trunk和desirable的区别      
2.5        DTP的相关模式配置命令        
2.6        DTP的相关查看命令        
3        EtherChannel        
3.1        EtherChannel注意事项        
3.2        EtherChannel的模式        
3.3        二层EtherChannel的配置命令和查看        
3.4        三层EtherChannel的配置命令        
3.5配置etherchannel负载均衡和查看        
3.6        Err-disable特性
        

1        CDP 协议
1.1        CDP的特点
(1)        cisco discovery protocol 发现协议
(2)        可以用来发现自已的邻居,与自已直连的CISCO设备
(3)        Cisco私有协议
(4)        工作在数据链路层
(5)        CDP发现邻居不管它们运行的是什么上层协议
(6)        物理介质必须支持SNAP(subnetwork access protocol)封装
(7)        具体实现过程:每60S发送一个信息给自已的直连邻居,告诉对方自已的基本信息

1.2        CDP能记录下列信息:
(1)        设备的标识符        
(2)        地址
(3)        连接端口
(4)        设备类型
(5)        设备型号

1.3        CDP的配置
(1)        cdp run          路由器默认情况下就打开了
(2)        no cdp run       关闭CDP通告
(3)        no cdp enable    在接口下关闭CDP
(4)        cdp enable       将被关闭的CDP接口打开
(5)        cdp times 60     修改cdp周期性发送的时间
(6)        cdp holdtime 180 修改cdp的holdtime时间

1.4        CDP的信息查看
(1)        Show cdp neighbors             显示邻居设备
(2)        Show cdp neighbors detail       显示邻居细节
(3)        show cdp                       显示CDP发送时间,和holdown时间
(4)        show cdp traffic                 显示CDP流量统计信息
(5)        Debug cdp packets              打开cdp的debug
(6)        No debug cdp packets           关闭cdp的debug
(7)        No debug all                    关闭所有debug进程
(8)        Undebug all                     关闭所有debug进程

2        DTP
2.1        DTP(Dynamic Trunking Protocol)cisco专有
(1)        Trunk中发送的数据帧是DTP,目的是主动协商成为trunk,每30S发送一次
(2)        在交换链路上发送此种报文,来协商双方是否能形成Trunk。
(3)        接口的五种模式:Access,trunk,desirable,auto,(nonegotiate)
(4)        3550默认是dynamic desirable、3560默认是dynamic auto。

2.2        起trunk的条件:
(1)        封装协议要一致,有dot1Q和ISL
(2)        模式的要求

2.3        DTP的模式
DTP                                   send                       response
access                                不发DTP                 不收DTP
trunk                                 主动发送DTP          主动响应DTP
desirable                            主动发                    主动响应
auto                                   不会主动发             主动响应
nonegotiate(非协商)        不发DTP                 不收DTP
注意:trunk与nonegotiate相连, 达到效果交换机起trunk,但禁止发DTP帧。且desirable和nonegotiate不能连着用。

                     Auto          Desirable        Trunk        Access
Auto              access        trunk             trunk        access
Desirable        trunk        trunk             trunk        access
Trunk             trunk        trunk             trunk           /
Access            access       access               /            access

2.4        trunk和desirable的区别:
(1)        trunk即收发DTP帧,而且没有收到DTP时会强制协商成trunk
(2)        desirable只能通过DTP帧来协商成trunk.

2.5        DTP的相关模式配置命令
            Sw1(config-if)#switchport mode access
            Sw1(config-if)#switchport mode dynamic desirable(默认模式)
            Sw1(config-if)#switchport mode dynamic auto
            Sw1(config-if)#switchport mode trunk
            Sw1(config-if)#switchport nonegotiate
           (nonegotiate只能和trunk联用)
            Sw1(config-if)#switchport trunk encapsulation dotlq 指定封装格式

2.6        DTP的相关查看命令
           Sw1#show interface trunk   查看trunk端口信息,验证是否已经起了trunk
           Sw1#Show interface f0/24 switchport  查看端口的配置
           Sw1#show dtp              查看DTP

3        EtherChannel
3.1        EtherChannel注意事项
(1)       通过这个技术能够将多个物理端口绑定为一个逻辑端口
                通过多个端口绑定,能充分利用现有端口来增加带宽。        
(2)       Cisco交换机最多允许绑定8个端口
                如果是快速以太网,总带宽可达1600Mbit/s
                如果是Gbit以太网,总带宽可达16Gbit/s
(3)       绑定后的端口默认继承原来物理接口的配置模式
(4)       etherchannel不支持10M端口的绑定
(5)       cisco的交换机不仅可以支持第二层etherchannel,还可以支持第三etherchannel
(6)       一个etherchannel内所有的端口都必须具有相同的速率和双工模式。LACP只能是全双工。

3.2        EtherChannel的模式
(1)        On:强行起etherchannel
(2)        auto:被动  只收不发,属于PAgP端口汇聚协议,Cisco私有技术
(3)        Desirable:主动 会发也会收协商消息,属于PAgP端口汇聚协议,Cisco私有技术
(4)        Passvie相当于PAgP的auto,LACP 链路聚合控制协议,业界标准
(5)        Active相当于PAgP的desireble  又发又收协商消息。LACP 链路聚合控制协议,业界标准。

3.3        二层EtherChannel的配置命令和查看
(1)    配置ON模式:
             Sw1(config)#int range f0/8 ,f0/9
             Sw1(config-if-range)#channel-group 1 mode on
             将这两个接口绑定为一组并指定on模式
             Sw1(config)#interface  port-channel  1
             Sw1(config-if)#switchport  mode  trunk
             指定接口模式为trunk,如不指定,会自动继承物理接口的模式
(2)    配置desirabe模式:
            Sw1(config)#int range f0/8 ,f0/9
            Sw1(config-if-range)#channel-group 1 mode desible
            Sw1(config)#interface port-channel 1
            Sw1(config-if)#switchport mode trunk
(3)   配置auto模式:
            Sw1(config)#int range f0/8 ,f0/9
            Sw1(config-if-range)#channel-group 1 mode auto
            Sw1(config)#interface port-channel 1
            Sw1(config-if)#switchport mode trunk
(4)  配置passive模式:
            Sw1(config)#int range f0/8 ,f0/9
            Sw1(config-if-range)#channel-group 1 mode passive
            Sw1(config)#interface port-channel 1
            Sw1(config-if)#switchport mode trunk
(5)  配置active模式:
           Sw1(config)#int range f0/8 ,f0/9
           Sw1(config-if-range)#channel-group 1 mode active
           Sw1(config)#interface  port-channel  1
           Sw1(config-if)#switchport  mode  trunk
(6)  查看channel的配置:
           show etherchannel 1 summary
           show etherchannel  summary  查看所有的group,可以看到绑定了多少接口
           Show interface etherchannel

3.4        三层EtherChannel的配置命令
            配置on/desirable/auto/passive/active模式:
            3550(config)#interface gigabitethernet 0/1
            3550(config-if)#no switchport
            3550(config-if)#channel-group 1 mode {on|desirable|auto|passive|active}
            将另一个端口也绑进来
            3550(config)#interface gigabitethernet 0/2
            3550(config-if)#no switchport
            3550(config-if)#channel-group 1 mode {on|desirable|auto|passive|active}
            给channel通道配上IP地址:
            3550(config)#interface port-channel 1
            3550(config-if)# switchport mode trunk
            3550(config-if)#ip address 100.1.1.1 255.255.255.0
            注意:在3550这样的交换机上,所有接口默认都是二层接口。首先需要将交换机的的二层接口改为三层接口。

3.5     配置etherchannel负载均衡和查看
          默认情况下是基于源MAC地址的负载均衡
(1)   port-channel load-balance [dst-mac|src-mac]
(2)    show etherchannel load-balance

3.6     Err-disable特性:
          接口如果进入err-disable状态:有两种方法恢复
(1)   手动恢复
           先shutdown、再no shutdown
(2)   自动恢复
            errdisable recovery cause {all|arp-inspection|bpduguard|link-flap} 指定原因
            errdisable recovery interval 30   指定自动恢复时间间隔




































发表于 2013-3-12 11:45:55 | 显示全部楼层
这位同学很认真嘛,坚持
发表于 2013-3-12 15:07:25 | 显示全部楼层
杰作杰作,支持支持……
 楼主| 发表于 2013-3-12 15:46:59 | 显示全部楼层
bookpig 发表于 2013-3-12 15:07
杰作杰作,支持支持……


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-4-26 17:25 , Processed in 0.080948 second(s), 18 queries , Gzip On.

快速回复 返回顶部 返回列表