EtherChannel配置实例
网络互连技术-多链路聚合提升链路可靠性EtherChannel(链路聚合)

• 链路聚合是把两台交换机之间地多条物理链路组合成一条逻辑链路使用,同时传输数据流量。链路聚合 在园区网经常使用,提高链路地带宽,提高网络地可靠性
单丝不成线,独木不成林,个地力量是微弱地,整体地力量无穷无 尽,团结就有力量与智慧。
在几千年历史长河,始终团结一心,同舟济,建立了统一地多族家, 发展了56个族多元一体,交织交融地融洽族关系,形成了守望相助地 族大家庭。
今天,取得地令世瞩目地发展成就,更是全各族同心同德,同心同 向努力地结果,团结就是力量,团结才能前进。
三. 课堂练习
在研发部地接入交换机Switch1与信息部地核心 交换机MS0之间增加一条冗余链路,并用 EtherChannel技术将两条物理链路捆绑成一条逻 辑链路,提高网络地可靠性。
《网络互联技术任务驱动式教程》
四. 小贴士
链路聚合将多条物理链路捆绑成一条逻辑链路,提升网络带宽与 可靠性,解决了单根线缆传输带宽不足与单点故障地问题。
《网络互联技术任务驱动式教程》
生产力=人网络n
《网络互联技术任务驱动式教程》
网络互联技术
项目6 提升项目可靠性
任务2:多链路聚合提升链路可靠性——EtherChannel(链路 聚 合)
2020年9月
目录
任务目的 引入 链路聚合配置步骤 课堂练习
小贴士
《网络互联技术任务驱动式教程》
任务目的
• 通过配பைடு நூலகம்链路聚合提高链路地带宽与可靠性。
《网络互联技术任务驱动式教程》
一. 引入
交换环路上各端口地角色
二层的EtherChannel和三层的EtherChannel

Switch(config-if)#switchport mode trunk
三层EtherChannel配置:
interface range FastEthernet0/1 – 3
shutdown
注意事项:
3550上可能会出Command rejected(Packet Tracer5.3也是如此)要先封装协议,再起trunk。
Switch(config)#int f0/5
Switch(config-if)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is “Auto” can not be configured to “trunk” mode.
请注意甄别内容中的联系方式诱导购买等信息谨防诈骗
二层的EtherChannel和三层的EtherChannel
二层EtherChannel配置:
Switch(config)#int range f0/1 – 2
Switch(config-if-range)#channel-group 1 mode active
no shutdown
注意事项:
shutdown 可以不用,但会弹出很多接口信息
Packet Tracer 5.3做实验时,range可能配不了channel-group单个接口进入配置即可。
删掉EtherChannel
no int po 1
default f0/1 – 3
Switch(ቤተ መጻሕፍቲ ባይዱonfig)#int port-channel 1
AIXEtherchannel配置

Etherchannel介绍在AIX操作系统中,用户可以配置多个EtherChannel(网卡绑定)。
在AIX 5.2之前,我们要么只能选择active/active EtherChannel模式,要么,只能选择active/standby EtherChannel模式的绑定网卡。
所以,AIX 5.2中引入了新的网卡后备模式,用户可以为整个EtherChannel指定一块备份网卡,当整个EtherChannel失效时,这块网卡会自动顶替EtherChannel的功能。
这与AIX 5.2之前的EtherChannel网卡备份模式有很大区别,因此,在5.2以后可以出现更为复杂的复合网卡绑定模式。
一个EtherChannel中可以有2到8块网卡,一个AIX操作系统中可以配置多个EtherChannel。
但要记住每个EtherChannel都是一个新的以太网接口,用户也许需要通过no命令调整ifsize参数的值来保证以太网卡和EtherChannel的总数不超过ifsize,ifsize的默认值是8。
您可以使用任何AIX系统支持的网卡来组建EtherChannel。
但EtherChannel 的同一个通道成员网卡必须连接到支持EtherChannel的交换机上,备用通道可以接入到另外一个交换机,用于主通道的失败接管。
EtherChannel的所有成员网卡都应该设置成同样的速度和工作模式,如1000兆全双工。
要用作EtherChannel成员的网卡不能配置IP地址,如果已经配置了,必须要在开始配置EtherChannel前删除这些配置。
在Aix5.2以后,我们看看三种典型的配置方式1、双通道或者多通道的共同active模式,这个模式下,所有的网卡都处于active状态,也就是每个网卡都处于工作状态,他们共有一个IP地址与MAC地址,但是,所有网卡的目标必须在同一个交换机上,并且交换机的对应端口也要绑定。
这样做最大的好处就是,当其中一个网卡失效,或者一根网线失效的时候,不影响整个网络的工作,只有当所有的网卡通道失效的时候,网络才失效。
EtherChannel

