Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementing Spanning Tree

Similar presentations


Presentation on theme: "Implementing Spanning Tree"— Presentation transcript:

1 Implementing Spanning Tree
Configuring Link Aggregation with EtherChannel

2 EtherChannel Logical aggregation of similar links(逻辑的聚合)
Load balances(负载均衡) Viewed as one logical port(逻辑的一个端口) Redundancy(具有冗余性) 提高吞吐量! 最多捆绑8个端口,但端口介质类型,速度,双工等都必须相同,包括本征,总之都得相同

3 Dynamic Trunk Negotiation Protocols
PAgP(端口聚合协议) Cisco proprietary LACP (链路聚合控制协议) IEEE 802.3ad standard

4 About EtherChannel Configuration Commands
Configure PAgP interface port-channel {channel-group-number} channel-protocol pagp channel-group 1 mode {mode} Verify show interfaces fastethernet 0/1 etherchannel show etherchannel 1 port-channel show etherchannel 1 summary

5 Pagp配置举例 On:无条件建立,不协商(不发送pagp数据包) Auto:自动,被动状态等待请求 Desirable:主动请求
Sw(config)# int range xx,xx-xx # channel-protocol pagp # channel-group number mode | on | auto | desirable On:无条件建立,不协商(不发送pagp数据包) Auto:自动,被动状态等待请求 Desirable:主动请求 默认为“silent”。沉默设置被用于连接到文件服务器或包分析仪如果交换机连接到有PAgP能力的伙伴(如果15s没有收到数据包,建立以太信道),也可以将接口配置为non silent(非沉默),不收到pagp数据包不建立以太信道。 注意:2层EtherChannel其实可以不需要配置interface port-channel 的,直接指定完物理接口属性就完事。(port channel是channel group中的所有接口虚拟出来的一个虚拟接口 )

6 Pagp

7 Lacp配置举例 Sw(config)# lacp system-priority x (1-65535,默认32768)
Sw(config)# int range xx,xx-xx # channel-protocol lacp # channel-group number mode {active | on | passive} # lacp port-priority x ( ,默认32768) lacp system-priority:此命令定义lacp系统优先级,小的胜出。信道的管理者。 Active:主动请求 On:无条件建立 Passive:被动等待请求 lacp port-priority:定义活动接口, 小的为活动接口,大的是备用的。 注意:以太信道on模式不发送接收pagp(lacp)数据包,所以2端都得on Desirable(active)模式,请求远端建立信道,另一端必须是主动或被动 2端都被动的不能建立信道

8 Lacp

9 Configuring Layer 2 EtherChannel
Switch(config)#interface range interface slot/port - port Specifies the interfaces to configure in the bundle Switch(config-if-range)#channel-protocol {pagp | lacp} Specifies the channel protocol—either PAgP or LACP Switch(config-if-range)#channel-group number mode {active | on | auto | desirable | passive} Creates the port-channel interface and places the interfaces as members 在配置lacp的时候可以设置优先级,系统优先级以及端口优先级,越小越好 Switch(config)# lacp system-priority( /32768) Switch(config-interf)# lacp port-priority( /32768) 选择系统优先级小的,由它来决定以太信道的组成,如果一样,比较mac。端口优先级小的参加链路捆绑,大的为备用

10 Configuring Layer 2 EtherChannel
Switch# configure terminal Switch(config)# interface range gigabitethernet0/1 -2 Switch(config-if-range)# switchport mode access Switch(config-if-range)# switchport access vlan 10 Switch(config-if-range)# channel-group 5 mode desirable Switch(config-if-range)# end Switch# configure terminal Switch(config)# interface range gigabitethernet0/1 -2 Switch(config-if-range)# switchport trunk encapsulation isl Switch(config-if-range)# switchport mode trunk Switch(config-if-range)# channel-group 5 mode desirable Switch(config-if-range)# end 注意:这些汇聚的端口属性必须的相同!

11 Configuring Layer 2 EtherChannel
我们也可以这样配置2层: 1 进入接口 2 配置channel-group 协议 3 配置channel-group 模式 4 进入interface port-channel 5 配置interface port-channel的额外参数(比如access类型,trunk类型,trunk allowed等)

12 Configuring Layer 3 EtherChannel
二层接口和三层接口的区别: 二层接口不能配置IP地址,不能宣告进路由协议,只能对二层以太网帧进行转发。 三层接口可以配置IP地址,可运行路由协议,能接收IP包并且转发。

13 Configuring Layer 3 EtherChannel
Switch(config)#interface port-channel port-channel-number Creates a port-channel interface Switch(config-if)#no switchport Switch(config-if)#ip address address mask Specifies L3 and assigns an IP address and subnet mask to the EtherChannel Switch(config)#interface interface slot/port Specifies an interface to configure Switch(config-if)#no switchport Switch(config-if)#channel-group number mode {auto | desirable | on} Configures the interface as L3 and specifies the port channel and the PAgP mode

