湖北华育教育

华小智问道IE面试 | M-LAG技术(六)

发布日期:2025年01月18日

“聊了这么久的M-LAG技术,谁能帮我分享一下M-LAG技...

“聊了这么久的M-LAG技术,谁能帮我分享一下M-LAG技术的基本配置呢?”华小阮老师将眼神定格在华小智身上说:“来吧,就你了,我从你眼神中看出了你的想法,哈哈哈!”“这也行……”华小智无奈地摇摇头。       今天我们一起来分享M-LAG技术的基本配置,具体结合图1进行配置。将SWA和SWB从聚合层面使用M-LAG技术虚拟成一台设备,与SWC实现跨设备链路聚合。SWA和SWB之间的g1/0/3接口连接的链路为Keepalive链路,g1/0/1和g1/0/2接口之间连接的链路为Peer-link链路。

图1配置步骤:(1)在SWA和SWB上配置相同的系统优先级和系统MAC地址。[SWA]m-lag system-priority 100   //修改m-lag系统优先级,默认是32768Changing the system priority might flap the peer link and cause M-LAG system setup failure. Continue? [Y/N]:y[SWA]%Jan  3 11:30:59:924 2025 SWA M-LAG/6/MLAG_SYSEVENT_PRIORITY_CHANGE: System priority changed from 32768 to 100.[SWA]m-lag system-mac 1-1-1    //修改m-lag系统MAC地址为0001-0001-0001Changing the system MAC address might flap the peer link and cause M-LAG system setup failure. Continue? [Y/N]:y[SWA]%Jan  3 11:31:07:647 2025 SWA M-LAG/6/MLAG_SYSEVENT_MAC_CHANGE: System MAC address changed from N/A to 0001-0001-0001.----------------------------------------------------------------------------------------------[SWB]m-lag system-priority 100   //修改m-lag系统优先级,默认是32768Changing the system priority might flap the peer link and cause M-LAG system setup failure. Continue? [Y/N]:y[SWB]%Jan  3 11:32:02:858 2025 SWB M-LAG/6/MLAG_SYSEVENT_PRIORITY_CHANGE: System priority changed from 32768 to 100.[SWB]m-lag system-mac 1-1-1   //修改m-lag系统MAC地址为0001-0001-0001Changing the system MAC address might flap the peer link and cause M-LAG system setup failure. Continue? [Y/N]:y[SWB]%Jan  3 11:32:09:964 2025 SWB M-LAG/6/MLAG_SYSEVENT_MAC_CHANGE: System MAC address changed from N/A to 0001-0001-0001.(2)为SWA和SWB配置系统编号。(系统编号只有1和2)[SWA]m-lag system-number 1         //将SWA的系统编号配置为1Changing the system number might flap the peer link and cause M-LAG system setup failure. Continue? [Y/N]:y[SWA]%Jan  3 11:45:04:190 2025 SWA M-LAG/6/MLAG_SYSEVENT_NUMBER_CHANGE: System number changed from default to 1.----------------------------------------------------------------------------------------------[SWB]m-lag system-number 2        //将SWB的系统编号配置为1Changing the system number might flap the peer link and cause M-LAG system setup failure. Continue? [Y/N]:y[SWB]%Jan  3 11:45:59:618 2025 SWB M-LAG/6/MLAG_SYSEVENT_NUMBER_CHANGE: System number changed from default to 2.(3)配置keepalive链路接口。//先将用于keepalive链路的接口修改为三层接口,并配置IP地址[SWA]interface GigabitEthernet 1/0/3[SWA-GigabitEthernet1/0/3]port link-mode route   //将接口模式从bridge修改为routeThe configuration of the interface will be restored to the default. Continue? [Y/N]:y[SWA-GigabitEthernet1/0/3]ip address 172.16.10.1 24 //配置接口IP地址[SWA-GigabitEthernet1/0/3]quit----------------------------------------------------------------------------------------------[SWB]interface GigabitEthernet 1/0/3[SWB-GigabitEthernet1/0/3]port link-mode route   //将接口模式从bridge修改为routeThe configuration of the interface will be restored to the default. Continue? [Y/N]:y[SWB-GigabitEthernet1/0/3]ip address 172.16.10.2 24  //配置接口IP地址[SWB-GigabitEthernet1/0/3]quit注意:SWA和SWB的Keepalive接口地址必须在同一网段内(4)配置keepalive链路。[SWA]m-lag keepalive ip destination 172.16.10.2 source 172.16.10.1------------------------------------------------------------------------------------------[SWB]m-lag keepalive ip destination 172.16.10.1 source 172.16.10.2(5)配置保留接口,一般会将keepalive接口配置为保留接口。[SWA]m-lag mad exclude interface GigabitEthernet 1/0/3------------------------------------------------------------------------------------------[SWB]m-lag mad exclude interface GigabitEthernet 1/0/3(6)配置Peer-link接口。[SWA]interface Bridge-Aggregation 1         //创建二层聚合口[SWA-Bridge-Aggregation1]link-aggregation mode dynamic   //配置为动态链路聚合模式[SWA-Bridge-Aggregation1]quit[SWA]interface range GigabitEthernet 1/0/1 GigabitEthernet 1/0/2[SWA-if-range]port link-aggregation group 1   //向二层聚合口中添加成员端口[SWA-Bridge-Aggregation1]quit[SWA]interface Bridge-Aggregation 1[SWA-Bridge-Aggregation1]port m-lag peer-link 1    //将二层聚合口1配置为peer-link接口[SWA-Bridge-Aggregation1]undo mac-address static source-check enable[SWA-Bridge-Aggregation1]quit------------------------------------------------------------------------------------------[SWB]interface Bridge-Aggregation 1      //创建二层聚合口[SWB-Bridge-Aggregation1]link-aggregation mode dynamic   //配置为动态链路聚合模式[SWB-Bridge-Aggregation1]quit[SWB]interface range GigabitEthernet 1/0/1 GigabitEthernet 1/0/2[SWB-if-range]port link-aggregation group 1    //向二层聚合口中添加成员端口[SWB-if-range]quit[SWB]interface Bridge-Aggregation 1[SWB-Bridge-Aggregation1]port m-lag peer-link 1  //将二层聚合口1配置为peer-link接口[SWB-Bridge-Aggregation1]undo mac-address static source-check enable[SWB-Bridge-Aggregation1]quit(7)配置M-LAG接口。[SWA]interface Bridge-Aggregation 2   //创建二层聚合口[SWA-Bridge-Aggregation2]link-aggregation mode dynamic   //配置为动态链路聚合模式[SWA-Bridge-Aggregation2]quit[SWA]interface GigabitEthernet 1/0/4[SWA-GigabitEthernet1/0/4]port link-aggregation group 2  //向二层聚合口中添加成员端口[SWA-GigabitEthernet1/0/4]quit[SWA]interface Bridge-Aggregation 2[SWA-Bridge-Aggregation2]port m-lag group 2   //将二层聚合口2加入M-LAG组2中[SWA-Bridge-Aggregation2]quit//此时二层聚合接口2就是M-LAG接口。------------------------------------------------------------------------------------------[SWB]interface Bridge-Aggregation 2   //创建二层聚合口[SWB-Bridge-Aggregation2]link-aggregation mode dynamic   //配置为动态链路聚合模式[SWB-Bridge-Aggregation2]quit[SWB]interface GigabitEthernet 1/0/4[SWB-GigabitEthernet1/0/4]port link-aggregation group 2  //向二层聚合口中添加成员端口[SWB-GigabitEthernet1/0/4]quit[SWB]interface Bridge-Aggregation 2[SWB-Bridge-Aggregation2]port m-lag group 2  //将二层聚合口2加入M-LAG组2中[SWB-Bridge-Aggregation2]quit//此时二层聚合接口2就是M-LAG接口。(8)在SWC上完成动态链路聚合配置,实现跨设备链路聚合。(SWC上的配置为正常的动态链路聚合配置)[SWC]interface Bridge-Aggregation 1[SWC-Bridge-Aggregation1]link-aggregation mode dynamic [SWC-Bridge-Aggregation1]quit[SWC]interface range GigabitEthernet 1/0/1 GigabitEthernet 1/0/2[SWC-if-range]port link-aggregation group 1[SWC-if-range]quit验证配置:①查看M-LAG系统信息。

②查看SWA上M-LAG的Keepalive报文信息。

③查看SWA上peer-link接口和M-LAG接口的摘要信息和详细信息。

④在SWC上查看动态链路聚合组信息。

闻道有先后,术业有专攻,扫描下方二维码,添加好友,让我们一起进步吧!

图片|王在礼文字|王在礼排版|张坚审核|姜明哲@新媒体中心

相关资讯
【考培一体化】2024新华三H3CIE实验考试12月湖北移动考场(华育专场) 【校企合作&生态校区】红帽认证考试喜报来啦! 华小智问道IE面试 | M-LAG技术(五) 华育智远实训中心2024年度工作总结 华育智远校企合作部2024年度工作总结
相关课程