OSPF综合大实验
创始人
2024-09-26 00:24:42
0次

一、实验拓扑

二、实验要求

1、R4 为 ISP,其上只配置 IP 地址;R4 与其他所直连设备间均使用公有 IP;

2、R3-R5、R6、R7 为 MGRE 环境,R3 为中心站点;

3、整个 OSPF 环境 IP 基于 172.16.0.0/16 划分;除了 R12 有两个环回,其他路由器均有一个

环回 IP

4、所有设备均可访问 R4 的环回;

5、减少 LSA 的更新量,加快收敛,保障更新安全;

6、全网可达;

三、实验思路

1.划分并配置 IP 地址

2.公网通(缺省路由)

3.配置 OSPF,RIP,路由引入 RIP

4.配置 MGRE,R3 为中心站点,ospf 宣告隧道

5.修改接口类型,取消选举

6.多进程重发布 area4

7.配置 easyIP

8.路由聚合(优化骨干),R3,5,6,7 传入区域聚合,R9(进程 1),12(ospf 协议视图)

ASBR 聚合

9.设置特殊区域(优化非骨干区域),area1 完全末梢,area3,area2 完全非纯末梢,会自

动下发缺省(能够访问 R4 环回)

10.加快收敛,修改 Hello 时间

11.保证更新安全,区域认证

四、实验步骤

1.划分并配置 IP 地址

area0

总地址:172.16.0.0/19用户地址:

172.16.0.0/24---P2P

172.16.1.0/24---MA

172.16.2.0/24---R4(环回)

172.16.3.0/24---R5(环回)

172.16.4.0/24---R6(环回)

172.16.5.0/24---R7(环回)

172.16.6.0/24---隧道

area1

总地址:172.16.32.0/19

用户地址:

172.16.32.0/24---P2P

172.16.33.0/24---MA

172.16.34.0/24---R1(环回)

172.16.35.0/24---R2(环回)

172.16.36.0/24---R3(环回)

area2

总地址:172.16.64.0/19

用户地址:

172.16.64.0/24---P2P

172.16.65.0/24---MA

172.16.65.0/30

172.16.65.4/30

172.16.66.0/24---R11(环回)

area3

总地址:172.16.96.0/19

用户地址:

172.16.96.0/24---P2P

172.16.97.0/24---MA

172.16.97.0/30

172.16.97.0/30

172.16.98.0/24---R8(环回)

area4

总地址:172.16.128.0/19

用户地址:

172.16.128.0/24---P2P

172.16.129.0/24---MA

172.16.129.0/30

172.16.130.0/24---R9(环回)

172.16.131.0/24---R10(环回)

RIP:

地址:172.16.160.0/19

L0:172.16.160.0/24

L1:172.16.161.0/24

2.公网通(缺省路由)

R3:

[R3]ip route-static 0.0.0.0 0 34.0.0.4

R5:

[R5]ip route-static 0.0.0.0 0 45.0.0.4

R6:

[R6]ip route-static 0.0.0.0 0 46.0.0.4

R7:

[R7]ip route-static 0.0.0.0 0 47.0.0.4

3.配置 OSPF,RIP,路由引入 RIP

R1:

[R1]ospf 1 router-id 1.1.1.1

[R1-ospf-1]area 1

[R1-ospf-1-area-0.0.0.1]network 172.16.33.1 0.0.0.0

[R1-ospf-1-area-0.0.0.1]network 172.16.34.1 0.0.0.0

R2:

[R2]ospf 1 router-id 2.2.2.2

[R2-ospf-1]area 1

[R2-ospf-1-area-0.0.0.1]network 172.16.33.2 0.0.0.0

[R2-ospf-1-area-0.0.0.1]network 172.16.35.2 0.0.0.0

R3:

[R3]ospf 1 router-id 3.3.3.3

[R3-ospf-1]area 1

[R3-ospf-1-area-0.0.0.1]network 172.16.33.3 0.0.0.0

[R3-ospf-1-area-0.0.0.1]network 172.168.36.3 0.0.0.0

R5:

[R5]ospf 1 router-id 5.5.5.5

[R5-ospf-1]area 0

[R5-ospf-1-area-0.0.0.0]net 172.16.3.5 0.0.0.0

R6:

[R6]ospf 1 router-id 6.6.6.6

[R6-ospf-1]area 0

[R6-ospf-1-area-0.0.0.0]network 172.16.4.6 0.0.0.0

[R6-ospf-1-area-0.0.0.2]network 172.16.65.1 0.0.0.0

R7:

[R7]ospf 1 router-id 7.7.7.7

[R7-ospf-1]area 0

[R7-ospf-1-area-0.0.0.0]network 172.16.97.1 0.0.0.0

[R7-ospf-1]area 3

[R7-ospf-1-area-0.0.0.3]network 172.16.97.1 0.0.0.0

R8:

[R8]ospf 1 router-id 8.8.8.8

[R8-ospf-1]area 3

