当前位置: 首页 > ai >正文

路由器重分发(OSPF+RIP),RIP充当翻译官,OSPF充当翻译官

路由器重分发(OSPF+RIP)

版本 1 RIP充当翻译官

image-20250422143735823

OSPF路由器只会OSPF语言;RIP路由器充当翻译官就要会OSPF语言和RIP语言;则在RIP中还需要将OSPF翻译成RIP
  • OSPF
把RIP路由器当成翻译官,OSPF路由器就只需要宣告自己的ip,也就是network 1.1.1.0 0.0.0.255 area 0 network 2.2.2.0 0.0.0.255 area 0
  • RIP
RIP路由器作为翻译官,要做的是宣告自己的IP;还需要为OSPF翻译,所以要有一条通道可以翻译OSPF:
router rip
network 3.3.3.0还要进入router ospf 1中,
network 2.2.2.0 0.0.0.255 area 0
也宣告一下作为翻译的通道,表示两个都学到,就是会翻译OSPF和RIP

开启端口并配置IP

  • OSPF(路由器)
Router>en
Router#conf t
Router(config)#int g0/0
Router(config-if)#no shutdown 
Router(config-if)#ip add 1.1.1.2 255.255.255.0
Router(config-if)#ex
Router(config)#int g0/1 
Router(config-if)#no shutdown 
Router(config-if)#ip ad 2.2.2.1 255.255.255.0
  • RIP(路由器)
Router>en
Router#conf t
Router(config)#int g0/0
Router(config-if)#no shutdown 
Router(config-if)#ip add 3.3.3.1 255.255.255.0
Router(config-if)#ex
Router(config)#int g0/1 
Router(config-if)#no shutdown 
Router(config-if)#ip add 2.2.2.2 255.255.255.0
Router(config-if)#ex

OSPF协议

  • OSPF路由器
Router(config)#router ospf 1
Router(config-router)#network 1.1.1.0 0.0.0.255 area 0
Router(config-router)#network 2.2.2.0 0.0.0.255 area 0

RIP协议

  • RIP(路由器)
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 3.3.3.0
Router(config-router)#ex
Router(config)#router ospf 1
Router(config-router)#network 2.2.2.0 0.0.0.255 area 0
Router(config-router)#ex

路由器重分发

  • RIP(路由器)
Router(config)#router rip
Router(config-router)#redistribute ospf 1 metric 5
Router(config-router)#ex
Router(config)#router ospf 1
Router(config-router)#redistribute rip subnets 

版本2 OSPF充当翻译官

image-20250422144920627

RIP路由器只会RIP语言;OSPF路由器充当翻译官就要会OSPF语言和RIP语言;则在OSPF中还需要将RIP翻译成OSPF
  • RIP
把OSPF路由器当成翻译官,RIP路由器就只需要宣告自己的ip,也就是
network 3.3.3.0 0.0.0.255 area 0 network 2.2.2.0 0.0.0.255 area 0
  • OSPF
OSPF路由器作为翻译官,要做的是宣告自己的IP;
router ospf 1
network 1.1.1.0 0.0.0.255 area 0
还需要为RIP翻译,所以要有一条通道可以翻译RIP:
router rip
version 2
network 2.2.2.0

开启端口并配置IP

  • OSPF(路由器)
Router>en
Router#conf t
Router(config)#int g0/0
Router(config-if)#no shutdown 
Router(config-if)#ip add 1.1.1.2 255.255.255.0
Router(config-if)#ex
Router(config)#int g0/1 
Router(config-if)#no shutdown 
Router(config-if)#ip ad 2.2.2.1 255.255.255.0
  • RIP(路由器)
Router>en
Router#conf t
Router(config)#int g0/0
Router(config-if)#no shutdown 
Router(config-if)#ip add 3.3.3.1 255.255.255.0
Router(config-if)#ex
Router(config)#int g0/1 
Router(config-if)#no shutdown 
Router(config-if)#ip add 2.2.2.2 255.255.255.0
Router(config-if)#ex

RIP协议

Router>en
Router#conf t
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 3.3.3.0
Router(config-router)#network 2.2.2.0

OSPF协议

Router>en
Router#conf t
Router(config)#router ospf 1
Router(config-router)#network 1.1.1.0 0.0.0.255 area 0
Router(config-router)#ex
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 2.2.2.0

路由器重分发

Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#redistribute ospf 1 metric 5
Router(config-router)#ex
Router(config)#router ospf 1
Router(config-router)#redistribute rip subnets 
  • 最终的结果都是要show ip route上显示的ip才能ping通,才算成功
http://www.xdnf.cn/news/2201.html

相关文章:

  • 强化学习在大模型训练中的应用及策略优化算法详解:以LLM为例
  • 【C++ 类和数据抽象】消息处理示例(1):从设计模式到实战应用
  • Swift与iOS内存管理机制深度剖析
  • Java注解
  • AI辅助设计图转代码开发规范
  • MySQL 分布式架构与实战:从单机到集群的进阶之路(附生产级架构设计)
  • 【微知】sourceinsight如何添加支持bash脚本的语法格式解析?
  • P3309 [SDOI2014] 向量集 Solution
  • React-Hook
  • n8n 中文系列教程_10. 解析n8n中的AI节点:从基础使用到高级Agent开发
  • 【知识管理周报】知识管理最新周报0426文章推荐
  • [详细无套路]MDI Jade6.5安装包下载安装教程
  • HKUST:合成数据训练LLM的缩放定律
  • docker容器运维工具——ctop
  • GoLang基础
  • 药监平台上传数据报资源码不存在
  • 【linux】SSH 连接 WSL2 本地环境的完整步骤
  • Hbuilder x中的v-bind=““ is not supported.报错解决
  • Dify与n8n深度对比:AI应用开发与自动化工作流的双轨选择
  • 光子计算芯片进展评估:下一代AI算力突破的可能性
  • UML之序列图的执行规范
  • SpringCloud原理和机制
  • 获取房源信息并完成可视化——网络爬虫实战1
  • 29-算法打卡-字符串-KMP算法理论2-第二十九天
  • C语言HashTable基本理解
  • Android studio学习之路(八)---Fragment碎片化页面的使用
  • Git使用教程(含常见问题解决)
  • Raptor码的解码成功率matlab实现
  • STM32的开发环境介绍
  • 嵌入式学习笔记 - SPI通讯协议