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

思科ospf+rip重发布配置命令

———————————————————————————————————————————

基础配置

R1

Router>en                                             #进入配置模式
Router#conf                                          #进入配置模式
Router(config)#hostname R1               #更该主机名
R1(config)#int loopback 0                    #进入回环口
R1(config-if)#ip add 1.1.1.1 255.255.255.255                #配置回环IP地址
R1(config-if)#int g0/0                            #进入接口G0/0
R1(config-if)#ip add 192.168.10.1 255.255.255.0          #配置接口G0/0IP地址
R1(config-if)#no shutdown                   #开启接口

R2

Router>en
Router#conf
Router(config)#hostname R2
R2(config)#int loopback 0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#int g0/0
R2(config-if)#ip add 192.168.10.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int g0/1
R2(config-if)#ip add 192.168.20.1 255.255.255.0
R2(config-if)#no sh

R3

Router>en
Router#conf
Router(config)#hostname R3
R3(config)#int loopback 0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#int g0/0
R3(config-if)#ip add 192.168.20.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int g0/1
R3(config-if)#ip add 192.168.30.1 255.255.255.0
R3(config-if)#no sh

R4

Router>en
Router#conf
Router(config)#hostname R4
R4(config)#int loopback 0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#int g0/0
R4(config-if)#ip add 192.168.30.2 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int g0/1
R4(config-if)#ip add 192.168.40.1 255.255.255.0
R4(config-if)#no sh

R5

Router>en
Router#conf
Router(config)#hostname R5
R5(config)#int loopback 0
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config-if)#int g0/0
R5(config-if)#ip add 192.168.40.2 255.255.255.0
R5(config-if)#no sh

———————————————————————————————————————————

配置OSPF多区域

R1

R1(config)#router ospf 1                                #配置OSPF 1
R1(config-router)#network 192.168.10.1 0.0.0.0 a 1           #宣告接口网段,0.0.0.0表示精准宣告,区域为1
R1(config-router)#network 1.1.1.1 0.0.0.0 a 1                     #宣告回环地址

R2

R2(config)#router ospf 1                                                     
R2(config-router)#net 192.168.10.2 0.0.0.0 a 1
R2(config-router)#net 192.168.20.1 0.0.0.0 a 0
R2(config-router)#net 2.2.2.2 0.0.0.0 a 0

R3

R3(config)#router ospf 1
R3(config-router)#net 192.168.20.2 0.0.0.0 a 0
R3(config-router)#net 192.168.30.1 0.0.0.0 a 2
R3(config-router)#net 3.3.3.3 0.0.0.0 a 0

R4

R4(config)#router ospf 1
R4(config-router)#net 192.168.30.2 0.0.0.0 a 2
R4(config-router)#net 4.4.4.4 0.0.0.0 a 2

———————————————————————————————————————————

配置RIP

R4

R4(config)#router rip                                        #配置RIP

R4(config-router)#net 192.168.40.1                        #宣告接口网段

R5

R5(config)#router rip

R5(config-router)#net 192.168.40.2

R5(config-router)#net 5.5.5.5

_____________________________________________________________________________

配置路由重发布

R4

R4(config)#router ospf 1
R4(config-router)#redistribute rip                #ospf路由合并rip

R4(config-router)#exit
R4(config)#router rip 
R4(config-router)#redistribute ospf 1 metric 10                #rip路由合并ospf 1距离为10(rip是距离矢量路由最大跳数为15)

———————————————————————————————————————————

验证

R5上面同步的路由信息

http://www.lryc.cn/news/377629.html

相关文章:

  • 椭圆的矩阵表示法
  • 智慧乡村和美人家信息化系统
  • ios-deploy - Required for installing your app on a physical device with the CLI
  • thinkphp5使用模型删除与复杂查询EXP
  • 铜陵市省重点实验室、省工程技术研究中心认定奖励补贴和申报认定条件流程归集
  • Linux-目录和文件
  • 2024-06月 | 维信金科 | 风控数据岗位推荐,高收入岗位来袭!
  • 不适合编程的人是怎样的?
  • el-table表格变更前后根据数据值改变背景颜色
  • flask基础知识1
  • 第8天:Django Admin高级配置
  • 本地无法连接linux上的MariaDB数据库
  • 使用 Netty 自定义解码器处理粘包和拆包问题详解
  • SDK编译IO Domain电压选择
  • 如何在纯内网环境下,将EasyCVR视频汇聚网关通过4G与第三方公网云平台级联?
  • 2024-06-14 AI资讯:CCF论坛探讨大模型挑战,启动安全赛
  • 玩转Matlab-Simscape(初级)- 10 - 基于COMSOLSimulink 凸轮机构的控制仿真
  • spark学习总结
  • eNSP学习——帧中继基本配置
  • XML Encoding = ‘GBK‘ after STRANS,中文乱码
  • C 语言通用MySQL 功能增删查改功能.
  • Java学习 - MySQL表 增减删查
  • 力扣SQL50 有趣的电影 简单查询
  • 01. Java并发编程简介
  • 使用Node.js+Express开发简单接口
  • 【Python】使用OpenCV特征匹配检测图像中的【特定水印】
  • 基于 Clang和LLVM 的 C++ 代码静态分析工具开发教程
  • Mathtype与word字号对照+Mathtype与word字号对照
  • PHP 8.4有哪些新功能值得关注
  • PyCharm新手入门