一、实验要求
二、实验拓扑图
三、实验内容
1.接口配置
r1
LoopBack0 1.1.1.1/32
g0/0/0 192.168.1.1/24
r2
LoopBack0 2.2.2.2/32
g0/0/0 192.168.1.2/24
r3
LoopBack0 3.3.3.3/32
g0/0/0 192.168.1.3/24
g0/0/1 34.1.1.1/24
r4
LoopBack0 4.4.4.4/32
g0/0/0 34.1.1.2/24
g0/0/1 45.1.1.1/24
r5
LoopBack0 172.16.16.1/23
g0/0/0 45.1.1.2/24
g0/0/1 172.16.0.1/22
r6
LoopBack0 172.16.18.1/23
g0/0/0 172.16.8.1/22
g0/0/1 172.16.32.1/21
r7
LoopBack0 172.16.20.1/23
g0/0/0 172.16.4.1/22
g0/0/1 172.16.64.1/20
r8
LoopBack0 172.16.22.1/23
g0/0/0 172.16.12.1/22
g0/0/1 172.16.96.1/21
r9
LoopBack0 172.16.48.1/20
g0/0/0 172.16.64.2/20
g0/0/1 172.16.128.1/20
r10
LoopBack0 172.16.144.1/20
g0/0/0 172.16.128.2/20
r11
LoopBack0 172.16.112.1/21
g0/0/0 172.16.96.2/21
g0/0/1 172.16.104.1/21
r12
LoopBack0 172.16.120.1/21
g0/0/0 172.16.104.2/21
r13
LoopBack0 172.16.48.1/20
g0/0/0 172.16.32.2/21
g0/0/1 172.16.40.1/21
r14
LoopBack1 172.16.176.1/21
LoopBack2 172.16.184.1/21
g0/0/0 172.16.40.2/21
r15
LoopBack0 172.16.24.1/23
g0/0/0 172.16.0.2/22
g0/0/1 172.16.4.2/22
g0/0/2 172.16.8.2/22
e4/0/0 172.16.12.2/22
2.配置OSPF
例
[r1]ospf 100 router-id 1.1.1.1
[r1-ospf-100]area 0
[r1-ospf-100-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r1-ospf-100-area-0.0.0.0]network 192.168.1.0 0.0.0.255
3.配置NAT
例
[r3]acl 2000
[r3-acl-basic-2000]rule permit source any
[r3-acl-basic-2000]qu
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]nat outbound 2000
Info: The NAT address pool is empty
4.解决不规则区域
111 area5 不同进程
双向重发布
[r14]ospf 110
[r14-ospf-110]import-route ospf 111
110 area4
虚电路(在边界路由ABR上)
[r7]ospf 110
[r7-ospf-110]area 2 //要穿过的中间区域
[r7-ospf-110-area-0.0.0.2]vlink-peer 11.11.11.11 //目标路由的id
[r14]ospf 110
[r14-ospf-110]area 2
[r14-ospf-110-area-0.0.0.2]vlink-peer 7.7.7.7
100 area0
tunnel隧道
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 192.168.2.1 24 //隧道ip地址
[r3-Tunnel0/0/0]tunnel-protocol gre
[r3-Tunnel0/0/0]source g0/0/1 //原接口
[r3-Tunnel0/0/0]description 45.1.1.2 //目的接口
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 192.168.2.2 24
[r5-Tunnel0/0/0]tunnel-protocol gre
[r5-Tunnel0/0/0]source g0/0/0
[r5-Tunnel0/0/0]description 34.1.1.1
宣告隧道ip地址
[r3]ospf 100
[r3-ospf-100]area 0
[r3-ospf-100-area-0.0.0.0]network 192.168.2.1 0.0.0.0
[r5]ospf 110
[r5-ospf-110]area 0
[r5-ospf-110-area-0.0.0.0]network 192.168.2.2 0.0.0.0