赞
踩
聚合链路两端的物理参数必须保持一致
1.进行聚合的链路的数目要保持一致
2.进行聚合的链路的速率要保持一致
3.进行聚合的链路为全双工方式 要保持一致
聚合链路两端的逻辑参数必须要保持一致
同一个汇聚组中端口的基本配置必须保持一致
基本配置主要包括STP,QoS,VLAN,端口等相关配置
二层链路捆绑
交换机与交换机之间的
二三层链路捆绑
交换机与路由器之间的
三层链路捆绑
路由器与路由器之间的
配置链路捆绑是会用到LACP,所以我们必须了解LACP
以太网链路聚合是指将多条以太网物理链路捆绑在一起成为一条逻辑链路,从而实现增加链路带宽的目的。链路聚合分为手工模式和LACP模式
LACP模式需要有链路聚合控制协议LACP的参与,当需要在两个直连设备间提供一个较大的链路带宽而设备支持LACP协议时,建议使用LACP模式。LACP模式不仅可以实现增加带宽,提高可靠性,负载分担的目的,而且可以提高Eth-Trunk的容错性,提供备份功能。
LACP模式下,部分链路是活动链路,所有活动链路均参与数据转发。如果某条活动链路故障,链路聚合组自动在非活动链路中选择一条链路作为活动链路,参与数据转发的链路数据不变。
<Huawei> <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname sw1 Nov 12 2019 16:33:11-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 4, the c hange loop count is 0, and the maximum number of records is 4095.fo [sw1]undo info-center enable '//关闭华为信息提示中心,不建议关闭,我是为了你们看着方便' Info: Information center is disabled. [sw1]lacp priority 1000 '//设置优先级,可理解为sw1链路聚合的接口设置为“老大”' [sw1]interface Eth-Trunk1 '//进入接口' [sw1-Eth-Trunk1]bpdu enable '//开启BPDU' [sw1-Eth-Trunk1]mode lacp-static '//设置lacp模式为静态LACP' [sw1-Eth-Trunk1]trunkport e 0/0/1 to 0/0/3 '//将物理接口加入到Eth-Trunk1中' Info: This operation may take a few seconds. Please wait for a moment...done. [sw1-Eth-Trunk1]max active-linknumber 2 '//设置最大活动链路数为2(原本有三个,即表示为有一条作为备用)'
<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname sw2
Nov 12 2019 16:33:11-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.fo
[sw2]undo info-center enable '//关闭华为信息提示中心,不建议关闭,我是为了你们看着方便
Info: Information center is disabled.
[sw2]interface Eth-Trunk1 '//进入接口'
[sw2-Eth-Trunk1]bpdu enable '//开启BPDU'
[sw2-Eth-Trunk1]mode lacp-static '//设置lacp模式为静态LACP'
[sw2-Eth-Trunk1]trunkport e 0/0/1 to 0/0/3 '//将物理接口加入到Eth-Trunk1中'
Info: This operation may take a few seconds. Please wait for a moment...done.
<Huawei> <Huawei>sys '//进入系统视图' Enter system view, return user view with Ctrl+Z. [Huawei]sysname R1 '//更改名称' Nov 12 2019 16:25:14-08:00 R1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25. 191.3.1 configurations have been changed. The current change number is 1, the ch ange loop count is 0, and the maximum number of records is 4095.n [R1]undo info-center enable '//关闭华为信息提示中心,不建议关闭,我是为了你们看着方便' Info: Information center is disabled. [R1]int Eth-Trunk1 '//进入接口' [R1-Eth-Trunk1]trunkport g 0/0/0 to 0/0/1 '//将物理接口添加进去' [R1-Eth-Trunk1]ip address 12.0.0.1 30 '//添加ip地址' [R1-Eth-Trunk1]q [R1]int Eth-Trunk2 '//进入接口' [R1-Eth-Trunk2]trunkport g 0/0/2 to 0/0/3 '//将物理接口添加进去' [R1-Eth-Trunk2]ip add 192.168.10.1 24 '//添加IP地址
<Huawei>
<Huawei>sys '//进入系统视图'
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2 '//更改名称'
Nov 12 2019 16:25:14-08:00 R2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 1, the ch
ange loop count is 0, and the maximum number of records is 4095.n
[R2]undo info-center enable '//关闭华为信息提示中心,不建议关闭,我是为了你们看着方便'
Info: Information center is disabled.
[R2]int Eth-Trunk5 '//进入接口'
[R2-Eth-Trunk5]trunkport g 0/0/0 to 0/0/1 '//将物理接口添加进去'
[R2-Eth-Trunk5]ip address 12.0.0.2 30 '//添加ip地址'
[R2-Eth-Trunk1]ip route-static 192.168.10.0 24 12.0.0.1 '//添加静态路由
[sw1]int Eth-Trunk2 '//进入接口'
[sw1-Eth-Trunk2]trunkport g 0/0/1 to 0/0/2 '//将物理地址添加进来'
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw1-Eth-Trunk2]q '//退出接口'
[sw1]int vlanif 1 '//进入vlan接口'
[sw1-Vlanif1]ip add 192.168.10.2 24 '//添加ip地址'
[sw2]int vlanif 1 '//进入vlan接口'
[sw2-Vlanif1]ip add 192.168.10.3 24 '//添加ip地址'
[sw1-Vlanif1]q '//退出接口'
[sw2]int Eth-Trunk2 '//进入接口'
[sw2-Eth-Trunk2]trunkport e 0/0/5 to 0/0/6 '//将物理地址添加进来'
第二步
[root@localhost ~]# nmcli connection '//查看UUID值,准备编辑ens36配置文件'
名称 UUID 类型 设备
ens33 fe60a0ac-7d04-46a3-b29c-633a50b88f33 802-3-ethernet ens33
virbr0 3f51e6f6-a4d0-4d6c-9df7-48e6e05ff5c6 bridge virbr0
有线连接 1 557ffd5e-8b03-38ce-bffb-17a68e0a8c17 802-3-ethernet ens36 '//新添加的网卡ens36的UUID复制粘贴到其他位置,后面会用'
第三步 [root@localhost ~]# cd /etc/sysconfig/network-scripts/ '//进入网卡配置文件中' [root@localhost network-scripts]# ls '//查看后发现只有ens33的配置文件' ifcfg-ens33 ifdown-isdn ifup ifup-plip ifup-tunnel ifcfg-lo ifdown-post ifup-aliases ifup-plusb ifup-wireless ifdown ifdown-ppp ifup-bnep ifup-post init.ipv6-global ifdown-bnep ifdown-routes ifup-eth ifup-ppp network-functions ifdown-eth ifdown-sit ifup-ib ifup-routes network-functions-ipv6 ifdown-ib ifdown-Team ifup-ippp ifup-sit ifdown-ippp ifdown-TeamPort ifup-ipv6 ifup-Team ifdown-ipv6 ifdown-tunnel ifup-isdn ifup-TeamPort [root@localhost network-scripts]# cp ifcfg-ens33 ifcfg-ens36 '//我们将ens33的配置文件复制一份' [root@localhost network-scripts]# ls ifcfg-ens33 ifdown-ipv6 ifdown-tunnel ifup-isdn ifup-TeamPort ifcfg-ens36 ifdown-isdn ifup ifup-plip ifup-tunnel ifcfg-lo ifdown-post ifup-aliases ifup-plusb ifup-wireless ifdown ifdown-ppp ifup-bnep ifup-post init.ipv6-global ifdown-bnep ifdown-routes ifup-eth ifup-ppp network-functions ifdown-eth ifdown-sit ifup-ib ifup-routes network-functions-ipv6 ifdown-ib ifdown-Team ifup-ippp ifup-sit ifdown-ippp ifdown-TeamPort ifup-ipv6 ifup-Team [root@localhost network-scripts]# vim ifcfg-ens33 '//配置ens33的设置'
第四步
[root@localhost network-scripts]# vim ifcfg-ens36 '//配置ens36'
第五步
[root@localhost network-scripts]# vim ifcfg-bond0 '//配置ifcfg-bond0'
这里简单说下bond的模式,详细的说明可自行百度 mode=0 ,(平衡抡循环策略) mode=1,(主-备份策略) mode=2,(平衡策略) mode=4,( IEEE 802.3ad 动态链路聚合,需要交换机配置) mode=5, mode=6 miimon:指定MII链路监控频率,单位是毫秒(ms)。这将决定驱动检查每个slave链路状态频率。0表示禁止MII链路监控。100可以作为一个很好的初始参考值
第六步 [root@localhost network-scripts]# cd '//返回到家目录' [root@localhost ~]# systemctl restart network '//重启网卡' [root@localhost ~]# ping 192.168.10.1 '//尝试与网关通信' PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. 64 bytes from 192.168.10.1: icmp_seq=1 ttl=255 time=69.5 ms 64 bytes from 192.168.10.1: icmp_seq=2 ttl=255 time=49.7 ms 64 bytes from 192.168.10.1: icmp_seq=3 ttl=255 time=56.0 ms 64 bytes from 192.168.10.1: icmp_seq=4 ttl=255 time=63.9 ms ^C [root@localhost ~]# ping 192.168.10.4 '//尝试与PC 1通信' PING 192.168.10.4 (192.168.10.4) 56(84) bytes of data. 64 bytes from 192.168.10.4: icmp_seq=1 ttl=128 time=119 ms 64 bytes from 192.168.10.4: icmp_seq=2 ttl=128 time=49.7 ms 64 bytes from 192.168.10.4: icmp_seq=3 ttl=128 time=63.5 ms 64 bytes from 192.168.10.4: icmp_seq=4 ttl=128 time=56.0 ms 64 bytes from 192.168.10.4: icmp_seq=5 ttl=128 time=45.0 ms ^C [root@localhost ~]# ping 192.168.10.5 '//尝试与PC 2通信' PING 192.168.10.5 (192.168.10.5) 56(84) bytes of data. 64 bytes from 192.168.10.5: icmp_seq=1 ttl=128 time=68.9 ms 64 bytes from 192.168.10.5: icmp_seq=2 ttl=128 time=42.6 ms 64 bytes from 192.168.10.5: icmp_seq=3 ttl=128 time=35.6 ms 64 bytes from 192.168.10.5: icmp_seq=4 ttl=128 time=27.3 ms 64 bytes from 192.168.10.5: icmp_seq=5 ttl=128 time=40.2 ms ^C
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。