OSPF和RIP综合实验 有点难度!

本文涉及的产品
Redis 开源版,标准版 2GB
推荐场景:
搭建游戏排行榜
云数据库 Tair(兼容Redis),内存型 2GB
简介:
      ospf实验
R1>en
R1#show running-config           查看配置文件
hostname R1
interface Loopback0                 环回口地址
 ip address 172.16.0.1 255.255.255.0
!
interface Loopback1
 ip address 172.16.1.1 255.255.255.0
!
interface Loopback2
 ip address 172.16.2.1 255.255.255.0
!
interface Loopback3
 ip address 172.16.3.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.12.1 255.255.255.0
router rip                   rip动态路由协议 以跳数为度量值
 version 2                      版本2
 network 172.16.0.0           自己知道的网络号
 network 192.168.12.0
 no auto-summary                   不自动汇总
end
 
R2#show running-config
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.12.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.23.2 255.255.255.0
 duplex auto
 speed auto
!
router ospf 110                 ospf动态路由协议 以 cost 为度量值
 log-adjacency-changes               
 area 1 nssa no-summary                  NSSA区域
 summary-address 172.16.0.0 255.255.252.0            汇总地址
 redistribute rip subnets                                 把rip协议加入到 ospf里
 network 2.2.2.2 0.0.0.0 area 1
 network 192.168.12.0 0.0.0.255 area 1                网络号 后面跟反掩码 区域号
 network 192.168.23.0 0.0.0.255 area 1
!
router rip                         rip协议
 version 2                             
 redistribute ospf 110 metric 3            把ospf 协议打入到 rip协议里 度量值3
 network 2.0.0.0                     
 network 192.168.12.0
 network 192.168.23.0
 no auto-summary

end
 
R3#show running-config
hostname R3
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.23.3 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.34.3 255.255.255.0
 duplex auto
 speed auto
!
router ospf 110
 log-adjacency-changes
 area 1 nssa no-summary
 network 3.3.3.3 0.0.0.0 area 1
 network 192.168.23.0 0.0.0.255 area 1
 network 192.168.34.0 0.0.0.255 area 1
end
 

R4#show running-config
Building configuration...
hostname R4
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.34.4 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.45.4 255.255.255.0
 duplex auto
 speed auto
!
router ospf 110
 log-adjacency-changes
 area 1 nssa no-summary
 network 4.4.4.4 0.0.0.0 area 0
 network 192.168.34.0 0.0.0.255 area 1
 network 192.168.45.0 0.0.0.255 area 0
end
 
R5:
hostname R5
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.45.5 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.56.5 255.255.255.0
 duplex auto
 speed auto
!
router ospf 110
 log-adjacency-changes
 network 5.5.5.5 0.0.0.0 area 0
 network 192.168.45.0 0.0.0.255 area 0
 network 192.168.56.0 0.0.0.255 area 2
!
end
 
 
R6#show running-config
Building configuration...
hostname R6
!
interface Loopback0
 ip address 6.6.6.6 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.56.6 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.67.6 255.255.255.0
 duplex auto
 speed auto
!
router ospf 110
 log-adjacency-changes
 redistribute rip subnets
 network 6.6.6.6 0.0.0.0 area 2
 network 192.168.56.0 0.0.0.255 area 2
 network 192.168.67.0 0.0.0.255 area 2
!
router rip
 version 2
 redistribute ospf 110 metric 3
 network 6.0.0.0
 network 192.168.56.0
 network 192.168.67.0
 no auto-summary
!
end
 

R7#show running-config
hostname R7
!
interface Loopback0
 ip address 7.7.7.7 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.67.7 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router rip
 version 2
 network 7.0.0.0
 network 192.168.67.0
 no auto-summary
!
end
R1>ping 7.7.7.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 7.7.7.7, timeout is 2 seconds:
!!!!!
R2的路由表
C    192.168.12.0/24 is directly connected, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/11] via 192.168.23.3, 00:19:33, FastEthernet0/1
     172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