14 Configuring Layer 3 EtherChannel
Switch# configure terminal Switch(config)# interface port-channel 5 Switch(config-if)# no switchport Switch(config-if)# ip address Switch(config-if)# interface range gigabitethernet0/1 -2 Switch(config-if-range)# no ip address Switch(config-if-range)# no switchport Switch(config-if-range)# channel-group 5 mode desirable Switch(config-if-range)# end *:Port-channel配置了IP地址,物理接口上不能配IP地址

15 EtherChannel配置注意 EtherChannel配置注意
1、Catalyst最多支持8个端口进行捆绑,并且不支持10Mbit/s的端口。 2、一个EtherChannel的所有端口必须使用相同协议,PAgP或者LACP。 3、一个EtherChannel的所有端口具有相同的速度和双工模式,LACP要求端口只能工作在全双工模式。 4、一个端口不能同时属于多个通道组。 5、一个EtherChannel的所有端口必须分配到相同的接入Vlan中,或者Trunk干道中,但这个Trunk干道必须有相同的Vlan许可列表和相同的Native Vlan。 6、一个EtherChannel的所有端口应该配置相同的干道模式。 7、一个EtherChannel的所有端口要求具有相同的Vlan配置。 8、如果某个端口被配置成为SPAN(SPAN技术主要是用来监控交换机上的数据流 ),那么就不允许捆绑成EtherChannel。

16 Verifying EtherChannel
Switch#show running-config interface port-channel num Displays port-channel information Switch#show running-config interface interface x/y Displays interface information Switch#show run interface port-channel 1 Building configuration... Current configuration : 66 bytes ! interface Port-channel1 switchport mode dynamic desirable end Switch#show run interface gig 0/9 Building configuration... Current configuration : 127 bytes ! interface GigabitEthernet 0/9 switchport mode dynamic desirable channel-group 2 mode desirable channel-protocol pagp end interface Port-channel2 switchport trunk encapsulation dot1q switchport mode trunk switchport nonegotiate no ip address ! interface GigabitEthernet0/9 description DSW121 0/ DSW122 0/9-10 duplex full speed 100 channel-group 2 mode desirable interface GigabitEthernet0/10

17 Verifying EtherChannel (Cont.)
Switch#show interfaces gigabitethernet 0/9 etherchannel Port state = Up Mstr In-Bndl Channel group = Mode = Desirable-Sl Gcchange = 0 Port-channel = Po GC = 0x Pseudo port-channel = Po1 Port index = Load = 0x00 Flags: S - Device is sending Slow hello. C - Device is in Consistent state. A - Device is in Auto mode P - Device learns on physical port. d - PAgP is down. Timers: H - Hello timer is running Q - Quit timer is running. S - Switching timer is running. I - Interface timer is running. Local information: Hello Partner PAgP Learning Group Port Flags State Timers Interval Count Priority Method Ifindex Gi0/9 SC U6/S7 H s Any Partner's information: Partner Partner Partner Partner Group Port Name Device ID Port Age Flags Cap. Gi0/9 DSW e Gi0/ s SC Age of the port in the current state: 00d:20h:00m:49s

18 Guidelines for Configuring EtherChannel

19 Guidelines for Configuring EtherChannel (Cont.)

20 EtherChannel Guidelines
Switch#show run interface FastEthernet0/9 description DSW121 0/ DSW122 0/9-10 switchport trunk encapsulation dot1q switchport trunk allowed vlan 1,21-28 switchport mode trunk switchport nonegotiate duplex full speed 100 channel-group 2 mode desirable ! interface FastEthernet0/10

21 EtherChannel Load Balancing
Switch(config)# port-channel load-balance src-mac

22 Configuring EtherChannel Load Balancing
Switch(config)#port-channel load-balance type Configures EtherChannel load balancing 以太信道中不是平均的分配流量,而是根据散列算法的结果来决定将数据转发到哪。可以根据:源ip,目的ip,源目的ip的组合,源mac,目的mac,源目的mac组合,端口号。 可以根据位,或者xor(异或),来算结果。源目的组合的按xor,其他按位算 只有多层交换机可按照端口来计算。 Switch#show etherchannel load-balance Source XOR Destination IP address *用变化最多的方法做负载均衡

23 Summary EtherChannel increases bandwidth and provides redundancy by aggregating individual links between switches. EtherChannel can be dynamically configured between switches using either PAgP or LACP. Etherchannel is configured and verified using a variety of show commands. Best practices should be followed for EtherChannel configuration. EtherChannel load balances traffic over all the links in the bundle.

24


Download ppt "Implementing Spanning Tree"

Similar presentations


Ads by Google