EtherChannel配置EtherChannel简介:EtherChannel(以太通道)是由Cisco公司开发的,应用于交换机之间的多链路捆绑技术。
它的基本原理是:将两个设备间多条快速以太或千兆以太物理链路捆绑在一起组成一条逻辑链路,从而达到带宽倍增的目的。
除了增加带宽外,EtherChannel还可以在多条链路上均衡分配流量,起到负载分担的作用;在一条或多条链路故障时,只要还有链路正常,流量将转移到其他的链路上,整个过程在几毫秒内完成,从而起到冗余的作用,增强了网络的稳定性和安全性。
EtherChannel中,负载在各个链路上的分布可以根据源IP地址、目的IP地址、源MAC地址、目的MAC地址、源IP地址和目的IP地址组合、源MAC地址和目的MAC地址组合等来进行分布。
1、实验目的通过本实验可以掌握:○1EtherChannel的工作原理。
○2EtherChannel的配置。
2、实验拓扑EtherChannel配置实验拓扑如图所示。
3、实验步骤构成EtherChannel的端口必须具有相同的特性,如双工模式、速度、Trunking的状态等。
配置EtherChannel有手动配置和自动配置(PAGP或者LAGP)两种方法,自动配置就是让EtherChannel协商协议自动协商EtherChannel的建立。
(1) 手动配置EtherChannelS1 (config)#interface port-channel 1//以上是创建以太通道,要指定一个唯一的通道组号,组号的范围是1~6的正整数。
要取消EtherChannel时用“no interface port-channel 1”S1(config)#interface f0/13S1(config-if)#channel-group 1 mode onS1(config)#interface f0/14S1(config-if)#channel-group 1 mode on//以上将物理接口指定到已创建的通道中。
Etherchannel环境下更换网卡

