HCIA--路由优先级实验

HCIA--路由优先级实验_第1张图片

要求:

1. pc1访问pc3,4,5走上面,R1-R2实现备份21.1.1.0/24实现备份;

2. pc3,4,5,6访问pc1,2走下面,  R3,4之间实现等价路由,尽量减少路由条目,实现全网可达,pc7代表运营商 所有pc均可访问 

1. 划分网段,配IP地址,其中PC1-PC6用DHCP动态获取IP:

AR1:
[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
AR2:
[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
AR3:
[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
AR4:
[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
 AR5:
[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
AR6:
[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

HCIA--路由优先级实验_第2张图片

pc1访问pc3,4,5走上面,R1-R2实现备份21.1.1.0/24实现备份的配置:

AR1配置:
[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
AR2配置:
[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
AR4配置:
[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
AR5配置:
[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
AR6配置:
[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

pc1访问pc3,4,5走上面,测试结果:

AR6访问PC3的路径:

HCIA--路由优先级实验_第3张图片

2. PC3,4,5,6访问PC1,2走下面:

AR3配置:
[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
 PC3访问PC1的路径:

 HCIA--路由优先级实验_第4张图片

R3,4之间实现等价路由:

AR4配置:
[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

所有PC均可访问PC7测试结果:

PC1 ping PC7接口:

HCIA--路由优先级实验_第5张图片

PC3 pingPC7接口:

HCIA--路由优先级实验_第6张图片

你可能感兴趣的:(网络,ip,华为)