[R8-ospf-1-area-0.0.0.3]network 172.16.97.2 0.0.0.0[R8-ospf-1-area-0.0.0.3]network 172.16.97.5 0.0.0.0

[R8-ospf-1-area-0.0.0.3]network 172.16.98.8 0.0.0.0

R9:(区域四在进程 2)

[R9]ospf 1 router-id 9.9.9.9

[R9-ospf-1]area 3

[R9-ospf-1-area-0.0.0.3]network 172.16.97.6 0.0.0.0

[R9]ospf 2 router-id 9.9.9.9

[R9-ospf-2]area 4

[R9-ospf-2-area-0.0.0.4]net 172.16.129.1 0.0.0.0

[R9-ospf-2-area-0.0.0.4]net 172.16.130.9 0.0.0.0

R10:(进程 2)

[R10]ospf 2 router-id 10.10.10.10

[R10-ospf-2]area 4

[R10-ospf-2-area-0.0.0.4]net 172.16.129.2 0.0.0.0

[R10-ospf-2-area-0.0.0.4]net 172.16.131.10 0.0.0.0

R11:

[R11]ospf 1 router-id 11.11.11.11

[R11-ospf-1]area 2

[R11-ospf-1-area-0.0.0.2]network 172.16.65.2 0.0.0.0

[R11-ospf-1-area-0.0.0.2]network 172.16.65.5 0.0.0.0

[R11-ospf-1-area-0.0.0.2]network 172.16.66.11 0.0.0.0

R12:

[R12]ospf 1 router-id 12.12.12.12

[R12-ospf-1]area 2

[R12-ospf-1-area-0.0.0.2]network 172.16.65.6 0.0.0.0

[RIP]:

[R12]rip 1

[R12-rip-1]version 2

[R12-rip-1]undo summary

[R12-rip-1]network 172.16.0.0

路由引入(ospf 协议视图引入 RIP 进程 1):

[R12-ospf-1]import-route rip 1

4. 配置 MGRE,R3 为中心站点,ospf 宣告隧道

R3:

[R3]int Tunnel 0/0/0

[R3-Tunnel0/0/0]ip address 172.16.6.3 24

[R3-Tunnel0/0/0]tunnel-protocol gre p2mp

[R3-Tunnel0/0/0]source Serial 4/0/0

[R3-Tunnel0/0/0]nhrp network-id 100

[R3-Tunnel0/0/0]nhrp entry multicast dynamic

[R3-ospf-1-area-0.0.0.0]net 172.16.6.3 0.0.0.0

R5:

[R5]int t 0/0/0

[R5-Tunnel0/0/0]ip address 172.16.6.5 24[R5-Tunnel0/0/0]tunnel-protocol gre p2mp

[R5-Tunnel0/0/0]source Serial 4/0/0

[R5-Tunnel0/0/0]nhrp network-id 100