Etherchannel环境下更换网卡环境:AIX OSLevel:5304CSPEtherchannel配置模式:标准,backup模式。
此处Etherchanel的虚拟网卡为ent4,物理主网卡为ent2,物理备网卡为ent3 步骤:1. 使用命令entstat -d ent4查看当前Etherchannel状态查看当前Etherchannel网卡的状态,例如:# entstat -d ent4 | egrep -e "ETHERNET|Link Status|Active channel|Media Speed" ETHERNET STATISTICS (ent4) :Active channel: primary channelETHERNET STATISTICS (ent2) :Link Status : UpMedia Speed Selected: 100 Mbps Full DuplexMedia Speed Running: 100 Mbps Full DuplexETHERNET STATISTICS (ent3) :Link Status : DownMedia Speed Selected: 100 Mbps Full DuplexMedia Speed Running: Unknown注意当前“Active channel”是Primary Channel还是Secondary Channel查看ent2和ent3的link status是Up还是Down2. 如果需要更换的是主网卡ent2,而当前“Active Channel”仍是Primary Channel,则当前ent2上还有网络流量,需要首先进行链路的主备网卡切换,确保需要更换的主网卡ent2上没有网络流量# /usr/lib/methods/ethchan_config -f ent4更换主网卡ent2:1.从etherchannel删除主网卡/usr/lib/methods/ethchan_config -d ent4 ent22.删除并热插拔主网卡3.添加主网卡到etherchannel/usr/lib/methods/ethchan_config -a ent4 ent23. 如果需要更换的是备网卡ent3,而当前“Active Channel”是Secondary Channel,则当前ent3上还有网络流量,需要首先进行链路的主备网卡切换,确保需要更换的备网卡ent3上没有网络流量# /usr/lib/methods/ethchan_config -f ent4更换备网卡ent3:1.从etherchannel删除备网卡/usr/lib/methods/ethchan_config -d ent4 ent32.删除并热插拔备网卡3.添加备网卡到etherchannel/usr/lib/methods/ethchan_config -a -b ent4 ent3完!附录ethchan_config命令说明man ethchan_configCommands Reference, Volume 2, d - h ethchan_config CommandPurposeAdds adapters to an EtherChannel or removes adapters from an EtherChannel.Syntaxethchan_config { -a [ -b ] | -d } EtherChannel Adapterethchan_config -c EtherChannel Attribute NewV alueethchan_config -f EtherChannelDescriptionThis command adds adapters to an EtherChannel or removes adapters from an EtherChannel. This command can also be used tomodify EtherChannel attributes. These additions, deletions or modifications can take place even if the EtherChannel'sinterface is currently configured; that is, it is not necessary to detach the EtherChannel's interface to add or removeadapters or modify most EtherChannel attributes.Flags-aAdds the specified Adapter to the specified EtherChannel. If the adapter must be added as a backup adapter, the -bflag must be specified.-bSpecifies that the Adapter is being added as a backup adapter. This flag is only valid when used with the -a flag.-cChanges the specified Attribute of the specified EtherChannel attribute to the specified NewValue.-dDeletes the specified Adapter from the specified EtherChannel. The -b flag should not be used with the -d flag.-fForces a failover of the specified EtherChannel. Note that the failover will only actually occur if the adapter in theidle channel is up: if the adapter in the idle channel is down, the EtherChannel will keep operating on the active oneand no failover will take place.ParametersAdapterSpecifies the adapter to add or delete.AttributeSpecifies an attribute of the specified EtherChannel.EtherChannelSpecifies the EtherChannel.NewValueSpecifies the new value for the specified attribute of the specified EtherChannel.Exit StatusThe command completed successfully.>0An error occurred.Examples1 To add the adapter ent0 as the backup adapter in the EtherChannel called ent7, type:/usr/lib/methods/ethchan_config -a -b ent7 ent02 To change the address to ping attribute of an EtherChannel called ent7 to type:/usr/lib/methods/ethchan_config -c ent7 netaddr 3 To force a failover of an EtherChannel called ent7 from the currently active channel to the idle channel, type:/usr/lib/methods/ethchan_config -f ent7RestrictionsThe use of the use_jumbo_frame attribute cannot be modified by this command. Attempting to do so will print out an errormessage.Location/usr/lib/methodsAIX33:/>。
思科Etherchannel链路聚合原理与配置方法详解

