一 实验要求
1 R4为ISP,其中只能配置IP地址;R4与其他的所有直连设备均使用公网直连
2 R3-R5/6/7为MGRE环境,其中R3为中心站点
3 整个OSPF环境IP均基于172.16.0.0/16进行划分
4 所有设备均可以访问R4的环回
5 减少LSA更新量,加快收敛,保障更新安全。
6 全网可达
二 配置思路
首先,规划好所有的IP地址,以方便进行汇总。其次先配置R3 -5/6/7的MGRE环境。配置好之后,在配置剩下的路由器的环回接口以及骨干IP地址。全部的IP地址配置完之后,就开始启动OSPF协议,针对在MGRE环境下,OSPF协议出现的问题进行解决。 解决完之后就设置特殊区域和汇总以达到优化LSA的目的。 再接着配置下认证,对路由器设置缺省,以及配NAT以到达内网访问公网的需求
三 IP地址规划
172.16.0.0/16
172.16.0.0 /19 区域0 172.16.0.0 /25 172.16.0.128 /25 172.16.1.0 /25 -----172.16.31.128 /25
172.16.0.0 /25 -/30点到点骨干 172.16.0.128 /25 --- /29MA骨干
172.16.32.0/19 区域1
172.16.64.0/19 区域2
172.16.96.0/19 区域3
172.16.128.0/19 区域4
172.16.160.0/19 rip
172.16.192.0/19
172.16.224.0/19
四 MGRE环境配置
R3:
sysname r3
ip route-static 0.0.0.0 0.0.0.0 34.1.1.2
interface GigabitEthernet0/0/1
ip address 34.1.1.1 255.255.255.0
interface Tunnel0/0/0
ip address 172.16.0.129 255.255.255.248
tunnel-protocol gre p2mp
source 34.1.1.1
nhrp entry multicast dynamic
R5
sysname r5
ip route-static 0.0.0.0 0.0.0.0 45.1.1.2
interface GigabitEthernet0/0/0
ip address 45.1.1.1 255.255.255.0
interface Tunnel0/0/0
ip address 172.16.0.130 255.255.255.248
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
nhrp entry 172.16.0.129 34.1.1.1 register
R6
sysname r6
ip route-static 0.0.0.0 0.0.0.0 46.1.1.2
interface GigabitEthernet0/0/0
ip address 46.1.1.1 255.255.255.0
interface Tunnel0/0/0
ip address 172.16.0.131 255.255.255.248
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
nhrp entry 172.16.0.129 34.1.1.1 register
R7
sysname r7
ip route-static 0.0.0.0 0.0.0.0 47.1.1.2
interface GigabitEthernet0/0/0
ip address 47.1.1.1 255.255.255.0
interface Tunnel0/0/0
ip address 172.16.0.132 255.255.255.248
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
nhrp entry 172.16.0.129 34.1.1.1 register
五 启动OSPF协议以及LSA优化
R1:
interface GigabitEthernet0/0/0
ip address 172.16.32.129 255.255.255.248
ospf authentication-mode md5 1 cipher 123456
interface LoopBack0
ip address 172.16.33.1 255.255.255.128
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 172.16.32.0 0.0.1.255
stub ----设置为神经末梢区域 LSA优化
R2:
interface GigabitEthernet0/0/0
ip address 172.16.32.130 255.255.255.248
ospf authentication-mode md5 1 123456
interface LoopBack0
ip address 172.16.33.129 255.255.255.128
ospf 1 router-id 2.2.2.2
area 0.0.0.1
network 172.16.32.0 0.0.1.255
stub ----LSA优化
R3:
interface GigabitEthernet0/0/0
ip address 172.16.32.131 255.255.255.248
ospf authentication-mode md5 1 cipher 123456
interface LoopBack0
ip address 172.16.34.1 255.255.255.128
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 172.16.0.129 0.0.0.0
area 0.0.0.1
abr-summary 172.16.32.0 255.255.224.0
network 172.16.32.0 0.0.3.255
stub no-summary---设置为完全神经末梢区域 LSA优化
R5:
interface LoopBack0
ip address 172.16.1.1 255.255.255.128
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 172.16.0.0 0.0.1.255
R6:
interface LoopBack0
ip address 172.16.1.129 255.255.255.128
interface GigabitEthernet0/0/1
ip address 172.16.64.1 255.255.255.252
ospf authentication-mode md5 3 cipher 123456
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 172.16.0.0 0.0.1.255
area 0.0.0.2
abr-summary 172.16.64.0 255.255.224.0
network 172.16.64.1 0.0.0.0
nssa no-summary---设置为完全NSSA LSA优化
R7:
interface LoopBack0
ip address 172.16.2.1 255.255.255.128
interface GigabitEthernet0/0/1
ip address 172.16.96.1 255.255.255.252
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 172.16.0.0 0.0.3.255
area 0.0.0.3
abr-summary 172.16.96.0 255.255.224.0
network 172.16.96.1 0.0.0.0
nssa no-summary ---设置完全NSSA LSA优化
R8:
interface GigabitEthernet0/0/0
ip address 172.16.96.2 255.255.255.252
interface GigabitEthernet0/0/1
ip address 172.16.96.5 255.255.255.252
interface LoopBack0
ip address 172.16.97.1 255.255.255.128
ospf 1 router-id 8.8.8.8
area 0.0.0.3
network 172.16.96.0 0.0.1.255
nssa ----LSA优化
R9:
interface GigabitEthernet0/0/0
ip address 172.16.96.6 255.255.255.252
interface GigabitEthernet0/0/1
ip address 172.16.128.1 255.255.255.252
interface LoopBack0
ip address 172.16.129.1 255.255.255.128
ospf 1 router-id 9.9.9.9
asbr-summary 172.16.128.0 255.255.224.0
import-route ospf 2
area 0.0.0.3
network 172.16.96.6 0.0.0.0
nssa ----LSA优化
ospf 2
default-route-advertise
area 0.0.0.4
network 172.16.128.0 0.0.1.255
R10:
interface GigabitEthernet0/0/0
ip address 172.16.128.2 255.255.255.252
interface LoopBack0
ip address 172.16.129.129 255.255.255.128
ospf 1 router-id 10.10.10.10
area 0.0.0.4
network 172.16.128.0 0.0.1.255
R11:
interface LoopBack0
ip address 172.16.65.1 255.255.255.128
ip address 172.16.64.2 255.255.255.252
ospf authentication-mode md5 3 cipher 123456
ip address 172.16.64.5 255.255.255.252
ospf authentication-mode md5 3 cipher 123456
ospf 1 router-id 11.11.11.11
area 0.0.0.2
network 172.16.64.0 0.0.1.255
nssa ----LSA优化
R12:
interface GigabitEthernet0/0/0
ip address 172.16.64.6 255.255.255.252
ospf authentication-mode md5 3 cipher 123456
interface LoopBack0
ip address 172.16.160.1 255.255.255.128
interface LoopBack1
ip address 172.16.160.129 255.255.255.128
ospf 1 router-id 12.12.12.12
asbr-summary 172.16.160.0 255.255.224.0
import-route rip 1
area 0.0.0.2
network 172.16.64.6 0.0.0.0
nssa -----LSA优化
rip 1
version 2
network 172.16.0.0
import-route ospf 1
运行截图
优化后截图
R1
R5R12
六 配置NAT 访问换回接口
R3
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
interface GigabitEthernet0/0/1
nat outbound 2000
R6:
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
interface GigabitEthernet0/0/0
nat outbound 2000
R7:
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
interface GigabitEthernet0/0/0
nat outbound 2000
运行截图
七 总结
此次实验,让我更加了解了LSA的运行过程,以及如何在中大型网络对LSA进行优化。也让我更加熟悉对OSPF配置的操作命令。刚开始配置的时候,也会遇到一些不懂得问题。通过一层一层的排错,也是及时的改正了。此次实验也让我知道了特殊区域对LSA的优化是如何在正常环境下面操作的。总之此次实验让我受益匪浅