OSPF 综合实验

本文涉及的产品
Redis 开源版,标准版 2GB
推荐场景:
搭建游戏排行榜
简介:

 

要求:

1.区域0 实现区域验证 区域23接口验证

2.区域145 NSSA 掌握NSSA  和完全NSSA 区别

R1

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
 ip address 20.1.1.1 255.255.255.0
!
interface Loopback2
 ip address 20.1.2.1 255.255.255.0
!
interface Loopback3
 ip address 20.1.3.1 255.255.255.0
!
interface Ethernet0/0
 ip address 192.168.12.1 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 half-duplex
!
interface Ethernet0/1
 ip address 192.168.18.1 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!         
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
interface Serial1/0
 ip address 192.168.145.1 255.255.255.0
 encapsulation frame-relay
 ip ospf network broadcast
 ip ospf priority 10
 serial restart-delay 0
 no fair-queue
 frame-relay map ip 192.168.145.1 103
 frame-relay map ip 192.168.145.4 104 broadcast
 frame-relay map ip 192.168.145.5 105 broadcast
 no frame-relay inverse-arp
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 10
 router-id 1.1.1.1
 log-adjacency-changes
 area 0 authentication message-digest
 area 18 virtual-link 8.8.8.8 authentication
 area 18 virtual-link 8.8.8.8 message-digest-key 1 md5 cisco
 area 145 nssa no-redistribution default-information-originate no-summary
 network 1.1.1.1 0.0.0.0 area 145
 network 20.1.1.0 0.0.0.255 area 0
 network 20.1.2.0 0.0.0.255 area 0
 network 20.1.3.0 0.0.0.255 area 0
 network 192.168.12.0 0.0.0.255 area 0
 network 192.168.18.0 0.0.0.255 area 18
 network 192.168.145.0 0.0.0.255 area 145

R2

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
 ip address 172.16.2.2 255.255.255.0
!
interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 half-duplex
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 ip address 192.168.23.2 255.255.255.0
 ip ospf authentication message-digest
 ip ospf message-digest-key 1 md5 cisco
 half-duplex
!
interface Ethernet0/3
 ip address 192.168.28.2 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 half-duplex
!
interface Ethernet1/0
 no ip address
 shutdown
 half-duplex
!
interface Ethernet1/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet1/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet1/3
 no ip address
 shutdown
 half-duplex
!
router eigrp 100
 network 172.16.2.0 0.0.0.255
 no auto-summary
!         
router ospf 10
 router-id 2.2.2.2
 log-adjacency-changes
 area 0 authentication message-digest
 area 23 stub no-summary
 area 28 virtual-link 8.8.8.8 authentication
 area 28 virtual-link 8.8.8.8 message-digest-key 1 md5 cisco
 redistribute eigrp 100 metric 120 subnets
 network 192.168.12.0 0.0.0.255 area 0
 network 192.168.23.0 0.0.0.255 area 23
 network 192.168.28.0 0.0.0.255 area 28

R3


interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 ip address 192.168.23.3 255.255.255.0
 ip ospf authentication message-digest
 ip ospf message-digest-key 1 md5 cisco
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router ospf 10
 router-id 3.3.3.3
 log-adjacency-changes
 area 23 stub
 network 192.168.23.0 0.0.0.255 area 23
R4

interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Serial0/0
 no ip address
 shutdown
 serial restart-delay 0
 no fair-queue
!
interface Serial0/1
 ip address 192.168.145.4 255.255.255.0
 encapsulation frame-relay
 ip ospf network broadcast
 ip ospf priority 0
 serial restart-delay 0
 frame-relay map ip 192.168.145.1 401 broadcast
 no frame-relay inverse-arp
!
interface Serial0/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial0/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 10
 router-id 4.4.4.4
 log-adjacency-changes
 area 145 nssa
 network 4.4.4.4 0.0.0.0 area 145
 network 192.168.145.0 0.0.0.255 area 145

R5

!
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
 ip address 192.168.57.5 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
 no fair-queue
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 ip address 192.168.145.5 255.255.255.0
 encapsulation frame-relay
 ip ospf network broadcast
 ip ospf priority 0
 serial restart-delay 0
 frame-relay map ip 192.168.145.1 501 broadcast
 no frame-relay inverse-arp
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router ospf 10
 router-id 5.5.5.5
 log-adjacency-changes
 area 145 nssa
 redistribute rip metric 100 subnets
 network 5.5.5.5 0.0.0.0 area 145
 network 192.168.145.0 0.0.0.255 area 145
!
router rip
 version 2
 network 192.168.57.0
 no auto-summary
!

R6

!
interface Loopback0
 ip address 6.6.6.6 255.255.255.255