思科Etherchannel链路聚合原理与配置⽅法详解本⽂讲述了思科Etherchannel链路聚合原理与配置⽅法。
分享给⼤家供⼤家参考,具体如下:Etherchannel(以太⽹信道)将多个(2-8,2-16)接⼝,逻辑的整合为⼀个接⼝,来转发流量,减少了阻塞端⼝的数量,提⾼了链路带宽,增加了⽹络的稳定性1.1 封装模式1.1.1 PAGP端⼝聚合协议,cisco私有,通过发送慢速hello(30s),协商成为echerchannel,最⼤⽀持在8条链路的协商,链路数量必须为2^x,2 4 8desirable:主动模式auto:auto模式包含了silent模式(安静模式),可以进⾏etherchannel协商1.1.2 LACP链路聚合控制协议(仅⽀持全双⼯接⼝),公有协议。
发送LACPDU进⾏以太信道的协商,最⼤⽀持在16条链路上进⾏以太信道协商,2 4 8 16,默认仅仅使⽤8条。
当使⽤16条链路进⾏协商,选择8条为主链路,其余8条为备份链路。
选择⽅法:1.较⼩优先级(优先级默认32768),2.最⼩的PID模式:active(主动)passive(被动)1.1.3 on模式⼿⼯模式,on模式不能与任何动态PAgP或LAGP建⽴ethechannel。
被动与被动不能形成.1.2 Ethechannel配置1.2.1 配置指南1.通道内所有端⼝必须⽀持ethechannel;同时注意必须连接相同设备(同⼀设备,同本地类型相同)2.这些物理接⼝必须具有相同的速率和双⼯模式(LACP必须为全双⼯)3.通道内不得使⽤span;若为三层通道,IP地址必须配置到逻辑接⼝上(channel-group)4.三层通道内的所有物理接⼝必须为三层接⼝,然后再channel⼝上配置IP地址5.若为⼆层通道,这些物理接⼝应该属于同⼀vlan或者均为trunk⼲道,且封装的类型⼀致,vlan的允许列表必须⼀致6.通道的属性改变将同步到物理接⼝,反之也可;若物理没有全部down,通道依然正常同时配置所有物理接⼝,或者之恶配置channel⼝,均可修改接⼝的属性1.2.2 ⼆层ethechannel配置SW1(config)#int range e0/1-2SW1(config-if-range)#channel-group 1 mode onSW1(config-if-range)#interface port-channel 1 #对逻辑接⼝进⾏管理SW1(config-if)#switchport trunk encapsulation dot1q #修改trunk封装模式SW1(config-if)#switchport mode trunk1.2.3三层ethechannel配置在没有三层ethechannel时,三层链路依然可以使⽤负载均衡来进⾏通信;建⽴三层ethechannel后,可以节省IP地址⽹段,间路路由条⽬的编辑(⼀般配置在核⼼层)SW1(config)#int range e0/1-2SW1(config-if-range)#no switchportSW1(config-if-range)#channel-group 1 mode onSW1(config-if-range)#exitSW1(config)#int port-channel 1 #在通道接⼝上配置IP地址SW1(config-if)#ip add 192.168.1.1 255.255.255.05.3 配置channel时的注意点⼆层通道基于负载分担转发流量,三层通道基于负载均衡转发流量负载均衡:访问同⼀⽬标时,将流量按为单位分割后,沿多条路径同时传输负载分担:访问不同⽬标时基于不同链路,或者不同元在访问⽬标时基于不同链路基于不同源MAC(src-mac)为默认规则。
思科聚合组实验报告

一、实验目的1. 理解并掌握思科链路聚合(EtherChannel)的基本概念和技术原理。
2. 学习配置思科交换机上的聚合组,包括物理链路的聚合、聚合模式的设置以及链路聚合的配置和验证。
3. 通过实验验证聚合组在提高网络带宽和冗余性方面的作用。
二、实验环境1. 设备:两台思科交换机(如:Catalyst 3560系列)、两台PC终端、网线若干。
2. 软件:思科IOS软件或模拟器(如:GNS3)。
三、实验原理链路聚合(EtherChannel)是一种将多个物理链路捆绑成一个逻辑链路的技术,从而实现更高的带宽和冗余性。
在思科交换机上,可以通过配置聚合组来实现链路聚合。
四、实验步骤1. 物理连接:将两台交换机的指定端口通过网线连接,形成物理链路。
2. 配置交换机:- 进入交换机配置模式。
- 配置端口模式为trunk。
- 创建聚合组,并将物理端口加入到聚合组中。
- 配置聚合模式(如:LACP、PAgP或on)。
- 配置负载均衡策略(如:源MAC地址、目标MAC地址等)。
3. 验证配置:- 使用show etherchannel summary命令查看聚合组的建立情况。
- 使用show etherchannel port命令查看聚合端口的带宽和状态。
- 在PC终端上测试网络连通性,验证聚合组是否正常工作。
五、实验结果与分析1. 聚合组建立情况:通过show etherchannel summary命令,可以看到聚合组的建立情况,包括聚合组ID、端口状态、链路状态等。
2. 聚合端口带宽:通过show etherchannel port命令,可以看到聚合端口的带宽和状态,包括端口聚合状态、带宽利用率等。
3. 网络连通性测试:在PC终端上测试网络连通性,可以发现聚合组正常工作,提高了网络带宽和冗余性。
六、实验总结通过本次实验,我们成功配置了思科交换机上的聚合组,并验证了其在提高网络带宽和冗余性方面的作用。
实验结果表明,链路聚合是一种有效的网络技术,可以满足大型网络对带宽和可靠性的需求。
STP和EtherChannel 及部署HSRP三个实验文档

