技术标签: 组网实验 交换机的链路聚合 计算机网络 网络连接
交换机链路聚合 一、 实验目的 1、 了解链路聚合技术的使用场合; 2、 熟练掌握链路聚合技术的配置。 二、 应用环境 两个实验室分别使用一台交换机提供20多个信息点,两个实验室的互通通过一根级联网线。每个实验室的信息点都是百兆到桌面。两个实验室之间的带宽也是100M,如果实验室之间需要大量传输数据,就会明显感觉带宽资源紧张。当楼层之间大量用户都希望以100M传输数据的时候,楼层间的链路就呈现出了独木桥的状态,必然造成网络传输效率下降等后果。 解决这个问题的办法就是提高楼层主交换机之间的连接带宽,实现的办法可以是采用千兆端口替换原来的100M端口进行互联,但这样无疑会增加组网的成本,需要更新端口模块,并且线缆也需要作进一步的升级。另一种相对经济的升级办法就是链路聚合技术。 顾名思义,链路聚合,是将几个链路作聚合处理,这几个链路必须是同时连接两个相同的设备的,这样,当作了链路聚合之后就可以实现几个链路相加的带宽了。比如,我们可以将4个100M链路使用链路聚合作成一个逻辑链路,这样在全双工条件下就可以达到800M的带宽,即将近1000M的带宽。这种方式比较经济,实现也相对容易。 三、 实验设备 1、 DCS-3926S交换机2台 2、 PC机2台 3、 Console线1-2根 4、 直通网线4-8根 四、 实验拓扑
五、 实验要求
如果链路聚合成功,则PC1可以ping 通PC2。 六、 实验步骤 第一步:正确连接网线,交换机全部恢复出厂设置,做初始配置,避免广播风暴出现 交换机A: switch#config switch(Config)#hostname switchA switchA(Config)#interface vlan 1 switchA(Config-If-Vlan1)#ip address 192.168.1.11 255.255.255.0 switchA(Config-If-Vlan1)#no shutdown switchA(Config-If-Vlan1)#exit switchA(Config)#spanning-tree MSTP is starting now, please wait........... MSTP is enabled successfully. switchA(Config)#
交换机B: switch#config switch(Config)#hostname switchB switchB(Config)#interface vlan 1 switchB(Config-If-Vlan1)#ip address 192.168.1.12 255.255.255.0 switchB(Config-If-Vlan1)#no shutdown switchB(Config-If-Vlan1)#exit switchB(Config)#spanning-tree MSTP is starting now, please wait........... MSTP is enabled successfully. switchB(Config)#
第二步:创建port group 交换机A: switchA(Config)#port-group 1 switchA(Config)# 验证配置: switchA#show port-group detail Sorted by the ports in the group 1: -------------------------------------------- switchA#show port-group brief Port-group number : 1 Number of ports in port-group : 0 Maxports in port-channel = 8 Number of port-channels : 0 Max port-channels : 1
switchA# 交换机B switchB(Config)#port-group 2 switchB(Config)# 第三步:手工生成链路聚合组(第三、四步任选其一操作) 交换机A: switchA(Config)#interface ethernet 0/0/1-2 switchA(Config-Port-Range)#port-group 1 mode on switchA(Config-Port-Range)#exit switchA(Config)#interface port-channel 1 switchA(Config-If-Port-Channel1)# 验证配置: switchA#show vlan VLAN Name Type Media Ports ---- ------------ ---------- --------- ------------------- 1 default Static ENET Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8 Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16 Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24 Port-Channel1 switchA# !port-channel1已经存在
交换机B: switchB(Config)#int e 0/0/3-4 switchB(Config-Port-Range)#port-group 2 mode on switchB(Config-Port-Range)#exit switchB(Config)#interface port-channel 2 switchB(Config-If-Port-Channel2)# 验证配置: switchB#show port-group brief Port-group number : 2 Number of ports in port-group : 2 Maxports in port-channel = 8 Number of port-channels : 1 Max port-channels : 1
switchB#
第四步: LACP动态生成链路聚合组(第三、四步任选其一操作) switchA(Config)#interface ethernet 0/0/1-2 switchA(Conifg-Port-Range)#port-group 1 mode active switchA(Config)#interface port-channel 1 switchA(Config-If-Port-Channel1)# 验证配置: switchA#show vlan VLAN Name Type Media Ports ---- ------------ ---------- --------- ------------------- 1 default Static ENET Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8 Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16 Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24 Port-Channel1 switchA# !port-channel1已经存在
交换机B: switchB(Config)#interface ethernet 0/0/3-4 switchB(Conifg-Port-Range)#port-group 2 mode passive switchB(Config)#interface port-channel 2 switchB(Config-If-Port-Channel2)# 验证配置: switchB#show port-group brief Port-group number : 2 Number of ports in port-group : 2 Maxports in port-channel = 8 Number of port-channels : 1 Max port-channels : 1 switchB#
第九步:使用ping命令验证 使用PC1 ping PC2
七、 注意事项和排错 1、 为使Port Channel正常工作,Port Channel的成员端口必须具备以下相同的属性: a) 端口均为全双工模式; b) 端口速率相同; c) 端口的类型必须一样,比如同为以太口或同为光纤口; d) 端口同为Access端口并且属于同一个VLAN或同为Trunk端口; e) 如果端口为Trunk端口,则其Allowed VLAN和Native VLAN属性也应该相同。 2、 支持任意两个交换机物理端口的汇聚,最大组数为6个,组内最多的端口数为8个。 3、 一些命令不能在port-channel上的端口使用,包括:arp,bandwidth,ip,ip-forward等; 4、 在使用强制生成端口聚合组时,由于汇聚是手工配置触发的,如果由于端口的VLAN信息不一致导致汇聚失败的话,汇聚组一直会停留在没有汇聚的状态,必须通过往该group增加和删除端口来触发端口再次汇聚,如果VLAN信息还是不一致仍然不能汇聚成功。直到VLAN信息都一致并且有增加和删除端口触发汇聚的情况下端口才能汇聚成功; 5、 检查对端交换机的对应端口是否配置端口聚合组,且要查看配置方式是否相同,如果本端是手工方式则对端也应该配置成手工方式,如果本端是LACP动态生成则对端也应该是LACP动态生成,否则端口聚合组不能正常工作;还有一点要注意的是如果两端收发的都是LACP协议,至少有一端是ACTIVE的,否则两端都不会发起LACP数据报; 6、 port-channel一旦形成之后,所有对于端口的设置只能在port-channel端口上进行; 7、 LACP必须和Security和802.1X的端口互斥,如果端口已经配置上述两种协议,就不允许被起用LACP; 八、 配置序列 略 九、 课后练习 1、 使用4根网线做链路聚合,通过插拔线缆观察结果。 2、 把链路聚合组作为交换机之间的trunk链路,实现跨交换机的VLAN。 十、 相关配置命令详解 port-group 命令:port-group <port-group-number> [load-balance { src-mac|dst-mac | dst-src-mac | src-ip| dst-ip|dst-src-ip}] no port-group <port-group-number> [load-balance] 功能: 新建一个port group,并且设置该组的流量分担方式。如果没有指定流量分担方式则为设置默认的流量分担方式。该命令的no操作为删除该group或者恢复该组流量分担的默认值,敲入load-balance表示恢复默认流量分担,否则为删除该组。 参数:<port-group-number> 为Port Channel的组号,范围为1~16,如果已经存在该组号则会报错。dst-mac 根据目的MAC进行流量分担;src-mac 根据源MAC地址进行流量分担;dst-src-mac 根据目的MAC和源MAC进行流量分担;dst-ip 根据目的IP地址进行流量分担;src-ip 根据源IP地址进行流量分担;dst-src-ip 根据目的IP和源IP进行流量分担。如果是修改流量分担方式,并且该port-group已经形成一个port-channel,则这次修改的流量分担方式只有在下次再次汇聚时才会生效。 缺省情况:缺省交换机端口不属于Port Channel,不启动LACP协议 命令模式:交换机全局配置模式 举例:新建一个port group,并且采用默认的流量分担方式 Switch(Config)#port-group 1 删除一个port group Switch(Config)#no port-group 1 port-group mode 命令:port-group <port-group-number> mode {active|passive|on} no port-group <port-group-number> 功能:将物理端口加入Port Channel,该命令的no操作为将端口从Port Channel中去除 参数:<port-group-number> 为Port Channel的组号,范围为1~16;active(0) 启动端口的LACP协议,并设置为Active模式;passive(1) 启动端口的LACP协议,并且设置为Passive模式;on(2) 强制端口加入Port Channel,不启动LACP协议。 命令模式:交换机端口配置模式 缺省情况:缺省交换机端口不属于Port Channel,不启动LACP协议 使用指南:如果不存在该组则会先建立该组,然后再将端口加到组中。在一个port-group中所有的端口加入的模式必须一样,以第一个加入该组的端口模式为准。端口以on模式加入一个组是强制性的,所谓强制性的表示本端交换机端口汇聚不依赖对端的信息,只要在组中有2个以上的端口,并且这些端口的vlan信息都一致则组中的端口就能汇聚成功。端口以active和passive方式加入一个组是运行lacp协议的,但两端必须有一个组中的端口是以active方式加入的,如果两端都是passive,端口永远都无法汇聚起来。 举例:在Ethernet0/0/1端口模式下,将本端口以active模式加入port-group 1 Switch(Config-Ethernet0/0/1)#port-group 1 mode active interface port-channel 命令:interface port-channel <port-channel-number> 功能:进入汇聚端口配置模式 命令模式:全局配置模式 缺省情况: 使用指南:进入汇聚端口模式下配置时,如果是对gvrp,spanningtree模块做配置则对汇聚端口生效,如果汇聚端口不存在,也就是说在端口没有汇聚起来时先提示错误信息,记录该用户配置操作,当端口真正汇聚起来以后恢复用户刚才对未形成汇聚端口的配置动作,注意只能恢复一次,如果因为某种原因汇聚组被拆散然后又汇聚起来,用户一开始的配置不能被恢复。如果是对其他模块做配置,比如做shutdown, speed配置,则是对该port-channel对应的port-group中的所有成员端口生效,起到一个群配的作用。 举例:进入port-channel1 配置模式 Switch(Config)#interface port-channel 1 Switch(Config-If-Port-Channel1)# show port-group 命令:show port-group [<port-group-number>] {brief | detail | load-balance | port | port-channel} 参数:<port-group-number> 要显示的Port Channel的组号,范围为1~16;brief 显示摘要信息;detail 显示详细信息;load-balance 显示流量分担信息;port 显示成员端口信息;port-channel显示汇聚端口信息 命令模式:特权配置模式 使用指南:如果没有指定port-group-number则表示显示所有port-group的信息。 举例:将端口0/0/1和0/0/2加入port-group 1中 1. 显示交换机的port-group 1的摘要信息。 Switch#show port-group 1 brief Port-group number : 1 Number of ports in group : 2 Maxports = 8 Number of port-channels : 0 Max port-channels : 1
2. 显示交换机的port-group 1的详细信息。 Switch# show port-group 1 detail Sorted by the ports in the group 1: -------------------------------------------- port Ethernet0/0/1 : both of the port and the agg attributes are not equal the general information of the port are as follows: portnumber: 1 actor_port_agg_id:0 partner_oper_sys:0x000000000000 partner_oper_key: 0x0001 actor_oper_port_key: 0x0101 mode of the port: ACTIVE lacp_aware: enable begin: FALSE port_enabled: FALSE lacp_ena: FALSE ready_n: TRUE
the attributes of the port are as follows: mac_type: ETH_TYPE speed_type: ETH_SPEED_10M duplex_type: FULL port_type: ACCESS
the machine state and port state of the port are as the follow mux_state: DETCH rcvm_state: P_DIS prm_state: NO_PER actor_oper_port_state : L_A___F_ partner_oper_port_state: _TA___F_
port Ethernet0/0/2 : both of the port and the agg attributes are not equal the general information of the port are as follows: portnumber: 2 actor_port_agg_id:0 partner_oper_sys:0x000000000000 partner_oper_key: 0x0002 actor_oper_port_key: 0x0102 mode of the port: ACTIVE lacp_aware: enable begin: FALSE port_enabled: FALSE lacp_ena: TRUE ready_n: TRUE
the attributes of the port are as follows: mac_type: ETH_TYPE speed_type: ETH_SPEED_100M duplex_type: FULL port_type: ACCESS
the machine state and port state of the port are as the follow mux_state: DETCH rcvm_state: P_DIS prm_state: NO_PER actor_oper_port_state : L_A___F_ partner_oper_port_state: _TA___F_
3. 显示交换机的port-group 1的显示流量分担信息。 Switch# show port-group 1 load-balance The loadbalance of the group 1 based on src MAC address.
4.显示交换机的port-group 1的成员端口信息。 Switch# show port-group 1 port Sorted by the ports in the group 1 : -------------------------------------------- the portnum is 1 port Ethernet0/0/1 related information:
Actor part Administrative Operational port number 1 port priority 0x8000 aggregator id 0 port key 0x0100 0x0101 port state LACP activety . 1 LACP timeout . . Aggregation 1 1 Synchronization . . Collecting . . Distributing . . Defaulted 1 1 Expired . .
Partner part Administrative Operational system 000000-000000 000000-000000 system priority 0x8000 0x8000 key 0x0001 0x0001 port number 1 1 port priority 0x8000 0x8000 port state LACP activety . . LACP timeout 1 1 Aggregation 1 1 Synchronization . . Collecting . . Distributing . . Defaulted 1 1 Expired . .
Selected Unselected
5.显示交换机的port-group 1的汇聚端口信息。 Switch# show port-group 1 port-channel Port channels in the group 1: ----------------------------------------------------------- Port-Channel: port-channel1 Number of port : 2 Standby port : NULL
Port in the port-channel :
Index Port Mode ------------------------------------------------------ 1 Ethernet0/0/1 active 2 Ethernet0/0/2 active
debug lacp 命令:debug lacp no debug lacp 功能:打开交换机的lacp的调试开关;本命令的no操作为关闭该调试开关。 命令模式:特权配置模式 缺省情况:缺省关闭交换机的lacp的调试开关。 使用指南:用来打开交换机lacp调试开关,可以显示交换机处理lacp数据包信息。 举例:打开lacp调试开关。 Switch#debug lacp
|
文章浏览阅读48次。c#(winform)/javaswing 通信录管理系统源码此系统同时支持mysql,sqlserver,sqlite三种数据库,有javaswing窗体和C#窗体两套代码。_winform通讯录源码
文章浏览阅读1.1k次。介绍基于sharding-datasource, jpa进行分库操作, 基于AbstractDataSourceBasedMultiTenantConnectionProviderImpl, CurrentTenantIdentifierResolver动态切换数据源SaaS服务多租户介绍,每个租户的资源都是独立的,从入口到应用部署到数据,都是完全隔离的。每个租户相当于“托管”在提供服务的公司里面,公司做的其实是统一运维。好处在于,这个隔离非常彻底,基本不太会有相互影响;如果有特殊客户要求的定制化,_currenttenantidentifierresolver
文章浏览阅读106次。[url=http://d.hatena.ne.jp/ntaku/searchdiary?word=%2A%5BAndroid%5D][Android]Androidの開発環境構築[/url][url]http://www.adakoda.com/android/000062.html[/url][url]http://www.cnmsdn.com/t/12/[/url][url]ht...
文章浏览阅读165次。前言刚刚过去的双十一,让“高性能”“高可用”“亿级”这3个词变成了技术热点词汇,也让很多人再次萌发成为「架构师」的想法。先问大家一个问题:你觉得把代码熟练、完成需求加上点勤奋,就能成为架构师么?如果你这么认为,那你注定只能是“码农”。从业这么多年,我见过太多普通程序员做到架构师的例子,但更多的人在听话地把需求做出来,既不考虑更优解,也不考虑技术原理,重复千篇一律的代码,以为只要代码写的好就能做「架构师」前段时间,还有哥们儿吐槽说,他们公司的架构师编程能力还不如他,伤感自己”怀才不遇“。但其实,架构师看的是_50w 面试
文章浏览阅读1.3w次,点赞12次,收藏25次。快速排序概念 代码实现 时间复杂度_数据结构快速排序
文章浏览阅读768次。蚁群算法栅格地图路径规划及避障完整的代码,方可运行;可提供运行操作视频!适合小白!_格栅地图蚁群算法
文章浏览阅读944次。2019数据技术嘉年华于11月16日在京落下了帷幕。大会历时两天,来自全国各地上千名学术精英、数据库领袖人物、数据库专家、技术爱好者在这里汇聚一堂,围绕“开源 • 智能 ..._巨杉数据库 王涛
文章浏览阅读285次。一.水平居中1. 行内元素<style> #father { width: 500px; height: 300px; background-color: skyblue; text-align: center; //看父级是否为块级元素,是则父级设置text-align:center //如果不是:父级先设置为块级元素,然后再居中 (即display:block ;text-alig_style 水平居中
文章浏览阅读2.7w次,点赞8次,收藏9次。文件上传漏洞是指网站对于用户上传文件的验证过程不严格,导致攻击者可以上传恶意文件到服务器上执行任意代码或者获取敏感信息的安全漏洞。安全问题说明1. 代码执行攻击者可以上传包含恶意代码的可执行文件,通过执行这些代码来攻击服务器,例如获取敏感信息、操控服务器等。上传的可执行文件中包含恶意代码,攻击者可以通过执行该代码来实现攻击目的。2. 文件覆盖攻击者可以通过上传同名文件覆盖服务器上的原始文件,导致原始文件的内容被篡改或者删除。
文章浏览阅读76次。从数据仓库到大数据,数据平台这25年是怎样进化的?大数据平台 [email protected]年前 (2016-03-23)5778℃2评论从「数据仓库」一词到现在的「大数据」,中间经历了太多的知识、架构模式的演进与变革。数据平台这25年究竟是怎样进化的?让InfoQ特约老司机为你讲解。我是从2000年开始接触数据仓库,大约08年开始进入互联网行业。很多从传统企业数..._从数据仓库到大数据,数据平台这 25 年是怎样进化的
文章浏览阅读2.2k次。在之前的项目中,使用到了Java后台读取excel文件数据的功能点,本想着该功能点已经做过了,这一类的应该都大差不离,不过在刚结束的一个项目中,现实给我深深的上了一课,特此编写此片博客,以作记录,并给自己提个醒,Java真的是浩瀚如海呀,任何时候其实自己都是小白,懂得越多越发谨慎。Java后台读取excel文件数据该功能点一般与Java导出excel文件这个功能点配合使用。实际上此次的问题与之前的最大区别在于,之前导出excel文件时,明确知道导出的数据每一列的字段详情,导入excel文件数据时,数据格_excel 导入时第一条导入后将第一条的数据返回
文章浏览阅读6.9k次。 最近适配摄像头,自然的就要接收、传递音频视频数据。而这些数据是非常频繁的,如果每次都新建缓冲区,一个是影响性能,另外也显得自己水平太低。怎么办?上缓存。 音频、视频当然要分开缓存。代码很类似,自然的吾就新建了一个类, 起名?Manager显然不合适,叫Worker最好。Queue、Cache都不是太适合。 数据队列LinkedBlockingDeque,缓存用Concurre..._http-nio-8181-exec-4 线程过多导致卡死