OSPF特殊区域
- 实验拓扑
- 实验要求
1,R4为ISP,其上只能配置IP地址;R4与其他所有直连设备间均使用公有IP
2,R3-R5/6/7为MGRE环境,R3为中心站点;
3,整个OSPF环境IP基于172.16.0.0/16划分;
4,所有设备均可访问R4的环回;
5,减少LSA的更新量,加快收敛,保障更新安全;
6,全网可达
- 实验配置
1,R4为ISP,其上只能配置IP地址;R4与其他所有直连设备间均使用公有IP
R4:
interface Serial3/0/0
link-protocol ppp
ip address 14.1.1.2 255.255.255.0
interface Serial3/0/1
link-protocol ppp
interface Serial4/0/0
link-protocol ppp
ip address 12.1.1.2 255.255.255.0
interface Serial4/0/1
link-protocol ppp
ip address 13.1.1.2 255.255.255.0
interface GigabitEthernet0/0/0
ip address 15.1.1.2 255.255.255.0
interface LoopBack0
ip address 4.4.4.4 255.255.255.0
R3:
interface Serial4/0/0
link-protocol ppp
ip address 12.1.1.1 255.255.255.0
R5:
interface Serial4/0/0
link-protocol ppp
ip address 13.1.1.1 255.255.255.0
R6:
interface Serial4/0/0
link-protocol ppp
ip address 14.1.1.1 255.255.255.0
R7:
interface GigabitEthernet0/0/0
ip address 15.1.1.1 255.255.255.0
2,R3-R5/6/7为MGRE环境,R3为中心站点;
R3:
interface Tunnel0/0/0
ip address 172.16.16.1 255.255.240.0
tunnel-protocol gre p2mp
source 12.1.1.1
ospf network-type broadcast ————————将接口网络类型修改为广播
nhrp entry multicast dynamic
nhrp network-id 10
R5:
interface Tunnel0/0/0
ip address 172.16.16.2 255.255.240.0
tunnel-protocol gre p2mp
source 13.1.1.1
ospf network-type broadcast ————————将接口网络类型修改为广播 ospf dr-priority 0 ————————放弃选举
nhrp network-id 10
nhrp entry 172.16.16.1 12.1.1.1 register
R6:
interface Tunnel0/0/0
ip address 172.16.16.3 255.255.240.0
tunnel-protocol gre p2mp
source 14.1.1.1
ospf network-type broadcast ————————将接口网络类型修改为广播 ospf dr-priority 0 ————————放弃选举
nhrp network-id 10
nhrp entry 172.16.16.1 12.1.1.1 register
R7:
interface Tunnel0/0/0
ip address 172.16.16.4 255.255.240.0
tunnel-protocol gre p2mp
source 15.1.1.1
ospf network-type broadcast ————————将接口网络类型修改为广播ospf dr-priority 0 ————————放弃选举
nhrp network-id 10
nhrp entry 172.16.16.1 12.1.1.1 register
查看各个分支站点注册情况
3,整个OSPF环境IP基于172.16.0.0/16划分;
4,所有设备均可访问R4的环回;
在R3/5/6/7上配置NAT,并在出接口处调用,以R3为例
rule 5 permit source 172.16.0.0 0.0.255.255
nat outbound 2000
5,减少LSA的更新量,加快收敛,保障更新安全
将AREA 1/3/4配置为Totally Stub区域
AREA 1作为Totally Stub区域前R1/R2
AREA 1作为Totally Stub区域后R1/R2
AREA 3作为Totally Stub区域前R8 AREA 3作为Totally Stub区域后 R8
解决AREA 4区域没有连接到骨干问题:
通过让没有连接到骨干区域的路由器,和区域0中的路由器连接隧道,并且将隧道宣告在区域0中使得,ABR设备合法化
R7:
interface Tunnel0/0/1
ip address 172.16.160.1 255.255.224.0
tunnel-protocol gre
source 172.16.32.1
destination 172.16.48.2
R9:
interface Tunnel0/0/1
ip address 172.16.160.2 255.255.224.0
tunnel-protocol gre
source 172.16.48.2
destination 172.16.32.1
AREA 4作为Totally Stub区域前R10 AREA 4作为Totally Stub区域后R10
Totally Stub区域既不允许AS外部路由在本区域内传播,也不允许区域间路由在本区域内传播,图中显现表明,拒接了LSA-type 3/4/5
将AREA 2配置为Totally NSSA区域,Totally NSSA区域能够引入外部路由,同时又不会学习来自OSPF网络其它区域的外部路由并且ABR会阻挡3类LSA进入该区域
AREA 2作为Totally NSSA区域前R11 AREA 2作为Totally NSSA区域后R11
加快收敛,保障更新安全;
修改各个接口hello time为5秒,并汇总网段
ospf timer hello 5
abr-summary 172.16.32.0 255.255.224.0 ——————汇总之后的网段以及掩码
6,全网可达