实验需求:
实验拓扑:
实验分析:将192.168.0.0/24划分成9个子网,R1三个环回再二次划分为3个子网,静态路由,环回汇总
实验配置:
AR1:
[wl1-GigabitEthernet0/0/1]int g0/0/0
[wl1-GigabitEthernet0/0/0]ip add 192.168.0.17 28
[wl1-GigabitEthernet0/0/0]int g0/0/1
[wl1-GigabitEthernet0/0/1]ip add 192.168.0.113 28
[wl1-GigabitEthernet0/0/1]q
[wl1]interface LoopBack 0
[wl1-LoopBack0]ip add 192.168.0.1 30
[wl1-LoopBack0]q
[wl1]int LoopBack 1
[wl1-LoopBack1]ip add 192.168.0.5 30
[wl1-LoopBack1]q
[wl1]int LoopBack 2
[wl1-LoopBack2]ip add 192.168.0.9 30
[wl1]ip route-static 192.168.0.32 28 192.168.0.18
[wl1]ip route-static 192.168.0.64 28 192.168.0.18
[wl1]ip route-static 192.168.0.80 28 192.168.0.18
[wl1]ip route-static 192.168.0.96 28 192.168.0.114
[wl1]ip route-static 192.168.0.128 28 192.168.0.114
[wl1]ip route-static 192.168.0.144 28 192.168.0.114
[wl1]ip route-static 1.1.0.0 22 NULL 0
[wl1]ip route-static 0.0.0.0 0 192.168.0.18
ip route-static 0.0.0.0 0 192.168.0.18
AR2:
[wl3]int g0/0/0
[wl3-GigabitEthernet0/0/0]ip add 192.18.0.114 28
[wl3-GigabitEthernet0/0/0]int g0/0/1
[wl3-GigabitEthernet0/0/1]ip add 192.168.0.97 28
[wl2]ip route-static 192.168.0.96 28 192.168.0.34
[wl2]ip route-static 192.168.0.80 28 192.168.0.34
[wl2]ip route-static 192.168.0.64 28 192.168.0.34
[wl2]ip route-static 192.168.0.112 28 192.168.0.17
[wl2]ip route-static 192.168.0.128 28 192.168.0.17
[wl2]ip route-static 192.168.0.144 28 192.168.0.17
[wl2]ip route-static 192.168.0.0 28 192.168.0.17
[wl2]ip route-static 0.0.0.0 0 192.168.0.34
AR3:
[wl3]int g0/0/0
[wl3-GigabitEthernet0/0/0]ip add 192.18.0.114 28
[wl3-GigabitEthernet0/0/0]int g0/0/1
[wl3-GigabitEthernet0/0/1]ip add 192.168.0.97 28
[wl3]int g0/0/2.1
[wl3-GigabitEthernet0/0/2.1]dot1q termination vid 2
[wl3-GigabitEthernet0/0/2.1]ip add 192.168.0.129 28
[wl3-GigabitEthernet0/0/2.1]arp broadcast enable
[wl3-GigabitEthernet0/0/2.1]q
[wl3]int g0/0/2.2
[wl3-GigabitEthernet0/0/2.2]dot1q termination vid 3
[wl3-GigabitEthernet0/0/2.2]ip add 192.168.0.145 28
[wl3-GigabitEthernet0/0/2.2]arp broadcast enable
[wl3]dhcp enable
[wl3]ip pool wl1
[wl3-ip-pool-wl1]network 192.168.0.128 mask 255.255.255.240
[wl3-ip-pool-wl1]gateway-list 192.168.0.129
wl3-ip-pool-wl1]dns-list 8.8.8.8
[wl3-ip-pool-wl1]q
[wl3]int g0/0/2.1
[wl3-GigabitEthernet0/0/2.1]dhcp select global
[wl3-GigabitEthernet0/0/2.1]q
[wl3]ip pool wl2
[wl3-ip-pool-wl2]network 192.168.0.144 mask 255.255.255.240
[wl3-ip-pool-wl2]gateway-list 192.168.0.145
[wl3-ip-pool-wl2]dns-list 8.8.8.8
[wl3-ip-pool-wl2]q
[wl3]int g0/0/2.2
[wl3-GigabitEthernet0/0/2.2]dhcp select global
[wl3]ip route-static 192.168.0.32 28 192.168.0.98
[wl3]ip route-static 192.168.0.80 28 192.168.0.98
[wl3]ip route-static 192.168.0.64 28 192.168.0.98
[wl3]ip route-static 192.168.0.16 28 192.168.0.113
[wl3]ip route-static 192.168.0.0 28 192.168.0.113
AR4:
[wl4]int g0/0/0
[wl4-GigabitEthernet0/0/0]ip add 192.168.0.34 28
[wl4-GigabitEthernet0/0/0]int g0/0/1
[wl4-GigabitEthernet0/0/1]ip add 192.168.0.98 28
[wl4-GigabitEthernet0/0/1]int g0/0/2
[wl4-GigabitEthernet0/0/2]ip add 192.168.0.65 28
[wl4-GigabitEthernet0/0/2]int g4/0/0
[wl4-GigabitEthernet4/0/0]ip add 192.168.0.81 28
[wl4]ip route-static 192.168.0.128 28 192.168.0.97
[wl4]ip route-static 192.168.0.144 28 192.168.0.97
[wl4]ip route-static 192.168.0.0 28 192.168.0.33
[wl4]ip route-static 192.168.0.16 28 192.168.0.33
[wl4]ip route-static 192.168.0.112 28 192.168.0.97
AR5:
[wl5]int g0/0/0
[wl5-GigabitEthernet0/0/0]ip add 192.168.0.66 28
[wl5-GigabitEthernet0/0/0]int g0/0/1
[wl5-GigabitEthernet0/0/1]ip add 100.1.1.1 24
[wl5-GigabitEthernet0/0/1]int g0/0/2
[wl5-GigabitEthernet0/0/2]ip add 192.168.0.82 28
[wl5]ip route-static 192.168.0.32 28 192.168.0.81
[wl5]ip route-static 192.168.0.16 28 192.168.0.81
[wl5]ip route-static 192.168.0.0 28 192.168.0.81
[wl5]ip route-static 192.168.0.112 28 192.168.0.81
[wl5]ip route-static 192.168.0.96 28 192.168.0.81
[wl5]ip route-static 192.168.0.128 28 192.168.0.81
[wl5]ip route-static 192.168.0.144 28 192.168.0.81
AR6:
[Huawei]sysname ISP
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 100.1.1.2 24
SW1:
[SW1]vlan batch 2 3
[SW1]int e0/0/3
[SW1-Ethernet0/0/3]port link-type access
[SW1-Ethernet0/0/3]port default vlan 2
[SW1-Ethernet0/0/3]q
[SW1]int e0/0/4
[SW1-Ethernet0/0/4]port link-type access
[SW1-Ethernet0/0/4]port default vlan 3
[SW1-Ethernet0/0/4]q
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]port link-type trunk
[SW1-Ethernet0/0/1]port trunk allow-pass vlan 2 to 3
[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]port link-type trunk
[SW1-Ethernet0/0/2]port trunk allow-pass vlan 2 to 3
SW2:
[SW2]vlan batch 2 3
[SW2]int e0/0/2
[SW2-Ethernet0/0/2]port link-type access
[SW2-Ethernet0/0/2]port default vlan 2
[SW2-Ethernet0/0/2]q
[SW2]int e0/0/3
[SW2-Ethernet0/0/3]port link-type access
[SW2-Ethernet0/0/3]port default vlan 3
[SW2-Ethernet0/0/3]q
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]port link-type trunk
[SW2-Ethernet0/0/1]port trunk allow-pass vlan 2 to 3
实验结果: