1. pc1访问pc3,4,5走上面,R1-R2实现备份21.1.1.0/24实现备份;
2. pc3,4,5,6访问pc1,2走下面, R3,4之间实现等价路由,尽量减少路由条目,实现全网可达,pc7代表运营商 所有pc均可访问
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 12.1.1.1 24
[Huawei-GigabitEthernet0/0/1]int g4/0/0
[Huawei-GigabitEthernet4/0/0]ip add 21.1.1.1 24
[Huawei-GigabitEthernet4/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 13.1.1.1 24
[Huawei-GigabitEthernet0/0/2]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 16.1.1.2 24
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 21.1.1.2 24
[Huawei-GigabitEthernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 24.1.1.1 24
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 13.1.1.2 24
[Huawei-GigabitEthernet0/0/1]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 34.1.1.1 24
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 43.1.1.1 24
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 24.1.1.2 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 34.1.1.2 24
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 43.1.1.2 24
[Huawei-GigabitEthernet0/0/2]int g4/0/0
[Huawei-GigabitEthernet4/0/0]ip add 45.1.1.1 24
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 45.1.1.2 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.1.1 24
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 192.168.2.1 24
[Huawei]dhcp enable
[Huawei]ip pool 1
[Huawei-ip-pool-1]network 192.168.1.0 mask 255.255.255.0
[Huawei-ip-pool-1]gateway-list 192.168.1.1
[Huawei-ip-pool-1]dns-list 8.8.8.8
[Huawei-ip-pool-1]qu
[Huawei]ip pool 2
[Huawei-ip-pool-2]network 192.168.2.0 mask 255.255.255.0
[Huawei-ip-pool-2]gateway-list 192.168.2.1
[Huawei-ip-pool-2]dns-list 8.8.8.8
[Huawei-ip-pool-2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select global
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]dhcp select global
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 16.1.1.1 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 172.16.1.1 24
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 67.1.1.1 24
[Huawei-GigabitEthernet0/0/2]qu
[Huawei]dhcp enable
[Huawei]ip pool 1
[Huawei-ip-pool-1]network 172.16.1.0 mask 255.255.255.0
[Huawei-ip-pool-1]gateway-list 172.16.1.1
[Huawei-ip-pool-1]dns-list 8.8.8.8
[Huawei-GigabitEthernet0/0/1]dhcp select global
[Huawei]ip route-static 172.1.1.0 24 16.1.1.1
[Huawei]ip route-static 24.1.1.0 24 12.1.1.2
[Huawei]ip route-static 24.1.1.0 24 12.1.1.2 preference 61
[Huawei]ip route-static 45.1.1.0 24 12.1.1.2
[Huawei]ip route-static 45.1.1.0 24 12.1.1.2 preference 61
[Huawei]ip route-static 192.168.0.0 22 12.1.1.2
[Huawei]ip route-static 192.168.0.0 22 21.1.1.2 preference 61
[Huawei]ip route-static 0.0.0.0 0 16.1.1.1 #均可访问PC7
[Huawei]ip route-static 172.16.1.0 24 12.1.1.1
[Huawei]ip route-static 172.16.1.0 24 21.1.1.1 preference 61
[Huawei]ip route-static 16.1.1.0 24 12.1.1.1
[Huawei]ip route-static 16.1.1.0 24 21.1.1.1 preference 61
[Huawei]ip route-static 45.1.1.0 24 24.1.1.2
[Huawei]ip route-static 192.168.0.0 22 24.1.1.2
[Huawei]ip route-static 0.0.0.0 0 12.1.1.1
[Huawei]ip route-static 0.0.0.0 0 21.1.1.1 #均可访问PC7
[Huawei]ip route-static 16.1.1.0 24 24.1.1.1
[Huawei]ip route-static 21.1.1.0 24 24.1.1.1
[Huawei]ip route-static 192.168.0.0 22 45.1.1.2
[Huawei]ip route-static 172.16.1.0 24 24.1.1.1
[Huawei]ip route-static 0.0.0.0 0 24.1.1.1 #均可访问PC7
[Huawei]ip route-static 16.1.1.0 24 45.1.1.1
[Huawei]ip route-static 172.16.1.0 24 45.1.1.1
[Huawei]ip route-static 12.1.1.0 24 45.1.1.1
[Huawei]ip route-static 21.1.1.0 24 45.1.1.1
[Huawei]ip route-static 24.1.1.0 24 45.1.1.1
[Huawei]ip route-static 192.168.0.0 22 NULL 0 #防止环路
[Huawei]ip route-static 0.0.0.0 0 45.1.1.1 #均可访问PC7
[Huawei]ip route-static 12.1.1.0 24 16.1.1.2
[Huawei]ip route-static 21.1.1.0 24 16.1.1.2
[Huawei]ip route-static 24.1.1.0 24 16.1.1.2
[Huawei]ip route-static 45.1.1.0 24 16.1.1.2
[Huawei]ip route-static 192.168.0.0 22 16.1.1.2
[Huawei]ip route-static 0.0.0.0 0 67.1.1.2 #均可访问PC7
[Huawei]ip route-static 172.16.1.0 24 13.1.1.1
[Huawei]ip route-static 192.168.0.0 22 34.1.1.2
[Huawei]ip route-static 192.168.0.0 22 43.1.1.2
[Huawei]ip route-static 172.16.1.0 24 34.1.1.1
[Huawei]ip route-static 172.16.1.0 24 43.1.1.1