[R5-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

[R5-ospf-1-area-0.0.0.0]net 172.16.6.5 0.0.0.0

R6:

[R6]int t 0/0/0

[R6-Tunnel0/0/0]ip address 172.16.6.6 24

[R6-Tunnel0/0/0]tunnel-protocol gre p2mp

[R6-Tunnel0/0/0]source Serial 4/0/0

[R6-Tunnel0/0/0]nhrp network-id 100

[R6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

[R6-ospf-1-area-0.0.0.0]net 172.16.6.6 0.0.0.0

R7:

[R7]int t 0/0/0

[R7-Tunnel0/0/0]ip address 172.16.6.7 24

[R7-Tunnel0/0/0]tunnel-protocol gre p2mp

[R7-Tunnel0/0/0]source g 0/0/0

[R7-Tunnel0/0/0]nhrp network-id 100

[R7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

[R7-ospf-1-area-0.0.0.0]net 172.16.6.7 0.0.0.0

5.修改接口类型,取消选举

R3:

[R3-Tunnel0/0/0]ospf network-type broadcast

R5:

[R5-Tunnel0/0/0]ospf network-type broadcast

[R5-Tunnel0/0/0]ospf dr

[R5-Tunnel0/0/0]ospf dr-priority 0

R6:

[R6-Tunnel0/0/0]ospf network-type broadcast

[R6-Tunnel0/0/0]ospf dr-priority 0

R7:

[R7-Tunnel0/0/0]ospf network-type broadcast

[R7-Tunnel0/0/0]ospf dr-priority 0

6.多进程重发布 area4

R9:

[R9-ospf-2]import-route ospf 1

[R9-ospf-1]import-route ospf 2

7.配置 easyIP

R3:

[R3]acl 2000

[R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255

[R3]int s 4/0/0

[R3-Serial4/0/0]nat outbound 2000R5:

[R5]acl 2000

[R5-acl-basic-2000]rule 5 permit source 172.16.0.0 0.0.255.255

[R5-acl-basic-2000]q

[R5]int s 4/0/0

[R5-Serial4/0/0]nat outbound 2000

R6:

[R6]acl 2000

[R6-acl-basic-2000]rule 5 permit source 172.16.0.0 0.0.255.255

[R6]int s 4/0/0

[R6-Serial4/0/0]nat out 2000

R7:

[R7]acl 2000

[R7-acl-basic-2000]rule 5 permit source 172.16.0.0 0.0.255.255

[R7-acl-basic-2000]int g 0/0/0

[R7-GigabitEthernet0/0/0]nat outbound 2000

8.路由聚合(优化骨干),R3,5,6,7 传入区域聚合,R9(进程 1),12(ospf 协议视图) ASBR 聚合

(1)ABR 聚合:

R3:

[R3]ospf 1 router-id 3.3.3.3

[R3-ospf-1]area 1

[R3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0

R6:

[R6]ospf 1 router-id 6.6.6.6

[R6-ospf-1]area 2

[R6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.224.0

R7:

[R7]ospf 1 router-id 7.7.7.7

[R7-ospf-1]area 3

[R7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.224.0

(2)ASBR 聚合

R9:

[R9]ospf 1 router-id 9.9.9.9

[R9-ospf-1]asbr-summary 172.16.128.0 255.255.224.0

R12:

[R12]ospf 1 router-id 12.12.12.12

[R12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0

9.设置特殊区域(优化非骨干区域),area1 完全末梢,area3,area2 完全非纯末梢,会自动下发缺省(能够访问 R4 环回)

Area 1:

R1:

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

R2:[R2-ospf-1-area-0.0.0.1]stub no-summary

R3:

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

Area 2:

R6:

[R6-ospf-1-area-0.0.0.2]nssa no-summary

R11:

[R11-ospf-1-area-0.0.0.2]nssa no-summary

R12:

[R12-ospf-1-area-0.0.0.2]nss no-summary

Area 3:

R7:

[R7-ospf-1-area-0.0.0.3]nssa no-summary

R8:

[R7-ospf-1-area-0.0.0.3]nssa no-summary

R9:

[R9-ospf-1-area-0.0.0.3]nssa no-summary

此时 ping 不同 R10,需在 R10 上配一条缺省指向 R9

[R10]ip route-static 0.0.0.0 0 172.16.129.1

或者在 R9 的 ospf 进程 2 下下发缺省

[R9-ospf-2]default-route-advertise

10.加快收敛,修改 Hello 时间

[R1-GigabitEthernet0/0/0]ospf timer hello 5

所有路由器配置同上(R4 不配)

11.保证更新安全,区域认证

R1:

[R1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456

R2:

[R2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456

R3:

[R3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456

[R3-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 123456

R5:

[R5-ospf-1-area-0.0.0.0] authentication-mode md5 1 cipher 123456

R6:

[R6-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 123456

[R6-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 123456

R7:

[R7-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 123456

[R7-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 123456

R8:

[R8-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 123456

R9:

[R9-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 123456[R9-ospf-2-area-0.0.0.4]authentication-mode md5 1 cipher 123456

R10:

[R10-ospf-2-area-0.0.0.4]authentication-mode md5 1 cipher 123456

R11:

[R11-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 123456

R12:

[R12-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 123456

相关内容

热门资讯

每日必看教程!微乐小程序黑科技... 每日必看教程!微乐小程序黑科技免费(辅助器),微信小程序怎么开挂(有辅助挂教学)1、让任何用户在无需...
今日公布!微乐小程序免费黑科技... 今日公布!微乐小程序免费黑科技(透视器),微信小程序微乐辅助器教程图片(有辅助挂辅教程)1、完成微乐...
安装程序教程!微乐小程序辅助工... 安装程序教程!微乐小程序辅助工具(透视器),微乐小程序黑科技辅助工具2026最新推荐(证实有辅助挂)...
我来教大家!微乐小程序黑科技免... 我来教大家!微乐小程序黑科技免费(辅助),微信小程序微乐安徽辅助苹果(确实有辅助挂)1)微乐小程序黑...
热点推荐!微乐小程序黑科技免费... 热点推荐!微乐小程序黑科技免费(辅助),微信小程序透视微乐(竟然有辅助挂)1、微乐小程序黑科技免费破...
揭秘几款!微乐小程序免费黑科技... 揭秘几款!微乐小程序免费黑科技(辅助),微信微乐陕西小程序破解器(有辅助挂辅助)揭秘几款!微乐小程序...
重大通报!微乐小程序免费黑科技... 重大通报!微乐小程序免费黑科技(辅助),微乐游戏辅助脚本安装(有辅助挂辅助)1、每一步都需要思考,不...
玩家交流!微乐小程序免费黑科技... 玩家交流!微乐小程序免费黑科技(作弊器),微乐家乡官方app下载(有辅助挂辅教程)1)微乐小程序免费...
教程攻略!微乐小程序黑科技免费... 教程攻略!微乐小程序黑科技免费(开挂),微乐小程序游戏破解器下载(有辅助挂方式)1、不需要AI权限,...
终于清楚!微乐小程序黑科技免费... 终于清楚!微乐小程序黑科技免费(作弊器),微乐小程序辅助教程(有辅助挂秘籍)1、用户打开应用后不用登...