R       172.16.0.0/24 [120/1] via 192.168.12.1, 00:00:20, FastEthernet0/0
O       172.16.0.0/22 is a summary, 00:20:13, Null0
R       172.16.1.0/24 [120/1] via 192.168.12.1, 00:00:21, FastEthernet0/0
R       172.16.2.0/24 [120/1] via 192.168.12.1, 00:00:21, FastEthernet0/0
R       172.16.3.0/24 [120/1] via 192.168.12.1, 00:00:21, FastEthernet0/0
C    192.168.23.0/24 is directly connected, FastEthernet0/1
O    192.168.34.0/24 [110/20] via 192.168.23.3, 00:19:35, FastEthernet0/1
O*IA 0.0.0.0/0 [110/21] via 192.168.23.3, 00:19:36, FastEthernet0/1
 
R6学习到汇总路由 我的拓扑图显示 是R7 show ip route 看到
R    192.168.12.0/24 [120/3] via 192.168.67.6, 00:00:07, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
R       2.2.2.2 [120/3] via 192.168.67.6, 00:00:07, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/3] via 192.168.67.6, 00:00:07, FastEthernet0/0
R    192.168.45.0/24 [120/3] via 192.168.67.6, 00:00:07, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/3] via 192.168.67.6, 00:00:07, FastEthernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
R       5.5.5.5 [120/3] via 192.168.67.6, 00:00:08, FastEthernet0/0
     6.0.0.0/32 is subnetted, 1 subnets
R       6.6.6.6 [120/1] via 192.168.67.6, 00:00:08, FastEthernet0/0
      172.16.0.0/22 is subnetted, 1 subnets
R       172.16.0.0 [120/3] via 192.168.67.6, 00:00:10, FastEthernet0/0

R    192.168.56.0/24 [120/1] via 192.168.67.6, 00:00:10, FastEthernet0/0
     7.0.0.0/32 is subnetted, 1 subnets
C       7.7.7.7 is directly connected, Loopback0
R    192.168.23.0/24 [120/3] via 192.168.67.6, 00:00:10, FastEthernet0/0
C    192.168.67.0/24 is directly connected, FastEthernet0/0
R    192.168.34.0/24 [120/3] via 192.168.67.6, 00:00:10, FastEthernet0/0

回答:发现有一条默认路由 做了NSSA 四类和五类都没了,三类就剩下一条默认路由 多了一条七类 看紫色表示 有七类LSA没有五类了
R3#show ip ospf database nssa-external
            OSPF Router with ID (3.3.3.3) (Process ID 110)
                 Type-7 AS External Link States (Area 1)
  Routing Bit Set on this LSA
  LS age: 1938
  Options: (No TOS-capability, Type 7/5 translation, DC)
  LS Type: AS External Link
  Link State ID: 172.16.0.0 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0xE6E5
  Length: 36
  Network Mask: /22
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 2.2.2.2
        External Route Tag: 0

R3#show ip ospf database external
            OSPF Router with ID (3.3.3.3) (Process ID 110)

回答:R6上有 4.4.4.4 ASBR AR是5.5.5.5
R6#show ip ospf database asbr-summary
            OSPF Router with ID (6.6.6.6) (Process ID 110)
                Summary ASB Link States (Area 2)
  Routing Bit Set on this LSA
  LS age: 1488
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
   Link State ID: 4.4.4.4 (AS Boundary Router address)       
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000001
  Checksum: 0x907D
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 10

因为做了NSSA后,R4即是ASBR也是ABR


本文转自 cs312779641 51CTO博客,原文链接:http://blog.51cto.com/chenhao6/1175488
相关实践学习
基于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
相关文章
|
3月前
|
监控 网络协议 网络架构
|
网络协议 安全
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、全网可达
119 0
|
网络协议
BGP综合实验
172.16.0.0 24 骨干 172.16.1.0 建邻 172.16.2.0-7.0 用户
63 0
|
存储 负载均衡 网络协议
EIGRP理论详解及基础实验
EIGRP理论详解及基础实验
203 0
EIGRP理论详解及基础实验
|
网络协议 网络虚拟化 网络架构
|
网络协议 网络架构