(1)网段划分如下:
172.16.0.0/16
区域0:
172.16.000 00000.0/19 172.16.0.0/19
172.16.000 00000.0/24 172.16.0.0/24
172.16.0.000000 00/30 172.16.0.0/30
172.16.0.000001 00/30 172.16.0.4/30
172.16.0.000010 00/30 172.16.8.0/30
172.16.000 00001.0/24 172.16.1.0/24
区域1:
172.16.001 00000.0/19 172.16.32.0/19
172.16.001 00000.0/24 172.16.32.0/24
172.16.32.00000 000/29 172.16.32.0/29
172.16.001 00001.0/24 172.16.33.0/24
172.16.001 00010.0/24 172.16.34.0/24
172.16.001 00011.0/24 172.16.35.0/24
区域2:
172.16.010 00000.0/19 172.16.64.0/19
172.16.010 00000.0/24 172.16.64.0/24
172.16.64.000000 00/30 172.16.64.0/30
172.16.64.000001 00/30 172.16.64.4/30
172.16.010 00001.0/24 172.16.65.0/24
172.16.010 00010.0/24 172.16.66.0/24
区域3:
172.16.011 00000.0/19 172.16.96.0/19
172.16.011 00000.0/24 172.16.96.0/24
172.16.96.000000 00/30 172.16.96.0/30
172.16.96.000001 00/30 172.16.96.4/30
172.16.011 00001.0/24 172.16.97.0/24
区域4:
172.16.100 00000.0/19 172.16.128.0/19
172.16.100 00000.0/24 172.16.128.0/24
172.16.128.000000 00/30 172.16.128.0/30
172.16.100 00001.0/24 172.16.129.0/24
RIP:
172.16.101 00000.0/19 172.16.160.0/19
172.16.101 00000.0/24 172.16.160.0/24
172.16.101 00001.0/24 172.16.161.0/24
网段划分图:

一、IP地址配置
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 172.16.33.1 24
[r1-GigabitEthernet0/0/0]int l0
[r1-LoopBack0]ip add 172.16.34.1 24
[r2] int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 172.16.33.2 24
[r2-GigabitEthernet0/0/0]int l0
[r2-LoopBack0] ip add 172.16.35.2 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 172.16.33.3 24
[r3-GigabitEthernet0/0/0]int l0
[r3-LoopBack0]ip add 172.16.36.3 24
[r3-LoopBack0]int s4/0/0
[r3-Serial4/0/0]ip add 34.0.0.3 24
[r4]int s4/0/0
[r4-Serial4/0/0]ip add 34.0.0.4 24
[r4-Serial4/0/0]int s4/0/1
[r4-Serial4/0/1]ip add 45.0.0.4 24
[r4-Serial4/0/1]int s3/0/0
[r4-Serial3/0/0]ip add 46.0.0.4 24
[r4-Serial3/0/0]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 47.0.0.4 24
[r4]int l0
[r4-LoopBack0] ip add 172.16.3.4 24
[r5]int s4/0/0
[r5-Serial4/0/0]ip add 45.0.0.5 24
[r5-Serial4/0/0]int l0
[r5-LoopBack0]ip add 172.16.2.5 24
[r6]int s4/0/0
[r6-Serial4/0/0]ip add 46.0.0.6 24
[r6-Serial4/0/0]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 172.16.66.1 30
[r6-GigabitEthernet0/0/0]int l0
[r6-LoopBack0]ip add 172.16.66.6 24
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.0.0.7 24
[r7-GigabitEthernet0/0/0]int g0/0/1
[r7-GigabitEthernet0/0/1]ip add 172.16.98.1 30
[r7-GigabitEthernet0/0/1]int l0
[r7-LoopBack0]ip add 172.16.98.7 24
[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip add 172.16.98.2 30
[r8-GigabitEthernet0/0/0]int g0/0/1
[r8-GigabitEthernet0/0/1]ip add 172.16.98.5 30
[r8-GigabitEthernet0/0/1]int l0
[r8-LoopBack0]ip add 172.16.99.8 24
[r9]int g0/0/0
[r9-GigabitEthernet0/0/0]ip add 172.16.98.6 30
[r9-GigabitEthernet0/0/0]int g0/0/1
[r9-GigabitEthernet0/0/1]ip add 172.16.130.1 30
[r9-GigabitEthernet0/0/1]int l0
[r9-LoopBack0]ip add 172.16.130.9 24
[r10]int g0/0/0
[r10-GigabitEthernet0/0/0]ip add 172.16.130.2 30
[r10-GigabitEthernet0/0/0]int l0
[r10-LoopBack0]ip add 172.16.131.10 24
[r11]int g0/0/0
[r11-GigabitEthernet0/0/0]ip add 172.16.66.2 30
[r11-GigabitEthernet0/0/0]int g0/0/1
[r11-GigabitEthernet0/0/1]ip add 172.16.66.5 30
[r11-GigabitEthernet0/0/1]int l0
[r11-LoopBack0]ip add 172.16.67.11 24
[r12]int g0/0/0
[r12-GigabitEthernet0/0/0]ip add 172.16.66.6 30
[r12-GigabitEthernet0/0/0]int l0
[r12-LoopBack0]ip add 172.16.160.12 24
[r12-LoopBack0]int l1
[r12-LoopBack1]ip add 172.16.161.12 24
二、公网通

三、配置MGRE
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 172.16.4.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
r3-Tunnel0/0/0]source 34.0.0.3
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ip add 172.16.4.5 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 45.0.0.5
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.16.4.3 34.0.0.3 register
[r6]int Tunnel 0/0/0
[r6-Tunnel0/0/0]ip add 172.16.4.6 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source 46.0.0.6
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp entry 172.16.4.3 34.0.0.3 register
[r7]int Tunnel 0/0/0
[r7-Tunnel0/0/0]ip add 172.16.4.7 24
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]nhrp entry 172.16.4.3 34.0.0.3 register
四、配置ospf
区域1:
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]network 172.16.33.0 0.0.0.255
[r1-ospf-1-area-0.0.0.1]network 172.16.34.0 0.0.0.255
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]network 172.16.33.0 0.0.0.255
[r2-ospf-1-area-0.0.0.1]network 172.16.35.0 0.0.0.255
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]network 172.16.33.0 0.0.0.255
[r3-ospf-1-area-0.0.0.1]network 172.16.36.0 0.0.0.255
区域2:
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]a 2
[r6-ospf-1-area-0.0.0.2]network 172.16.66.0 0.0.0.255
[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]a 2
[r11-ospf-1-area-0.0.0.2]network 172.16.67.0 0.0.0.255
[r11-ospf-1-area-0.0.0.2]network 172.16.66.0 0.0.0.255
[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]a 2
[r12-ospf-1-area-0.0.0.2]network 172.16.66.6 0.0.0.0
区域3:
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]a 3
[r7-ospf-1-area-0.0.0.3]network 172.16.98.0 0.0.0.255
[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1]a 3
[r8-ospf-1-area-0.0.0.3]network 172.16.99.0 0.0.0.255
[r8-ospf-1-area-0.0.0.3]network 172.16.98.0 0.0.0.255
[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]a 3
[r9-ospf-1-area-0.0.0.3]network 172.16.98.6 0.0.0.0
区域4:
[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2]a 4
[r9-ospf-2-area-0.0.0.4]network 172.16.130.0 0.0.0.255
[r9-ospf-2-area-0.0.0.4]network 172.16.130.1 0.0.0.0
[r10]ospf 2 router-id 10.10.10.10
[r10-ospf-2]a 4
[r10-ospf-2-area-0.0.0.4]network 172.16.131.0 0.0.0.255
[r10-ospf-2-area-0.0.0.4]network 172.16.130.2 0.0.0.0
rip区域:
[r12]rip 1
[r12-rip-1]v 2
[r12-rip-1]undo summary
[r12-rip-1]network 172.16.0.0

