HCIP实验4--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、全网可达
在这里插入图片描述
在这里插入图片描述

结合需求来合理规划地址,环回代表一个真实的的接口;一般工程中一个广播域的用户数量在50个左右。
IP规划:ospf与RIP,静态不同,因为是为了后期方便汇总;ospf不支持接口汇总。
因为图上有六个区域,所以ip地址划分划分为六个区域
可变长子网掩码,借两位分为8个网段
172.16.0.0/19 —a0
172.16.32.0/19 —a1
172.16.64.0/19 —a2
172.16.96.0/19 —a3
172.16.128.0/19 —a4
172.16.160.0/19—RIP
预留地址:
172.16.192.0/19
172.16.224.0/19
可以用子网掩码为24、25的;25的难度系数就要大一些;
25的地址规划如下:
a0:
借6位—172.16.0.0 /25 …172.16.0.128 /25
172.16.1.0 /25…172.16.1.128/25
…172.16.31.128/25
其中:
172.16.0.128 /25 p2p 骨干:
172.16.0.0 /30
172.16.0.4/30
172.16.0.31 /30
172.16.0.128 /25MA骨干:
172.16.0.128 /29
172.16.0.136 /29

a1:
使用 172.16.32.0/19
172.16.32.0/25 p2p
172.16.32.128/25 MA

a0:
使用 172.16.0.0/19
骨干
172.16.0.0/25 ——p2p 172.16.0.0/30
172.16.0.128/25 ——MA 172.16.0.128/29

a2:
使用 172.16.64.0/19
172.16.64.0/25 p2p

a3:
使用 172.16.96.0/19

a4:
使用 172.16.128.0/19

RIP:
使用 172.16.160.0/19
172.16.160.0/20
172.16.176.0/20

先配置R4公网IP

a0区域:

配置完接口地址之后,对R3,R5,R6,R7 配置缺省路由,指向R4

R3

ip route-static 0.0.0.0 0 34.1.1.2

R5

ip route-static 0.0.0.0 0 45.1.1.2

R6

ip route-static 0.0.0.0 0 46.1.1.2

R7

ip route-static 0.0.0.0 0 47.1.1.2

测试缺省路由:

r3ping:45.1.1.1
46.1.1.1
47.1.1.1

配置MGRE
r3—r5/6/7为MGRE环境,r3为中心站点

R3 :

int Tunnel 0/0/0
ip add 172.16.0.129 29
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry multicast dynamic

R5 :

int Tunnel 0/0/0
ip add 172.16.0.130 29
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 172.16.0.129 34.1.1.1 register

R6 :

int t0/0/0
ip add 172.16.0.131 29
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 172.16.0.129 34.1.1.1 register

R7 :

int t0/0/0
ip add 172.16.0.132 29
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 1
nhrp entry 172.16.0.129 34.1.1.1 register

测试

r3ping:
172.16.0 .30
172.16.0.31
172.16.0.32

R5:

int lo 0
ip add 172.16.1.1 /25

R6:

int lo 0
ip add 172.16.1.129 /25

R7:

int lo 0
ip add 172.16.2.1 /25

至此area0IP已经配完。

area1:

R1:

int lo 0
ip add 172.16.33.1 /25

R2:

int lo 0
ip add 172.16.33.129 /25

R3:

int lo 0
ip add 172.34.1.1 /25

骨干:
R1:

int g0/0/0
IP add 172.16.32.129 29

R2:

int g0/0/0
IP add 172.16.32.130 29

R3:

int g0/0/0
IP add 172.16.32.131 29

测试:

r1ping:
172.16.32.130
172.16.32.131
172.16.32.132

area2:

R11:

int  lo 0
IP add 172.16.65.1 25

R6:

int g0/0/0
IP add 172.16.64.1 30

R11:

int g0/0/0
IP add 172.16.64.2 30
int g0/0/1
IP add 172.16.64.5 30

R12:

int g0/0/0
IP add 172.16.64.6 30

测试:

R11ping:
172.16.64.1
172.16.64.6

area3:

R12:

int  lo 0
IP add 172.16.160.1 20
int lo 1 
ip add 172.16.176.1 20

R8:

int  lo 0
IP add 172.16.97.1 29
int  g0/0/0
IP add 172.16.96.2 30
int  g0/0/1
IP add 172.16.96.5 30

R7:

int  g0/0/1
IP add 172.16.96.1 30

R9:

int  g0/0/0
IP add 172.16.96.6 30

测试:

