1.划分网段,子网划分已完成;接口配置:
AR1配置 :
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.64.1 20
[Huawei-GigabitEthernet0/0/0]qu
[Huawei]int l0
[Huawei-LoopBack0]ip add 172.16.80.1 20
AR2配置:
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.64.2 20
[Huawei-GigabitEthernet0/0/0]qu
[Huawei]int l0
[Huawei-LoopBack0]ip add 172.16.112.1 20
[Huawei-LoopBack0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.96.1 20
AR3配置:
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.96.2 20
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 172.16.0.3 19
[Huawei-GigabitEthernet0/0/1]qu
[Huawei]int l0
[Huawei-LoopBack0]ip add 172.16.32.1 19
AR4配置:
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.0.4 19
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 172.16.136.1 21
[Huawei-GigabitEthernet0/0/1]qu
[Huawei]int l0
[Huawei-LoopBack0]ip add 172.16.128.1 21
AR5配置:
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.0.5 19
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 172.16.136.2 21
[Huawei-GigabitEthernet0/0/2]qu
[Huawei]int l0
[Huawei-LoopBack0]ip add 172.16.144.1 21
[Huawei-LoopBack0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 172.16.152.1 21
AR6配置:
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.0.6 19
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 172.16.152.1 21
[Huawei-GigabitEthernet0/0/1]qu
[Huawei]int l0
[Huawei-LoopBack0]ip add 172.16.160.1 20
2. OSPF配置和明文、密文认证,区域汇总:
AR1:
[Huawei]ospf 100 router-id 1.1.1.1
[Huawei-ospf-100]area 1
[Huawei-ospf-100-area-0.0.0.1]network 0.0.0.0 255.255.255.255
[Huawei]int g0/0/0 #AR1,2之间做明文认证
[Huawei-GigabitEthernet0/0/0]ospf authentication-mode simple cipher 123
[Huawei]ospf 100 #area1 区域做明文认证
[Huawei-ospf-100]area 1
[Huawei-ospf-100-area-0.0.0.1]authentication-mode simple cipher 123
[Huawei]int g0/0/0 #加快收敛速度
[Huawei-GigabitEthernet0/0/0]ospf timer hello 5
AR2:
[Huawei]ospf 100 router-id 2.2.2.2
[Huawei-ospf-100]area 1
[Huawei-ospf-100-area-0.0.0.1]network 0.0.0.0 255.255.255.255
[Huawei]int g0/0/1 #AR1,2之间做明文认证
[Huawei-GigabitEthernet0/0/0]ospf authentication-mode simple cipher 123
[Huawei]int g0/0/1 #AR2,3之间做密文认证
[Huawei-GigabitEthernet0/0/1]ospf authentication-mode simple cipher 123
[Huawei-GigabitEthernet0/0/1]ospf authentication-mode md5
[Huawei]ospf 100 #area1区域做明文认证
[Huawei-ospf-100]area 1
[Huawei-ospf-100-area-0.0.0.1]authentication-mode simple cipher 123
[Huawei]int g0/0/0 #加快收敛速度
[Huawei-GigabitEthernet0/0/0]ospf timer hello 5
[Huawei]int g0/0/1 #加快收敛速度
[Huawei-GigabitEthernet0/0/1]ospf timer hello 5
AR3:
[Huawei]ospf 100 router-id 3.3.3.3
[Huawei-ospf-100]area 1
[Huawei-ospf-100-area-0.0.0.1]network 172.16.96.2 0.0.0.0
[Huawei-ospf-100-area-0.0.0.1]qu
[Huawei-ospf-100]area 0
[Huawei-ospf-100-area-0.0.0.0]network 172.16.0.3 0.0.0.0
[Huawei-ospf-100-area-0.0.0.0]network 172.16.32.1 0.0.0.0
[Huawei]int g0/0/0 #AR2,3之间做密文认证
[Huawei-GigabitEthernet0/0/0]ospf authentication-mode simple cipher 123
[Huawei-GigabitEthernet0/0/0]ospf authentication-mode md5
[Huawei]ospf 100 #area1区域做明文认证
[Huawei-ospf-100]area 1
[Huawei-ospf-100-area-0.0.0.1]authentication-mode simple cipher 123
[Huawei]int g0/0/0 #加快收敛速度
[Huawei-GigabitEthernet0/0/0]ospf timer hello 5
[Huawei]ospf 100 #做区域汇总
[Huawei-ospf-100]area 1
[Huawei-ospf-100-area-0.0.0.1]abr-summary 172.16.64.0 255.255.192.0
AR4:
[Huawei]ospf 100 router-id 4.4.4.4
[Huawei-ospf-100]area 0
[Huawei-ospf-100-area-0.0.0.0]network 172.16.0.4 0.0.0.0
[Huawei-ospf-100-area-0.0.0.0]qu
[Huawei-ospf-100]area 2
#[Huawei-ospf-100-area-0.0.0.2]network 172.16.128.1 0.0.0.0
[Huawei-ospf-100-area-0.0.0.2]network 172.16.136.1 0.0.0.0
[Huawei]ospf 100 #强制下放IP地址
[Huawei-ospf-100]default-route-advertise always
[Huawei]int g0/0/0 #改dr优先级
[Huawei-GigabitEthernet0/0/0]ospf dr-priority 0
[Huawei]ospf 100 #area2区域做密文认证
[Huawei-ospf-100]area 2
[Huawei-ospf-100-area-0.0.0.2]authentication-mode simple cipher 123
[Huawei-ospf-100-area-0.0.0.2]authentication-mode md5
[Huawei]ospf 100 #AR4的骨干和环回汇总
[Huawei-ospf-100]area 2
[Huawei-ospf-100-area-0.0.0.2]abr-summary 172.16.128.0 255.255.240.0
AR5:
[Huawei]ospf 100 router-id 5.5.5.5
[Huawei-ospf-100]area 0
[Huawei-ospf-100-area-0.0.0.0]network 172.16.0.5 0.0.0.0
[Huawei-ospf-100-area-0.0.0.0]qu
[Huawei-ospf-100]area 2
[Huawei-ospf-100-area-0.0.0.2]network 172.16.152.1 0.0.0.0
[Huawei-ospf-100-area-0.0.0.2]network 172.16.136.2 0.0.0.0
[Huawei-ospf-100-area-0.0.0.2]network 172.16.144.1 0.0.0.0
[Huawei]int g0/0/0 #改dr优先级
[Huawei-GigabitEthernet0/0/0]ospf dr-priority 0
[Huawei]ospf 100 #area2区域做密文认证
[Huawei-ospf-100]area 2
[Huawei-ospf-100-area-0.0.0.2]authentication-mode simple cipher 123
[Huawei-ospf-100-area-0.0.0.2]authentication-mode md5
[Huawei]ospf 100 #做区域汇总
[Huawei-ospf-100]area 2
[Huawei-ospf-100-area-0.0.0.2]abr-summary 172.16.144.0 255.255.240.0
AR6:
[Huawei]int g0/0/0 #修改dr优先级
[Huawei-GigabitEthernet0/0/0]ospf dr-priority 0
[Huawei]ospf 100 #area2区域做密文认证
[Huawei-ospf-100]area 2
[Huawei-ospf-100-area-0.0.0.2]authentication-mode simple cipher 123
[Huawei-ospf-100-area-0.0.0.2]authentication-mode md5