五、路由引入和配置easy ip
[r12-ospf-1]import-route rip
[r9-ospf-1]import-route ospf 2
[r9-ospf-2]import-route ospf 1
[r3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r3-Serial4/0/0]nat outbound 2000
[r6]acl 2000
[r6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r6-Serial4/0/0]nat outbound 2000
[r7]acl 2000
[r7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]nat outbound 2000
六 配置特殊区域

[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]stub no-summary
[R2]ospf 1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]stub no-summary
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]stub no-summary
[R6-ospf-1-area-0.0.0.2]nssa no-summary
[R11-ospf-1-area-0.0.0.2]nssa no-summary
[R12-ospf-1-area-0.0.0.2]nssa no-summary
[R7-ospf-1-area-0.0.0.3]nssa no-summary
[R8-ospf-1-area-0.0.0.3]nssa no-summary
[R9-ospf-1-area-0.0.0.3]nssa no-summary
七、加快收敛速度
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ospf timer hello 5
[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ospf timer hello 5
[r6]int Tunnel 0/0/0
[r6-Tunnel0/0/0]ospf timer hello 5
[r7]int Tunnel 0/0/0
[r7-Tunnel0/0/0]ospf timer hello 5
十 安全认证
area 0:
[r3]ospf 1
[r3-ospf-1]a 0
[r3-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 12345
[r5]ospf 1
[r5-ospf-1]a 0
[r5-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 12345
[r6]ospf 1
[r6-ospf-1]a 0
[r6-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 12345
[r7]ospf 1
[r7-ospf-1]a 0
[r7-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 12345
area 1:
[r1]ospf 1
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 12345
[r2]ospf 1
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 12345
[r3]ospf 1
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 12345
area 2:
[r6]ospf 1
[r6-ospf-1]a 2
[r6-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
[r11]ospf 1
[r11-ospf-1]a 2
[r11-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
[r12]ospf 1
[r12-ospf-1]a 2
[r12-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
area 3:
[r7-ospf-1]a 3
[r7-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 12345
[r8]ospf 1
[r8-ospf-1]a 3
[r8-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 12345
[r9]ospf 1
[r9-ospf-1]a 3
[r9-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 12345
area 4:
[r9]ospf 2
[r9]-ospf-2]a 4
[r9-ospf-2-area-0.0.0.4]authentication-mode md5 1 cipher 12345
[r10]ospf 2
[r10-ospf-2]a 4
[r10-ospf-2-area-0.0.0.4]authentication-mode md5 1 cipher 12345