
基础 IP 配置
R1
int g 0/0/0
ip add 172.16.33.1 255.255.255.248
int l 0
ip add 172.16.34.1 255.255.255.0
R2
int g 0/0/0
ip add 172.16.33.2 255.255.255.248
int l 0
ip add 172.16.35.1 255.255.255.0
R3
int g 0/0/0
ip add 172.16.33.3 255.255.255.248
int l 0
ip add 172.16.36.1 255.255.255.0
int s 4/0/0
ip add 34.0.0.1 255.255.255.252
R4 (ISP)
int s 4/0/0
ip add 34.0.0.2 255.255.255.252
int s 4/0/1
ip add 54.0.0.2 255.255.255.0
int s 3/0/0
ip add 64.0.0.2 255.255.255.0
int g 0/0/0
ip add 74.0.0.2 255.255.255.0
int l 0
ip add 4.4.4.4 255.255.255.0
R5
int s4/0/0
ip add 54.0.0.1 255.255.255.0
ip route-static 0.0.0.0 0 54.0.0.2
R6
int s 4/0/0
ip add 64.0.0.1 255.255.255.0
int g 0/0/0
ip add 172.16.65.1 255.255.255.248
ip route-static 0.0.0.0 0 64.0.0.2
R7
int g 0/0/0
ip add 74.0.0.1 255.255.255.0
int g 0/0/1
ip add 172.16.97.1 255.255.255.248
ip route-static 0.0.0.0 0 74.0.0.2
R8
int g 0/0/0
ip add 172.16.97.2 255.255.255.248
int l 0
ip add 172.16.98.1 255.255.255.0
int g 0/0/1
ip add 172.16.97.3 255.255.255.248
R9
int g 0/0/0
ip add 172.16.97.4 255.255.255.248
int g 0/0/1
ip add 172.16.129.1 255.255.255.248
int l0
ip add 172.16.130.1 255.255.255.0
R10
int g 0/0/0
ip add 172.16.129.2 255.255.255.248
int l 0
ip add 172.16.131.1 255.255.255.0
R11
int g 0/0/0
ip add 172.16.65.2 255.255.255.248
int l 0
ip add 172.16.66.1 255.255.255.0
int g 0/0/1
ip add 172.16.65.3 255.255.255.248
R12
int g 0/0/0
ip add 172.16.65.4 255.255.255.248
int l 1
ip add 172.16.176.1 255.255.240.0
int l 0
ip add 172.16.160.1 255.255.240.0
MGRE 配置
R3
int t 0/0/0
ip add 172.16.1.1 255.255.255.248
tunnel-protocol gre p2mp
source 34.0.0.1
nhrp network-id 100
nhrp entry multicast dynamic
R5
int t 0/0/0
ip add 172.16.1.2 255.255.255.248
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register
int l 0
ip add 172.16.2.1 255.255.255.0
R6
int t 0/0/0
ip add 172.16.1.3 255.255.255.248
tunnel-protocol gre p2mp
source s 4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register
int l 0
ip add 172.16.3.1 255.255.255.0
R7
int t 0/0/0
ip add 172.16.1.4 255.255.255.248
tunnel-protocol gre p2mp
source g 0/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register
int l 0
ip add 172.16.4.1 255.255.255.0
OSPF RIP 配置
R1
ospf 1 router-id 1.1.1.1
area 1
network 172.16.33.0 0.0.0.255
network 172.16.34.0 0.0.0.255
R2
ospf 1 router-id 2.2.2.2
area 1
network 172.16.33.0 0.0.0.255
network 172.16.35.0 0.0.0.255
R3
ospf 1 router-id 3.3.3.3
area 1
network 172.16.33.3 0.0.0.0
network 172.16.36.1 0.0.0.0
area 0
network 172.16.1.0 0.0.0.255
int t 0/0/0
ospf network-type p2mp
R5
ospf 1 router-id 5.5.5.5
area 0
network 172.16.1.0 0.0.0.255
network 172.16.2.0 0.0.0.255
int t 0/0/0
ospf network-type p2mp
R6
ospf 1 router-id 6.6.6.6
area 0
network 172.16.1.0 0.0.0.255
network 172.16.3.0 0.0.0.255
area 2
network 172.16.65.0 0.0.0.255
int t 0/0/0
ospf network-type p2mp
R7
ospf 1 router-id 7.7.7.7
area 0
network 172.16.1.0 0.0.0.255
network 172.16.4.0 0.0.0.255
area 3
network 172.16.97.0 0.0.0.255
int t 0/0/0
ospf network-type p2mp
R8
ospf 1 router-id 8.8.8.8
area 3
network 172.16.97.0 0.0.0.255
network 172.16.98.0 0.0.0.255
R9
ospf 1 router-id 9.9.9.9
area 3
network 172.16.97.0 0.0.0.255
area 4
network 172.16.129.0 0.0.0.255
network 172.16.130.0 0.0.0.255
ospf 2 router-id 19.19.19.19
area 4
network 172.16.129.0 0.0.0.255
network 172.16.130.0 0.0.0.255
ospf 1
import-route ospf 2
R10
ospf 1 router-id 10.10.10.10
area 4
network 172.16.129.0 0.0.0.255
network 172.16.131.0 0.0.0.255
R11
ospf 1 router-id 11.11.11.11
area 2
network 172.16.65.0 0.0.0.255
network 172.16.66.0 0.0.0.255
R12
ospf 1 router-id 12.12.12.12
area 2
network 172.16.65.0 0.0.0.255
import-route rip 1
rip 1
version 2
network 172.16.0.0
减少LSA更新量
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
[r3]ip route-static 172.16.32.0 19 NULL 0
[r6]ospf 1
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.224.0
[r6]ip route-static 172.16.64.0 19 NULL 0
[r7]ospf 1
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.224.0
[r7]ip route-static 172.16.96.0 19 NULL 0
[r9]ospf 1
[r9-ospf-1]asbr-summary 172.16.128.0 255.255.224.0
[r9]ip route-static 172.16.128.0 19 NULL 0
[r12]ospf 1
[r12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0
[r9]ip route-static 172.16.160.0 19 NULL 0
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]stub
[r2-ospf-1]area 1
[r2-ospf-1-area-0.0.0.1]stub
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]stub no-summary
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]nssa no-summary
[r11-ospf-1]area 2
[r11-ospf-1-area-0.0.0.2]nssa
[r12-ospf-1]area 2
[r12-ospf-1-area-0.0.0.2]nssa
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]nssa no-summary
[r8-ospf-1]area 3
[r8-ospf-1-area-0.0.0.3]nssa
[r9-ospf-1]area 3
[r9-ospf-1-area-0.0.0.3]nssa
[r9]ospf 2
[r9-ospf-2]default-route-advertise
加快收敛
[r3]int t 0/0/0
[r3-Tunnel0/0/0]ospf timer hello 10
[r5]int t 0/0/0
[r5-Tunnel0/0/0]ospf timer hello 10
[r5-Tunnel0/0/0]
[r6]int t 0/0/0
[r6-Tunnel0/0/0]ospf timer hello 10
[r7]int t 0/0/0
[r7-Tunnel0/0/0]ospf timer hello 10
配置NAT环境,完成所有设备访问R4环回
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255----R4环回的地址
[r3]int s 4/0/0
[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]int s 4/0/0
[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]int g 0/0/0
[r7-GigabitEthernet0/0/0]nat outbound 2000
全网可达
[r1]ospf 1
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[r2]ospf 1
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[r3]ospf 1
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456