!
interface Ethernet0/0
 ip address 192.168.68.6 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router ospf 10
 router-id 6.6.6.6
 log-adjacency-changes
 network 6.6.6.6 0.0.0.0 area 68
 network 192.168.68.0 0.0.0.255 area 68

R7

interface Loopback0
 ip address 7.7.7.7 255.255.255.255
!
interface Loopback1
 ip address 10.1.1.7 255.255.255.0
!
interface Loopback2
 ip address 10.1.2.7 255.255.255.0
!
interface Loopback3
 ip address 10.1.3.7 255.255.255.0
!
interface Ethernet0/0
 ip address 192.168.57.7 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router rip
 version 2
 network 10.0.0.0
 network 192.168.57.0
 no auto-summary
R8

interface Loopback0
 ip address 8.8.8.8 255.255.255.255
!
interface Ethernet0/0
 ip address 192.168.68.8 255.255.255.0
 half-duplex
!
interface Ethernet0/1
 ip address 192.168.18.8 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 half-duplex
!
interface Ethernet0/2
 ip address 192.168.28.8 255.255.255.0
 shutdown
 half-duplex
!
interface Ethernet0/3
 ip address 192.168.28.8 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 half-duplex
!
router ospf 10
 router-id 8.8.8.8
 log-adjacency-changes
 area 0 authentication message-digest
 area 18 virtual-link 1.1.1.1 authentication
 area 18 virtual-link 1.1.1.1 message-digest-key 1 md5 cisco
 area 28 virtual-link 2.2.2.2 authentication
 area 28 virtual-link 2.2.2.2 message-digest-key 1 md5 cisco
 network 8.8.8.8 0.0.0.0 area 18
 network 192.168.18.0 0.0.0.255 area 18
 network 192.168.28.0 0.0.0.255 area 28
 network 192.168.68.0 0.0.0.255 area 68
 

R1#show ip route 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.12.0/24 is directly connected, Ethernet0/0
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
O IA 192.168.28.0/24 [110/20] via 192.168.18.8, 00:00:57, Ethernet0/1
                     [110/20] via 192.168.12.2, 00:00:57, Ethernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 192.168.145.4, 00:00:57, Serial1/0
C    192.168.145.0/24 is directly connected, Serial1/0
     20.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       20.1.1.0/24 is directly connected, Loopback1
O       20.1.0.0/22 is a summary, 00:00:57, Null0
C       20.1.3.0/24 is directly connected, Loopback3
C       20.1.2.0/24 is directly connected, Loopback2
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/65] via 192.168.145.5, 00:00:58, Serial1/0
O N2 192.168.57.0/24 [110/100] via 192.168.145.5, 00:00:58, Serial1/0
     6.0.0.0/32 is subnetted, 1 subnets
O IA    6.6.6.6 [110/21] via 192.168.18.8, 00:00:58, Ethernet0/1
     172.16.0.0/24 is subnetted, 1 subnets
O E2    172.16.2.0 [110/120] via 192.168.12.2, 00:00:58, Ethernet0/0
     8.0.0.0/32 is subnetted, 1 subnets
O       8.8.8.8 [110/11] via 192.168.18.8, 00:00:58, Ethernet0/1
     10.0.0.0/24 is subnetted, 3 subnets
O N2    10.1.3.0 [110/100] via 192.168.145.5, 00:00:58, Serial1/0
O N2    10.1.2.0 [110/100] via 192.168.145.5, 00:00:58, Serial1/0
O N2    10.1.1.0 [110/100] via 192.168.145.5, 00:00:58, Serial1/0
O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 00:00:58, Ethernet0/0
O IA 192.168.68.0/24 [110/20] via 192.168.18.8, 00:00:58, Ethernet0/1
C    192.168.18.0/24 is directly connected, Ethernet0/1

R5#show ip rou
R5#show ip route 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.145.1 to network 0.0.0.0

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 192.168.145.1, 00:58:58, Serial1/2
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 192.168.145.4, 00:58:58, Serial1/2
C    192.168.145.0/24 is directly connected, Serial1/2
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback0
C    192.168.57.0/24 is directly connected, Ethernet0/0
     10.0.0.0/24 is subnetted, 3 subnets
R       10.1.3.0 [120/1] via 192.168.57.7, 00:00:04, Ethernet0/0
R       10.1.2.0 [120/1] via 192.168.57.7, 00:00:04, Ethernet0/0
R       10.1.1.0 [120/1] via 192.168.57.7, 00:00:04, Ethernet0/0
O*IA 0.0.0.0/0 [110/65] via 192.168.145.1, 00:36:37, Serial1/2

R6#show ip route 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

