网络拓扑
各配置
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机之间互通