HCIP OSPF综合实验

IP规划

ospf共有5个区域+一个rip区域,借3位

area 0

192.16.0.0   19

有一个环回,一个骨干链路,一个MGRE,需要三个网段,借2位

192.16.0.0   21

192.16.8.0   21

192.16.16.0  21

area 1

192.16.32.0   19

有三个环回,一个骨干链路,需要4个网段,借2位

192.16.32.0   21

192.16.40.0   21

192.16.48.0   21

192.16.56.0   21

area 2

192.16.64.0   19

二个环回,一个骨干链路,需要三个网段,借2位

192.16.64.0   21

192.16.72.0   21

192.16.80.0   21

Area 3

192.16.96.0   19

二个环回,一个骨干链路,需要三个网段,借2位

192.16.96.0   21

192.16.104 .0  21

192.16.112.0   21

Area 4

192.16.128.0   19

二个环回,一个骨干链路,借一位

192.16.128.0   21

192.16.136.0  21

192.16.144.0   21

Rip

192.16.160.0  19

俩个环回,借一位

192.16.160.0   20

192.16.176.0   20

将分配好的网段进行IP配置

 配置MGRE

R3

ip route-static 0.0.0.0 0.0.0.0 192.16.0.2

interface Tunnel0/0/0
 ip address 192.16.16.1 255.255.248.0 
 undo rip split-horizon
 tunnel-protocol gre p2mp
 source 192.16.0.1
 nhrp entry multicast dynamic
 nhrp network-id 100

R5

ip route-static 0.0.0.0 0.0.0.0 192.16.2.1

interface Tunnel0/0/0
 ip address 192.16.16.2 255.255.248.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf dr-priority 0
 nhrp network-id 100
 nhrp entry 192.16.16.1 192.16.0.1 register

R6

ip route-static 0.0.0.0 0.0.0.0 192.16.4.1

interface Tunnel0/0/0
 ip address 192.16.16.3 255.255.248.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf dr-priority 0
 nhrp network-id 100
 nhrp entry 192.16.16.1 192.16.0.1 register

R7

ip route-static 0.0.0.0 0.0.0.0 192.16.6.1

interface Tunnel0/0/0
 ip address 192.16.16.4 255.255.248.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type broadcast
 ospf dr-priority 0
 nhrp network-id 100
 nhrp entry 192.16.16.1 192.16.0.1 register

R5

配置OSPF

area0

R3

ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 192.16.16.1 0.0.0.0 

R6

ospf 1 router-id 6.6.6.6 
 area 0.0.0.0 
  network 192.16.16.3 0.0.0.0 

area1

R1

ospf 1 router-id 1.1.1.1 
 area 0.0.0.1 
  network 192.16.32.1 0.0.0.0 
  network 192.16.40.1 0.0.0.0 

R2

 area 0.0.0.1 
  network 192.16.32.2 0.0.0.0 
  network 192.16.48.1 0.0.0.0 

R3

ospf 1 router-id 3.3.3.3 
 area 0.0.0.1 
  network 192.16.32.3 0.0.0.0 
  network 192.16.56.1 0.0.0.0 

area2

R12

ospf 1 router-id 12.12.12.12 

 import-route rip 1
 area 0.0.0.2 
  network 192.16.68.2 0.0.0.0 

R6

ospf 1 router-id 6.6.6.6 
 area 0.0.0.2 
  network 192.16.64.1 0.0.0.0 
  network 192.16.72.1 0.0.0.0 

area3

R7

ospf 1 router-id 7.7.7.7 
 area 0.0.0.3 
  network 192.16.96.1 0.0.0.0 
  network 192.16.104.1 0.0.0.0 

R9

ospf 1 router-id 9.9.9.9 
 area 0.0.0.3 
  network 192.16.100.2 0.0.0.0 

area4

(因为R9属于ASBR,所以需要进行重发布,为了优化路由,只需对R10进行OSPF动态缺省配置,只进行单向重发布)

R9

ospf 1 
 import-route ospf 2

ospf 2 router-id 9.9.9.9 

 default-route-advertise//因为需要将area3设为完全NSSA区域,自动产生缺省路由,所以使用该语句下发OSPF动态缺省路由
 area 0.0.0.0 
  network 192.16.128.1 0.0.0.0 
  network 192.16.136.1 0.0.0.0 

R10

ospf 2 router-id 10.10.10.10 
 area 0.0.0.0 
  network 192.16.128.2 0.0.0.0 
  network 192.16.144.1 0.0.0.0 

RIP

R12(因为R12属于ASBR,所以需要进行双向重发布)

interface LoopBack0
 ip address 192.16.160.1 255.255.240.0 

interface LoopBack1
 ip address 192.16.176.1 255.255.240.0 

rip 1
 version 2
 network 192.16.176.0
 network 192.16.160.0

减少LSA的更新量

将area1设为完全末梢区域

(将区域内的每个路由器都设置末梢区域,在ABR上设置完全末梢区域)

R1

[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]stub 

R3

[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]stub no-summary 

将area2设为完全NSSA区域

(将区域内的每个路由器都设置NSSA区域,在ABR上设置完全NSSA区域)

R11

[11]ospf 1
[11-ospf-1-area-0.0.0.2]nssa 

R6

[r6]ospf 1
[r6-ospf-1]are 2
[r6-ospf-1-area-0.0.0.2]nssa no-summary

将area3设为完全NSSA区域

R7

[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]nssa no-summary

手工汇总

(在ABR和ASBR上进行汇总)

R3

ospf 1 router-id 3.3.3.3 
 area 0.0.0.1 
  abr-summary 192.16.32.0 255.255.224.0

R12

ospf 1 router-id 12.12.12.12 
 asbr-summary 192.16.160.0 255.255.224.0

 

在黑洞路由器上面进行防环操作

R3

[r3]ip route-static 192.16.32.0 255.255.224.0 NULL0

全网可达

在R3/6/7上设置nat

R3

 [r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.16.32.0 0.0.31.255

[r3-GigabitEthernet0/0/1] nat outbound 2000

R1pingR4的环回

 R1pingR12的环回

 R1pingR10的环回

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值