O IA 192.168.12.0/24 [110/30] via 192.168.68.8, 00:33:29, Ethernet0/0
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/21] via 192.168.68.8, 00:41:41, Ethernet0/0
O IA 192.168.28.0/24 [110/20] via 192.168.68.8, 00:42:47, Ethernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/85] via 192.168.68.8, 00:41:41, Ethernet0/0
O IA 192.168.145.0/24 [110/84] via 192.168.68.8, 00:41:41, Ethernet0/0
     20.0.0.0/32 is subnetted, 3 subnets
O IA    20.1.1.1 [110/21] via 192.168.68.8, 00:41:41, Ethernet0/0
O IA    20.1.2.1 [110/21] via 192.168.68.8, 00:41:41, Ethernet0/0
O IA    20.1.3.1 [110/21] via 192.168.68.8, 00:41:41, Ethernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
O IA    5.5.5.5 [110/85] via 192.168.68.8, 00:41:41, Ethernet0/0
O E2 192.168.57.0/24 [110/100] via 192.168.68.8, 00:29:15, Ethernet0/0
     6.0.0.0/32 is subnetted, 1 subnets
C       6.6.6.6 is directly connected, Loopback0
     172.16.0.0/24 is subnetted, 1 subnets
O E2    172.16.2.0 [110/120] via 192.168.68.8, 00:29:15, Ethernet0/0
     8.0.0.0/32 is subnetted, 1 subnets
O IA    8.8.8.8 [110/11] via 192.168.68.8, 00:42:48, Ethernet0/0
     10.0.0.0/24 is subnetted, 3 subnets
O E2    10.1.3.0 [110/100] via 192.168.68.8, 00:29:15, Ethernet0/0
O E2    10.1.2.0 [110/100] via 192.168.68.8, 00:29:15, Ethernet0/0
O E2    10.1.1.0 [110/100] via 192.168.68.8, 00:29:15, Ethernet0/0
O IA 192.168.23.0/24 [110/30] via 192.168.68.8, 00:29:20, Ethernet0/0
C    192.168.68.0/24 is directly connected, Ethernet0/0
O IA 192.168.18.0/24 [110/20] via 192.168.68.8, 00:42:48, Ethernet0/0

有一点关于nssa区域说下

area 145 nssa no-redistribution default-information-originate no-summary

             抑制5      7                  起源条默认路由                      3 4



本文转自q狼的诱惑 51CTO博客,原文链接:http://blog.51cto.com/liangrui/564147,如需转载请自行联系原作者

相关文章
|
网络协议 Unix Linux
计算机网络 套接字函数 | socket、bind、listen、accept、connect
计算机网络 套接字函数 | socket、bind、listen、accept、connect
297 0
|
4月前
|
云栖大会 CDN
Hi 2025云栖大会
免费领票,9.24 - 9.26,开启未来之旅。
|
缓存 API 开发工具
几款优秀的点播、RTSP/RTMP直播播放器介绍
介绍:Ijkplayer 是Bilibili发布的基于 FFplay 的轻量级 Android/iOS 视频播放器。实现了跨平台功能,API 易于集成;编译配置可裁剪,方便控制安装包大小;支持硬件加速解码,更加省电;提供 Android 平台下应用弹幕集成的解决方案。
2716 0
|
云安全 存储 安全
带你读《阿里云安全白皮书》(十五)——云上安全重要支柱(9)
阿里云提供全面的数据安全保护措施,包括数据操作审计、全链路加解密、细粒度访问控制、可信计算和数据本地化存储等,确保客户数据的安全与合规。《阿里云安全白皮书(2024版)》详细介绍了这些技术能力,可点击链接下载完整版内容。
|
SQL 数据采集 数据挖掘
Pandas 教程
10月更文挑战第25天
248 2
|
Java 应用服务中间件 Maven
idea+maven+tomcat+spring 创建一个jsp项目
这篇文章介绍了如何在IntelliJ IDEA中使用Maven和Tomcat创建一个JSP项目,包括配置Maven依赖、设置Tomcat服务器、编写JSP页面、创建控制器和配置文件,以及项目的运行结果。
796 0
idea+maven+tomcat+spring 创建一个jsp项目
|
编解码 开发框架
【Qt 学习笔记】Qt窗口 | Qt窗口介绍 | QMainwindow类及各组件介绍
【Qt 学习笔记】Qt窗口 | Qt窗口介绍 | QMainwindow类及各组件介绍
846 3
|
Ubuntu Go 开发工具
Unbuntu 一键安装制定版本的Go环境
该文章提供了在Ubuntu系统上一键安装指定版本的Go语言环境的详细步骤,包括删除旧版本Go、下载并解压新版本Go到指定目录、配置Go环境变量,以及安装其他必要的开发工具。
649 2
|
算法 安全 Java
服务器启动 SpringBoot 后访问特别慢的解决方案
服务器启动 SpringBoot 后访问特别慢的解决方案
363 1
|
存储 Linux 网络安全
在CentOS 7上安装Git的方法
在CentOS 7上安装Git的方法
994 0