OSPF 综合实验

本文涉及的产品
Redis 开源版,标准版 2GB
推荐场景:
搭建游戏排行榜
云数据库 Tair(兼容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,如需转载请自行联系原作者

相关实践学习
基于Redis实现在线游戏积分排行榜
本场景将介绍如何基于Redis数据库实现在线游戏中的游戏玩家积分排行榜功能。
云数据库 Redis 版使用教程
云数据库Redis版是兼容Redis协议标准的、提供持久化的内存数据库服务,基于高可靠双机热备架构及可无缝扩展的集群架构,满足高读写性能场景及容量需弹性变配的业务需求。 产品详情:https://www.aliyun.com/product/kvstore     ------------------------------------------------------------------------- 阿里云数据库体验:数据库上云实战 开发者云会免费提供一台带自建MySQL的源数据库 ECS 实例和一台目标数据库 RDS实例。跟着指引,您可以一步步实现将ECS自建数据库迁移到目标数据库RDS。 点击下方链接,领取免费ECS&RDS资源,30分钟完成数据库上云实战!https://developer.aliyun.com/adc/scenario/51eefbd1894e42f6bb9acacadd3f9121?spm=a2c6h.13788135.J_3257954370.9.4ba85f24utseFl
相关文章
|
6月前
|
网络协议 数据库 vr&ar
1. OSPF 基础实验(一):单区域
1. OSPF 基础实验(一):单区域
|
1月前
|
安全 网络协议 网络安全
Cisco-综合网络实验一
Cisco-综合网络实验一
|
6月前
|
消息中间件 网络协议 网络架构
3. BGP 实验(一):基础实验
3. BGP 实验(一):基础实验
|
网络协议 安全
OSPF综合实验
1、R4为ISP,其上只能配置1P地址;R4与其他所有直连设备间使用公有IP; 2、R3–R5/6/7为MGRE环境,R3为中心站点 3、整个0SPF环境1P地址为172.16.0.0/16 4、所有设备均可访问R4的环回; 5、减少LSA的更新量,加快收敛,保障更新安全 6、全网可达
117 0
|
网络协议
BGP综合实验
172.16.0.0 24 骨干 172.16.1.0 建邻 172.16.2.0-7.0 用户
60 0
|
存储 负载均衡 网络协议
EIGRP理论详解及基础实验
EIGRP理论详解及基础实验
203 0
EIGRP理论详解及基础实验
|
网络协议 网络虚拟化 网络架构
|
网络协议 网络架构