【华为网络-配置-010】-交换机、路由器链路聚合配置

要求:

1、完成 LSW1 、AR1、AR2 对应的接口的链路聚合配置
2、PC1 可以 ping 通 AR2 的聚合接口 IP 地址 1.1.1.2。

在这里插入图片描述

一、交换机链路聚合配置

创建编号为 1 的聚合接口
[LSW 1]Interface Eth-Trunk 1

设置接口模式为静态 lacp,不给定模式的话会默认设置为手工配置。
[LSW 1-Eth-Trunk1]mode lacp-static

将两个接口批量加入聚合口。(端口连续可以用这个方法,to 代表从 1 口到 2口,如果是分散接口,就进入到对应物理接口后,用命令 “eth-trunk 1”加入,1 为创建的聚合口编号)
[LSW 1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/2

二、路由器链路聚合配置

AR1 配置
创建编号为 1 的聚合接口,可以不用跟交换机的聚合编号一样,毕竟都是相互独立
[AR 1]interface Eth-Trunk 1

跟交换机本身的以太网二层配置不同,路由器属于三层设备,需要将先接口转换成二层接口。
[AR 1-Eth-Trunk1]undo portswitch

设置模式为静态 lacp。添加 2 个物理接口。配置聚合口 IP 地址。
[AR 1-Eth-Trunk1]mode lacp-static
[AR 1-Eth-Trunk1]trunkport GigabitEthernet 0/0/0 to 0/0/1
[AR 1-Eth-Trunk1]ip address 2.2.2.1 24

同样的方式创建聚合接口 2 ,并配置 IP 地址。
[AR 1]interface Eth-Trunk 2
[AR 1-Eth-Trunk2]undo portswitch
[AR 1-Eth-Trunk2]trunkport GigabitEthernet 2/0/0 to 2/0/2
[AR 1-Eth-Trunk2]ip address 1.1.1.1 24

配置缺省路由方便 PC 机测试。
[AR 1]ip route-static 0.0.0.0 0 1.1.1.2

基本上照搬 AR1 的配置方法。

AR2 配置
[AR 2]interface Eth-Trunk 1
[AR 2-Eth-Trunk1]undo portswitch
[AR 2-Eth-Trunk1]trunkport GigabitEthernet 2/0/0 to 2/0/2
[AR 2-Eth-Trunk1]ip address 1.1.1.2 24
[AR 2]ip route-static 0.0.0.0 0 1.1.1.1

三、测试

结果正确,能正常通信。
在这里插入图片描述

四、扩展配置

查看接口信息
[AR 1]display eth-trunk 1

设置此设备优先级为 100 ,使其成为LACP主动端。(优先级区间 0 - 65535)
[AR 1]lacp priority 100

配置活动接口上限阈值。(根据物理链路数量配置)(图示这里有 3 物理链路,可按实际情况配置,且一般是双方设备都进行一样的配置。)
[AR 1-Eth-Trunk2] max active-linknumber 2
[AR 2-Eth-Trunk1] max active-linknumber 2

配置LACP抢占和抢占等待时间。(时间可以自定义 10-180,默认为 30 秒)
[AR 1-Eth-Trunk2] lacp preempt enable
[AR 1-Eth-Trunk2] lacp preempt delay 20
[AR 2-Eth-Trunk1] lacp preempt enable
[AR 2-Eth-Trunk1] lacp preempt delay 20

配置接口优先级。(0-65535)
[AR 1-GigabitEthernet2/0/0]lacp priority 100
[AR 2-GigabitEthernet2/0/0]lacp priority 100
  • 2
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值