R8ping:
 172.16.96.1
127.16.96.6

area4

R9:

int  lo 0
IP add 172.16.129.1 25
int  g0/0/1
IP add 172.16.128.1 30

R10:

int  lo 0
IP add 172.16.129.129 25
int  g0/0/0
IP add 172.16.128.2 30

所有IP已经配好!!!!!

所有设备均可方位r4的环回;(配置OSPF)

area0

R3
ospf 1 router-id 3.3.3.3
area 0
network 172.16.0.129 0.0.0.0

R5

ospf 1 router-id 5.5.5.5
area 0
network 172.16.0.0 0.0.255.255

R6

ospf 1 router-id 6.6.6.6
area 0
network 172.16.0.0 0.0.1.255

R7

ospf 1 router-id 7.7.7.7
area 0
network 172.16.0.0 0.0.3.255

修改接口类型,把ospf在MGRE环境下的工作模式设置成广播模式,然后人工干涉选举DR

R3

int t0/0/0
ospf network-type broadcast

R5

int t0/0/0
ospf network-type broadcast
ospf dr-priority 0

R6

int t0/0/0
ospf network-type broadcast
ospf dr-priority 0

R7

int t0/0/0
ospf network-type broadcast
ospf dr-priority 0

配置其他的OSPF

area1
R3

ospf 1 router-id 3.3.3.3
area 1
network 172.16.32.0 0.0.3.255

R1

ospf 1 router-id 1.1.1.1
area 1
network 172.16.0.0 0.0.255.255

R2

ospf 1 router-id 2.2.2.2
area 1
network 172.16.0.0 0.0.255.255

area2
R6

ospf 1
area 2
network 172.16.64.1 0.0.0.0

R11

ospf 1 router-id 11.11.11.11
area 2
network 172.16.0.0 0.0.255.255

R12

ospf 1 router-id 12.12.12.12
area 2
network 172.16.64.6 0.0.0.0

在R12路由器上启动rip进程,将两条环回宣告进rip,再重发布

rip 1
ver 2
undo summary
network 172.16.0.0
ospf 1
import-route rip

area3
R7

ospf 1 router-id 7.7.7.7
area 3
network 172.16.96.1 0.0.0.0

R8

ospf 1 router-id 8.8.8.8
area 3
network 172.16.0.0 0.0.255.255

R9

ospf 1 router-id 9.9.9.9
area 3
network 172.16.96.6 0.0.0.0

area4
R9

ospf 1 router-id 9.9.9.9
area 4
network 172.16.128.0 0.0.1.255

R10

ospf 1 router-id 10.10.10.10
area 4
network 172.16.0.0 0.0.255.255

利用双进程多项重发布将不规则区域打通

R9

ospf 2 router-id 9.9.9.9
a 4
network 172.16.128.0 0.0.1.255
default-route-advertise
ospf 1
import-route ospf 2

将区域1设置STUB区域,将区域2与区域3设置NSSA
area1
R1

ospf 1
a 1
stub

R2

ospf 1
a 1
stub

R3

ospf 1
a 1
abr-summary 172.16.32.0 255.255.224.0
stub no-summary
ip route-static 172.16.32.0 19 NULL 0 #防环

区域2
R6

ospf 1
a 2
abr-summary 172.16.64.0 255.255.224.0
nssa no-summary
ip route-static 172.16.64.0 19 NULL 0

R11

ospf 1
a 2
nssa

R12

ospf 1
a 2
nssa

区域3
R7

ospf 1
a 3
nssa no-summary
abr-summary 172.16.96.0 255.255.224.0
ip route-static 172.16.96.0 19 NULL 0

R8

ospf 1
a 3
nssa

R12

ospf 1
asbr-summary 172.16.160.0 255.255.224.0
ip route-static 172.16.160.0 19 NULL 0

R9

ospf 1
a 3
nssa
asbr-summary 172.16.128.0 255.255.224.0
ip route-static 172.16.128.0 19 NULL 0

R9重发布,没有把缺省路由发送到R10,

R9

ospf 2
default-route-advertise

测试内网
在这里插入图片描述

与公网全网可达

R3

acl 2000
rule permit source 172.16.0.0 0.0.255.255
int s4/0/0
nat outbound 2000

R6

acl 2000
rule permit source 172.16.0.0 0.0.255.255
int s4/0/0
nat outbound 2000

R7

acl 2000
rule permit source 172.16.0.0 0.0.255.255
int s4/0/0
nat outbound 2000

在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值