生成树协议,EtherChannel及、部署HSRP实验1、STP将SW2配置为所有奇数VLAN的根交换机将SW1配置为所有偶数VLAN的根交换机2、EtherChannel在SW1和SW2之间部署以太通道,分别使用PAGP、LACP、手动模式3、部署HSRP要求:PC1为active设备PC2为standby设备。
当PC1故障,PC2能够自动接替工作。
当PC1恢复正常,能够自动切换回Active状态。
LAB1:STP 将SW2配置为所有奇数VLAN的根交换机,将SW1配置为所有偶数VLAN的根交换机。
SW1配置:(假设奇数vlan有vlan1,vlan3,vlan5,vlan7,vlan9)SW1#conf tEnter configuration commands, one per line. End with CNTL/Z.SW1(config)#interface range ethernet 0/2-3 //进入E0/2和E0/3接口SW1(config-if-range)#switchport trunk encapsulation dot1q //接口封装dot1qSW1(config-if-range)#switchport mode trunk //接口设置为trunkSW1(config-if-range)#exitSW1(config)#SW1(config)#vlan 2 //创建vlan2SW1(config-vlan)#vlan 3 //创建vlan3SW1(config-vlan)#vlan 4 //创建vlan4SW1(config-vlan)#vlan 5 //创建vlan5SW1(config-vlan)#vlan 6 //创建vlan6SW1(config-vlan)#vlan 7 //创建vlan7SW1(config-vlan)#vlan 8 //创建vlan8SW1(config-vlan)#vlan 9 //创建vlan9SW1(config-vlan)#vlan 10 //创建vlan10SW1(config-vlan)#exitSW1(config)#spanning-tree mode mst //设置spanning-tree模式为mst SW1(config)#spanning-tree mst configuration //进入mst配置SW1(config-mst)#instance 1 vlan 1,3,5,7,9 //设置实例instance 1 关联奇数vlan SW1(config-mst)#instance 2 vlan 2,4,6,8,10 //设置实例instance 2关联奇数vlan SW1(config-mst)#name cisco //设置域名SW1(config-mst)#revision 1 //设置修订号SW1(config-mst)#exitSW1(config)#spanning-tree mst 1 root primary //设置mst 1本交换机的为根交换机SW1(config)#SW2配置:(假设偶数vlan有vlan2,vlan4,vlan6,vlan8.vlan10)SW2#conf tEnter configuration commands, one per line. End with CNTL/Z.SW2(config)#interface range ethernet 0/2-3 //进入E0/2和E0/3接口SW2(config-if-range)#switchport trunk encapsulation dot1q //接口封装dot1qSW2(config-if-range)#switchport mode trunk //接口设置为trunkSW2(config-if-range)#exitSW2(config)#SW2(config)#vlan 2 //创建vlan2SW2(config-vlan)#vlan 3 //创建vlan3SW2(config-vlan)#vlan 4 //创建vlan4SW2(config-vlan)#vlan 5 //创建vlan5SW2(config-vlan)#vlan 6 //创建vlan6SW2(config-vlan)#vlan 7 //创建vlan7SW2(config-vlan)#vlan 8 //创建vlan8SW2(config-vlan)#vlan 9 //创建vlan9SW2(config-vlan)#vlan 10 //创建vlan10SW2(config-vlan)#exitSW2(config)#spanning-tree mode mst //设置spanning-tree模式为mst SW2(config)#spanning-tree mst configuration //进入mst配置SW2(config-mst)#instance 1 vlan 1,3,5,7,9 //设置实例instance 1 关联奇数vlan SW2(config-mst)#instance 2 vlan 2,4,6,8,10 //设置实例instance 2关联奇数vlan SW2(config-mst)#name cisco //设置域名SW2(config-mst)#revision 1 //设置修订号SW2(config-mst)#exitSW2(config)#spanning-tree mst 2 root primary //设置mst 2本交换机的为根交换机SW2(config)#结果查看:LAB2: EtherChannel 在SW1和SW2之间部署以太通道,分别使用PAGP、LACP、手动模式.SW1配置:(手动模式)SW1>enable //用户模式进入到特权模式SW1#configure terminal //特权模式进入到全局配置模式Enter configuration commands, one per line. End with CNTL/Z.SW1(config)#interface range ethernet 0/2-3 //进入接口E0/2和E0/3SW1(config-if-range)#switchport trunk encapsulation dot1q //接口封装dot1qSW1(config-if-range)#switchport mode trunk //接口模式设置为trunkSW1(config-if-range)#shutdown //关闭接口SW1(config-if-range)#*Oct 27 17:19:17.164: %LINK-5-CHANGED: Interface Ethernet0/2, changed state toadministratively down*Oct 27 17:19:17.165: %LINK-5-CHANGED: Interface Ethernet0/3, changed state to administratively down*Oct 27 17:19:18.165: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to down*Oct 27 17:19:18.165: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to downSW1(config-if-range)#channel-group 6 mode on //手动开启channel通道Creating a port-channel interface Port-channel 6SW1(config-if-range)#no shutdown //开启接口SW1(config-if-range)#*Oct 27 17:19:51.060: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up*Oct 27 17:19:51.060: %LINK-3-UPDOWN: Interface Ethernet0/3, changed state to upSW1(config-if-range)#*Oct 27 17:19:53.076: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up*Oct 27 17:19:53.076: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to upSW1(config-if-range)#*Oct 27 17:19:55.080: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel6, changed state to upSW1(config-if-range)#SW2配置:(手动模式)SW2>enable //用户模式进入到特权模式SW2#configure terminal //特权模式进入到全局配置模式Enter configuration commands, one per line. End with CNTL/Z.SW2(config)#interface range ethernet 0/2-3 //进入接口E0/2和E0/3SW2(config-if-range)#switchport trunk encapsulation dot1q //接口封装dot1qSW2(config-if-range)#switchport mode trunk //接口模式设置为trunkSW2(config-if-range)#shutdown //关闭接口SW2(config-if-range)#*Oct 27 17:17:31.191: %LINK-5-CHANGED: Interface Ethernet0/2, changed state to administratively down*Oct 27 17:17:31.191: %LINK-5-CHANGED: Interface Ethernet0/3, changed state to administratively down*Oct 27 17:17:32.195: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to down*Oct 27 17:17:32.195: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to downSW2(config-if-range)#channel-group 6 mode on //手动开启channel通道Creating a port-channel interface Port-channel 6SW2(config-if-range)#no shutdown //开启接口*Oct 27 17:19:57.829: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up*Oct 27 17:19:57.829: %LINK-3-UPDOWN: Interface Ethernet0/3, changed state to up*Oct 27 17:19:58.835: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up*Oct 27 17:19:58.836: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to upSW2(config-if-range)#*Oct 27 17:20:01.829: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel6, changed state to upSW2(config-if-range)#etherchannel通道查看:SW1和SW2配置(PAGP模式)SW1配置:SW1>enable //用户模式进入到特权模式SW1#configure terminal //特权模式进入到全局配置模式Enter configuration commands, one per line. End with CNTL/Z.SW1(config)#interface range ethernet 0/2-3 //进入接口E0/2和E0/3SW1(config-if-range)#switchport trunk encapsulation dot1q //接口封装dot1qSW1(config-if-range)#switchport mode trunk //接口模式设置为trunkSW1(config-if-range)#shutdown //关闭接口SW1(config-if-range)#*Oct 27 17:19:17.164: %LINK-5-CHANGED: Interface Ethernet0/2, changed state to administratively down*Oct 27 17:19:17.165: %LINK-5-CHANGED: Interface Ethernet0/3, changed state to administratively down*Oct 27 17:19:18.165: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to down*Oct 27 17:19:18.165: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to downSW1(config-if-range)#channel-group 8 mode desirable //开启channel通道协商Creating a port-channel interface Port-channel 8SW1(config-if-range)#no shutdown //开启接口SW1(config-if-range)#*Oct 27 17:19:51.060: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up*Oct 27 17:19:51.060: %LINK-3-UPDOWN: Interface Ethernet0/3, changed state to upSW1(config-if-range)#*Oct 27 17:19:53.076: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up*Oct 27 17:19:53.076: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to upSW1(config-if-range)#*Oct 27 17:19:55.080: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel8, changed state to upSW1(config-if-range)#SW2配置:SW2>enable //用户模式进入到特权模式SW2#configure terminal //特权模式进入到全局配置模式Enter configuration commands, one per line. End with CNTL/Z.SW2(config)#interface range ethernet 0/2-3 //进入接口E0/2和E0/3SW2(config-if-range)#switchport trunk encapsulation dot1q //接口封装dot1qSW2(config-if-range)#switchport mode trunk //接口模式设置为trunkSW2(config-if-range)#shutdown //关闭接口SW2(config-if-range)#*Oct 27 17:17:31.191: %LINK-5-CHANGED: Interface Ethernet0/2, changed state to administratively down*Oct 27 17:17:31.191: %LINK-5-CHANGED: Interface Ethernet0/3, changed state to administratively down*Oct 27 17:17:32.195: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to down*Oct 27 17:17:32.195: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3,changed state to downSW2(config-if-range)#channel-group 8 mode desirable //开启channel通道协商Creating a port-channel interface Port-channel 8SW2(config-if-range)#no shutdown //开启接口*Oct 27 17:19:57.829: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up*Oct 27 17:19:57.829: %LINK-3-UPDOWN: Interface Ethernet0/3, changed state to up*Oct 27 17:19:58.835: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up*Oct 27 17:19:58.836: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to upSW2(config-if-range)#*Oct 27 17:20:01.829: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel8, changed state to upSW2(config-if-range)#结果查看:SW1和SW2配置(LACP模式)SW1配置:SW1>enable //用户模式进入到特权模式SW1#configure terminal //特权模式进入到全局配置模式Enter configuration commands, one per line. End with CNTL/Z.SW1(config)#interface range ethernet 0/2-3 //进入接口E0/2和E0/3SW1(config-if-range)#switchport trunk encapsulation dot1q //接口封装dot1qSW1(config-if-range)#switchport mode trunk //接口模式设置为trunkSW1(config-if-range)#shutdown //关闭接口SW1(config-if-range)#*Oct 27 17:19:17.164: %LINK-5-CHANGED: Interface Ethernet0/2, changed state to administratively down*Oct 27 17:19:17.165: %LINK-5-CHANGED: Interface Ethernet0/3, changed state to administratively down*Oct 27 17:19:18.165: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to down*Oct 27 17:19:18.165: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to downSW1(config-if-range)#channel-group 1 mode active //开启channel通道协商Creating a port-channel interface Port-channel 1SW1(config-if-range)#no shutdown //开启接口SW1(config-if-range)#*Oct 27 17:19:51.060: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up*Oct 27 17:19:51.060: %LINK-3-UPDOWN: Interface Ethernet0/3, changed state to upSW1(config-if-range)#*Oct 27 17:19:53.076: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up*Oct 27 17:19:53.076: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to upSW1(config-if-range)#*Oct 27 17:19:55.080: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to upSW1(config-if-range)#SW2配置:SW2>enable //用户模式进入到特权模式SW2#configure terminal //特权模式进入到全局配置模式Enter configuration commands, one per line. End with CNTL/Z.SW2(config)#interface range ethernet 0/2-3 //进入接口E0/2和E0/3SW2(config-if-range)#switchport trunk encapsulation dot1q //接口封装dot1qSW2(config-if-range)#switchport mode trunk //接口模式设置为trunkSW2(config-if-range)#shutdown //关闭接口SW2(config-if-range)#*Oct 27 17:17:31.191: %LINK-5-CHANGED: Interface Ethernet0/2, changed state to administratively down*Oct 27 17:17:31.191: %LINK-5-CHANGED: Interface Ethernet0/3, changed state to administratively down*Oct 27 17:17:32.195: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to down*Oct 27 17:17:32.195: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to downSW2(config-if-range)#channel-group 1 mode active //开启channel通道协商Creating a port-channel interface Port-channel 1SW2(config-if-range)#no shutdown //开启接口*Oct 27 17:19:57.829: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up*Oct 27 17:19:57.829: %LINK-3-UPDOWN: Interface Ethernet0/3, changed state to up*Oct 27 17:19:58.835: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up*Oct 27 17:19:58.836: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to upSW2(config-if-range)#*Oct 27 17:20:01.829: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to upSW2(config-if-range)#结果查看:LAB3、部署HSRP要求:PC1为active设备PC2为standby设备。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
<EtherChannel>
·通过这个技术能够将多个物理端口绑定为一个逻辑端口
通过多个端口绑定,能充分利用现有端口来增加带宽。
·Cisco交换机最多允许绑定8个端口。
如果是快速以太网,总带宽可达1600Mbit/s
如果是Gbit以太网,总带宽可达16Gbit/s
·绑定后的端口默认继承原来物理接口的配置模式。
·etherchannel不支持10M端口的绑定
·cisco的交换机不仅可以支持第二层etherchannel,还可以支持第三层etherchannel。
·一个etherchannel内所有的端口都必须具有相同的速率和双工模式。
LACP只能是全双工。
二层接口和三层接口的区别:
二层接口不能配置IP地址,不能宣告进路由协议,只能对二层以太网帧进行转发。
三层接口可以配置IP地址,可运行路由协议,能接收IP包并且转发。
EtherChannel的模式:
可以直接将物理端口绑定,也可以让两台交换机之间通过协议进行协商,来形成channel通道。
On模式:不协商,直接配etherchannel
SW1、SW2:
int range f0/23 ,f0/24
channel-group 1 mode on 将这两个接口绑定为一组并指定on模式
interface port-channel 1
switchport mode trunk 指定接口模式为trunk,如不指定,会自动继承物理接口的模式
show etherchannel summary 可以看到绑定了多少接口
Show interface etherchannel
Port Aggregation Protocol (PAgP)端口汇聚协议
Cisco私有技术,这个协议又有两种模式:
auto:被动
Desirable:主动会发也会收协商消息
SW1:
int range f0/23 ,f0/24
channel-group 1 mode desible
SW2:
int range f0/23 ,f0/24
channel-group 1 mode auto
interface port-channel 1
switchport mode trunk
Link Aggregation Control Protocol (LACP) 链路聚合控制协议802.3ad,业界标准
Passvie相当于PAgP的auto
Active相当于PAgP的desirable 又发又收协商消息
SW1:
int range f0/23 ,f0/24
channel-group 1 mode passive
SW2:
int range f0/23 ,f0/24
channel-group 1 mode active
interface port-channel 1
switchport mode trunk
show etherchannel 1 summary
show etherchannel summary 查看所有的group
还有一种好的办法是先对每个接口封装trunk,再划入channel-group中,channel-group接口会自动继承trunk
注:channel-group接口会自动继承第一个物理接口的接口配置模式,或最先配置的接口模式。
配置三层channel
所谓三层的channel其实就是将多个三层接口绑定。
只能在三层交换机上配置。
在3550这样的交换机上,所有接口默认都是二层接口。
首先需要将交换机的的二层接口改为三层接口。
可用以下命令实现:
将二层接口改成三层接口:
interface range f0/23 - 24
no switchport
然后再绑定:
interface range f0/23 - 24
channel-group 1 mode desirable
给channel通道配上IP地址:
interface port-channel 1
ip address 100.1.1.1 255.255.255.0
配置etherchannel负载均衡
默认情况下是基于源MAC地址的负载均衡
port-channel load-balance [dst-mac|src-mac] show etherchannel load-balance。