100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 链路聚合综合配置示例(路由器和路由器链路聚合---路由器和交换机链路聚合---交换机和

链路聚合综合配置示例(路由器和路由器链路聚合---路由器和交换机链路聚合---交换机和

时间:2019-06-18 12:39:33

相关推荐

链路聚合综合配置示例(路由器和路由器链路聚合---路由器和交换机链路聚合---交换机和

静态LACP链路聚合模式和手动负载均衡链路聚合模式的主要区别:在LACP模式中,一些链路充当备份链路;在手动负载均衡模式中,所有的成员口都处于转发状态。

一、示例展示的要点:

1. 路由器和路由器链路聚合;

2. 路由器和交换机链路聚合;

3. 交换机和交换机链路聚合;

4. 手动负载分担模式;

5.静态LACP模式(配置设备优先级用于选出主设备,配置端口优先级用于指定备份链路)。

二、示例场景

为实现提高网络带宽和链路备份。

三、示例拓扑图

四、代码段

system-viewsysname Rip route-static 192.168.20.0 24 1.1.1.2interface Eth-Trunk 2undo portswitchmode lacp-statictrunkport GigabitEthernet 4/0/0 4/0/1ip address 192.168.10.254 24interface Eth-Trunk 1undo portswitchmode lacp-statictrunkport GigabitEthernet 0/0/0 0/0/1ip address 1.1.1.1 28system-viewsysname R1ip route-static 192.168.10.0 24 1.1.1.1interface Eth-Trunk 1undo portswitchmode lacp-statictrunkport GigabitEthernet 0/0/0 0/0/1ip address 1.1.1.2 28interface GigabitEthernet 2/0/1ip address 192.168.20.254 24system-viewsysname SW1lacp priority 100vlan 10interface Eth-Trunk 3mode lacp-staticport link-type trunkport trunk allow-pass vlan 10trunkport GigabitEthernet 0/0/1 to 0/0/3max active-linknumber 2interface GigabitEthernet 0/0/1lacp priority 100interface GigabitEthernet 0/0/2lacp priority 100interface Eth-Trunk 2mode lacp-staticport link-type access port default vlan 10trunkport GigabitEthernet 0/0/4 0/0/5system-viewsysname SW2vlan 10interface Eth-Trunk 3mode lacp-staticport link-type trunkport trunk allow-pass vlan 10trunkport GigabitEthernet 0/0/1 to 0/0/3interface GigabitEthernet 0/0/4port hybrid untagged vlan 10port hybrid pvid vlan 10interface GigabitEthernet 0/0/5port link-type accessport default vlan 10system-viewsysname SW3vlan 20interface Eth-Trunk 4mode manual load-balanceport link-type trunkport trunk allow-pass vlan 20interface Ethernet0/0/1eth-trunk 4interface Ethernet0/0/2eth-trunk 4interface Ethernet0/0/3eth-trunk 4interface GigabitEthernet 0/0/1port link-type accessport default vlan 20system-viewsysname SW4vlan 20interface Eth-Trunk 4mode manual load-balanceport link-type trunkport trunk allow-pass vlan 20trunkport Ethernet 0/0/1 to 0/0/3interface Ethernet 0/0/4port link-type accessport default vlan 20interface Ethernet 0/0/5port hybrid untagged vlan 20port hybrid pvid vlan 20

五、代码解释

<Huawei>system-view

[Huawei]sysname R

[R]ip route-static 192.168.20.0 24 1.1.1.2 //配置静态路由

[R]interface Eth-Trunk 2 //创建聚合链路端口2

[R-Eth-Trunk2]undo portswitch //将二层网络端口转换成三次网络端口

[R-Eth-Trunk2]mode lacp-static //设置聚合链路2为静态LACP模式

[R-Eth-Trunk2]trunkport GigabitEthernet 4/0/0 4/0/1 //将物理端口GE 4/0/0和GE 4/0/1添加到聚合链路2的端口中

[R-Eth-Trunk2]ip address 192.168.10.254 24

[R-Eth-Trunk2]interface Eth-Trunk 1

[R-Eth-Trunk1]undo portswitch

[R-Eth-Trunk1]mode lacp-static

[R-Eth-Trunk1]trunkport GigabitEthernet 0/0/0 0/0/1

[R-Eth-Trunk1]ip address 1.1.1.1 28

注意:端口加入Eth-Trunk口时,二层Eth-Trunk口的成员口必须是二层端口,三层Eth-Trunk口的成员口必须是三层端口。

<Huawei>system-view

[Huawei]sysname R1

[R1]ip route-static 192.168.10.0 24 1.1.1.1 //配置静态路由

[R1]interface Eth-Trunk 1 //创建聚合链路端口1

[R1-Eth-Trunk1]undo portswitch //将二层网络端口转换成三次网络端口

[R1-Eth-Trunk1]mode lacp-static //设置聚合链路1为静态LACP模式

[R1-Eth-Trunk1]trunkport GigabitEthernet 0/0/0 0/0/1//将物理端口GE 0/0/0和GE 0/0/1添加到聚合链路1的端口中

[R1-Eth-Trunk1]ip address 1.1.1.2 28

<Huawei>system-view

[Huawei]sysname SW1

[SW1]lacp priority 100 //设置SW1交换机lacp优先级为100

[SW1]vlan 10

[SW1-vlan10]interface Eth-Trunk 3//创建聚合链路端口3

[SW1-Eth-Trunk3]mode lacp-static//设置聚合链路1为静态LACP模式

[SW1-Eth-Trunk3]port link-type trunk //设置聚合链路端口3的vlan端口链路类型为trunk

[SW1-Eth-Trunk3]port trunk allow-pass vlan 10//设置聚合链路端口3允许vlan 10数据通过

[SW1-Eth-Trunk3]trunkport GigabitEthernet 0/0/1 to 0/0/3//将物理端口GE 0/0/1、GE 0/0/2和GE 0/0/1添加到聚合链路1的端口中

[SW1-Eth-Trunk3]max active-linknumber 2//设置活动链路上限数为2个

[SW1-Eth-Trunk3]interface GigabitEthernet 0/0/1

[SW1-GigabitEthernet0/0/1]lacp priority 100//设置SW1交换机GE0/0/1端口lacp优先级为100

[SW1-GigabitEthernet0/0/1]interface GigabitEthernet 0/0/2

[SW1-GigabitEthernet0/0/2]lacp priority 100//设置SW1交换机GE0/0/2端口lacp优先级为100

[SW1-GigabitEthernet0/0/2]interface Eth-Trunk 2//创建聚合链路端口2

[SW1-Eth-Trunk2]mode lacp-static//设置聚合链路1为静态LACP模式

[SW1-Eth-Trunk2]port link-type access//设置聚合链路端口2的vlan端口链路类型为access

[SW1-Eth-Trunk2]port default vlan 10//设置聚合链路端口2允许vlan 10数据通过

[SW1-Eth-Trunk2]trunkport GigabitEthernet 0/0/4 0/0/5//将物理端口GE 0/0/4和GE 0/0/5添加到聚合链路2的端口中

<Huawei>system-view

[Huawei]sysname SW2

[SW2]vlan 10

[SW2-vlan10]interface Eth-Trunk 3//创建聚合链路端口3

[SW2-Eth-Trunk3]mode lacp-static//设置聚合链路1为静态LACP模式

[SW2-Eth-Trunk3]port link-type trunk//设置聚合链路端口3的vlan端口链路类型为trunk

[SW2-Eth-Trunk3]port trunk allow-pass vlan 10//设置聚合链路端口3允许vlan 10数据通过

[SW2-Eth-Trunk3]trunkport GigabitEthernet 0/0/1 to 0/0/3//将物理端口GE 0/0/1、GE 0/0/2和GE 0/0/1添加到聚合链路1的端口中

[SW2-Eth-Trunk3]interface GigabitEthernet 0/0/4

[SW2-GigabitEthernet0/0/4]port hybrid untagged vlan 10//交换机在该端口转发VLAN10的帧时,剥离掉相应的VLAN Tag 10,以Untagged的方式发送出去。

[SW2-GigabitEthernet0/0/4]port hybrid pvid vlan 10//设置Hybrid类型端口的VLAN ID,即该端口上接收到未带VLAN Tag的帧时,加上VLAN Tag 10再转发。

[SW2-GigabitEthernet0/0/4]interface GigabitEthernet 0/0/5

[SW2-GigabitEthernet0/0/5]port link-type access//设置GE0/0/5的vlan端口链路类型为access

[SW2-GigabitEthernet0/0/5]port default vlan 10//设置GE0/0/5允许vlan 10数据通过

<Huawei>system-view

[Huawei]sysname SW3

[SW3]vlan 20

[SW3-vlan20]interface Eth-Trunk 4//创建聚合链路端口4

[SW3-Eth-Trunk4]mode manual load-balance//设置聚合链路4为手动负载分担模式

[SW3-Eth-Trunk4]port link-type trunk//设置聚合链路端口4的vlan端口链路类型为trunk

[SW3-Eth-Trunk4]port trunk allow-pass vlan 20//设置聚合链路端口4允许vlan 20数据通过

[SW3-Eth-Trunk4]interface Ethernet0/0/1

[SW3-Ethernet0/0/1]eth-trunk 4//将物理端口E 0/0/1添加到聚合链路4的端口中

[SW3-Ethernet0/0/1]interface Ethernet0/0/2

[SW3-Ethernet0/0/2]eth-trunk 4//将物理端口E 0/0/2添加到聚合链路4的端口中

[SW3-Ethernet0/0/2]interface Ethernet0/0/3

[SW3-Ethernet0/0/3]eth-trunk 4 //将物理端口E 0/0/3添加到聚合链路4的端口中

[SW3-Ethernet0/0/3]interface GigabitEthernet 0/0/1

[SW3-GigabitEthernet0/0/1]port link-type access//设置GE0/0/1的vlan端口链路类型为access

[SW3-GigabitEthernet0/0/1]port default vlan 20//设置GE0/0/1允许vlan 20数据通过

<Huawei>system-view

[Huawei]sysname SW4

[SW4]vlan 20

[SW4-vlan20]interface Eth-Trunk 4

[SW4-Eth-Trunk4]mode manual load-balance

[SW4-Eth-Trunk4]port link-type trunk

[SW4-Eth-Trunk4]port trunk allow-pass vlan 20

[SW4-Eth-Trunk4]trunkport Ethernet 0/0/1 to 0/0/3

[SW4-Eth-Trunk4]interface Ethernet 0/0/4

[SW4-Ethernet0/0/4]port link-type access

[SW4-Ethernet0/0/4]port default vlan 20

[SW4-Ethernet0/0/4]interface Ethernet 0/0/5

[SW4-Ethernet0/0/5]port hybrid untagged vlan 20

[SW4-Ethernet0/0/5]port hybrid pvid vlan 20

六、测试验证

使用display eth-trunk 命令查看Eth-Trunk 1接口状态,测试聚合链路备用端口切换启用。

如果将SW1的GE 0/0/2端口down掉:

开启SW1的GE 0/0/2端口:

SW1的GE 0/0/2端口从故障状态恢复正常后,没有自动变成活动状态。

使用display interface eth-trunk 命令查看Eth-Trunk 1接口信息

Eth-Trunk 3为2G,是两个GE端口带宽之和,GE0/0/3接口为Eth-Trunk 3的备用接口。

参考链接:/gucun-blog/p/16369443.html

/U9rZy

链路聚合综合配置示例(路由器和路由器链路聚合---路由器和交换机链路聚合---交换机和交换机链路聚合)

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。