拓扑图
实验目的
掌握链路聚合的配置,保证SW3、SW4在部分线路有问题时使用手动链路聚合进行配置。
实验过程
1.绘制拓扑图
2.规划网段
主要为2个网段,SW3、SW4配置为10.0.100.0/24网段
3.配置IP地址
PC1、PC2:
10.0.1.1 255.255.255.0 10.0.1.254
10.0.1.2 255.255.255.0 10.0.1.254
PC3、PC4:
10.0.2.1 255.255.255.0 10.0.2.254
10.0.2.2 255.255.255.0 10.0.2.254
此外,还需要配置SW3的G01、SW4的G01分别加入VLAN10、20,然后分配10.0.1.254和10.0.2.254
<Huawei>sys
[Huawei]vlan 10
[Huawei-vlan10]q
[Huawei]int Vlanif 10
[Huawei-Vlanif10]ip add 10.0.1.254 24
[Huawei-Vlanif10]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
<Huawei>sys
[Huawei]vlan 20
[Huawei-vlan20]q
[Huawei]int Vlanif 20
[Huawei-Vlanif20]ip add 10.0.2.254 24
[Huawei-Vlanif20]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 20
4.配置手动链路聚合
[Huawei]interface Eth-Trunk 10
[Huawei-Eth-Trunk10]trunkport GigabitEthernet 0/0/2 to 0/0/4
[Huawei-Eth-Trunk10]port link-type trunk
[Huawei]interface Eth-Trunk 10
[Huawei-Eth-Trunk10]trunkport GigabitEthernet 0/0/2 to 0/0/4
[Huawei-Eth-Trunk10]port link-type trunk
还需要额外定义静态路由
蓝色区域是VLAN30,规划 10.0.100.0/24 网段
[Huawei]vlan 30
[Huawei-vlan30]q
[Huawei]int vlan 30
[Huawei-Vlanif30]ip add 10.0.100.1 24
[Huawei-Vlanif30]q
[Huawei]int Eth-Trunk 10
[Huawei-Eth-Trunk10]port trunk allow-pass vlan 30 20 10
[Huawei-Eth-Trunk10]q
[Huawei]ip route-static 10.0.2.0 24 10.0.100.2
[Huawei]vlan 30
[Huawei-vlan30]q
[Huawei]int vlan 30
[Huawei-Vlanif30]ip add 10.0.100.2 24
[Huawei-Vlanif30]q
[Huawei]int Eth-Trunk 10
[Huawei-Eth-Trunk10]port trunk allow-pass vlan 30 20 10
[Huawei-Eth-Trunk10]q
[Huawei-Eth-Trunk10]ip route-static 10.0.1.0 24 10.0.100.1
5.此时使用Ping命令去测试PC1-PC3:
目前是可以连通状态
删除G0/0/2的一条线后
发现刚开始删除是无法Ping通,但是过段时间就会恢复了,此时链路聚合成功
补充知识
如果对交换机的G01、G02、G03口分别抓包,可以看到如下的结果: