动态LACP配置案例

这篇配置展示了如何通过华为设备建立网络拓扑,包括R1和R2路由器以及SW1、SW3、SW4、SW2、SW5和SW6交换机的配置,确保PC1和PC2能够与PC3和PC4相互通信。配置涉及了接口设置、静态路由和VLAN划分,以实现不同子网间的通信。
摘要由CSDN通过智能技术生成

网络拓扑

各配置

R1配置:
<Huawei> u t m
<Huawei>system-view
[Huawei]sys R1
[Huawei]int eth-trunk 1
[R1-Eth-Trunk1]undo portswitch  // 关闭2层功能,开启三层IP地址功能
[R1-Eth-Trunk1]mode lacp-static 
[R1-Eth-Trunk1]ip add 192.168.12.1 24
[R1-Eth-Trunk1]trunkport g0/0/1
[R1-Eth-Trunk1]trunkport g0/0/2

[R1]int Eth-Trunk 2
[R1-Eth-Trunk2]undo portswitch 
[R1-Eth-Trunk2]mode lacp-static 
[R1-Eth-Trunk2]trunkport g4/0/1
[R1-Eth-Trunk2]trunkport g4/0/2
[R1-Eth-Trunk2]ip add 192.168.10.254 24    

[R1] ip   route-static   192.168.20.0 24 192.168.12.2

R2配置:
<Huawei> u t m
<Huawei>system-view
[Huawei]sys R2
[Huawei]int eth-trunk 1
[R2-Eth-Trunk1]undo portswitch 
[R2-Eth-Trunk1]mode lacp-static 
[R2-Eth-Trunk1]ip add 192.168.12.2  24
[R2-Eth-Trunk1]trunkport g0/0/1
[R2-Eth-Trunk1]trunkport g0/0/2

[R2]int Eth-Trunk 2
[R2-Eth-Trunk2]undo portswitch 
[R2-Eth-Trunk2]mode lacp-static 
[R2-Eth-Trunk2]trunkport g4/0/1
[R2-Eth-Trunk2]trunkport g4/0/2
[R2-Eth-Trunk2]ip add 192.168.20.254 24    

[R2] ip   route-static   192.168.10.0 24 192.168.12.1

SW1配置:


<Huawei>u t m
<Huawei>sys
[Huawei]sys SW1
[SW1]vlan 10

[SW1]int Eth-Trunk 2
[SW1-Eth-Trunk2]mode lacp-static 
[SW1-Eth-Trunk2]trunkport g0/0/1
[SW1-Eth-Trunk2]trunkport g0/0/2
[SW1-Eth-Trunk2]port link-type access 
[SW1-Eth-Trunk2]port default vlan 10

[SW1]int Eth-Trunk 13
[SW1-Eth-Trunk13]mode lacp-static 
[SW1-Eth-Trunk13]trunkport g0/0/3
[SW1-Eth-Trunk13]trunkport g0/0/4
[SW1-Eth-Trunk13]port link-type  trunk
[SW1-Eth-Trunk13]port  trunk allow-pass vlan  all

[SW1]int Eth-Trunk 14
[SW1-Eth-Trunk14]mode lacp-static     
[SW1-Eth-Trunk14]trunkport g0/0/5
[SW1-Eth-Trunk14]trunkport g0/0/6
[SW1-Eth-Trunk14]port link-type trunk
[SW1-Eth-Trunk14]port trunk allow-pass vlan all

SW3配置:
<Huawei>u t m
<Huawei>sys
[Huawei]sys sw3
[sw3]vlan 10
[sw3]int e0/0/3
[sw3-Ethernet0/0/3]port  link-type access
[sw3-Ethernet0/0/3]port default vlan 10

[sw3]int Eth-Trunk 13
[sw3-Eth-Trunk13]mode lacp-static 
[sw3-Eth-Trunk13]trunkport Ethernet 0/0/1
[sw3-Eth-Trunk13]trunkport Ethernet 0/0/2
[sw3-Eth-Trunk13]port link-ype trunk
[sw3-Eth-Trunk13]port trunk allow-pass vlan all

SW4配置:
<Huawei>u t m
<Huawei>sys
[Huawei]sys sw4
[sw4]vlan 10
[sw4]int e0/0/3
[sw4-Ethernet0/0/3]port  link-type access
[sw4-Ethernet0/0/3]port default vlan 10

[sw4]int Eth-Trunk 14
[sw4-Eth-Trunk14]mode lacp-static 
[sw4-Eth-Trunk14]trunkport Ethernet 0/0/1
[sw4-Eth-Trunk14]trunkport Ethernet 0/0/2
[sw4-Eth-Trunk14]port link-ype trunk
[sw4-Eth-Trunk14]port trunk allow-pass vlan all

SW2配置:
<Huawei>u t m
<Huawei>sys
[Huawei]sys SW2
[SW2]vlan 20

[SW2]int Eth-Trunk 2
[SW2-Eth-Trunk2]mode lacp-static 
[SW2-Eth-Trunk2]trunkport g0/0/1
[SW2-Eth-Trunk2]trunkport g0/0/2
[SW2-Eth-Trunk2]port link-type access 
[SW2-Eth-Trunk2]port default vlan 20

[SW2]int Eth-Trunk 25
[SW2-Eth-Trunk25]mode lacp-static 
[SW2-Eth-Trunk25]trunkport g0/0/3
[SW2-Eth-Trunk25]trunkport g0/0/4
[SW2-Eth-Trunk25]port link-type  trunk
[SW2-Eth-Trunk25]port  trunk allow-pass vlan  all

[SW2]int Eth-Trunk 26
[SW2-Eth-Trunk26]mode lacp-static     
[SW2-Eth-Trunk26]trunkport g0/0/5
[SW2-Eth-Trunk26]trunkport g0/0/6
[SW2-Eth-Trunk26]port link-type trunk
[SW2-Eth-Trunk26]port trunk allow-pass vlan all

SW5配置:
<Huawei>u t m
<Huawei>sys
[Huawei]sys sw5
[sw5]vlan 20
[sw5]int e0/0/3
[sw5-Ethernet0/0/3]port  link-type access
[sw5-Ethernet0/0/3]port default vlan 20

[sw5]int Eth-Trunk 25
[sw5-Eth-Trunk25]mode lacp-static 
[sw5-Eth-Trunk25]trunkport Ethernet 0/0/1
[sw5-Eth-Trunk25]trunkport Ethernet 0/0/2
[sw5-Eth-Trunk25]port link-ype trunk
[sw5-Eth-Trunk25]port trunk allow-pass vlan all

SW6配置:
<Huawei>u t m
<Huawei>sys
[Huawei]sys sw6
[sw6]vlan 20
[sw6]int e0/0/3
[sw6-Ethernet0/0/3]port  link-type access
[sw6-Ethernet0/0/3]port default vlan 20

[sw6]int Eth-Trunk 26
[sw6-Eth-Trunk26]mode lacp-static 
[sw6-Eth-Trunk26]trunkport Ethernet 0/0/1
[sw6-Eth-Trunk26]trunkport Ethernet 0/0/2
[sw6-Eth-Trunk26]port link-ype trunk
[sw6-Eth-Trunk26]port trunk allow-pass vlan all

PC1配置:

192.168.10.1

255.255.255.0

192.168.10.254

PC2配置:

192.168.10.2

255.255.255.0

192.168.10.254

PC3配置:

192.168.20.1

255.255.255.0

192.168.20.254

PC4配置:

192.168.20.2

255.255.255.0

192.168.20.254

测试所有的PC机之间互通

    

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值