一、实验目的:使用路由重分布达到全网互通的效果

二、拓扑图:

三、具体步骤配置:

1、先给各台主机配置ip地址及网关,以PC1为例:

2、路由器配置:

(1)R1路由器配置

Router>enable  --进入特权模式
Router#configure terminal  --进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostnam R1  --修改路由器名为R1
R1(config)#interface s0/0/0  --进入端口
R1(config-if)#ip address 192.168.32.2 255.255.255.0  --为端口配置ip地址
R1(config-if)#clock rate 64000  --配置时钟速率
R1(config-if)#no shutdown  --激活端口

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R1(config-if)#interface s0/1/0  --进入端口
R1(config-if)#ip address 192.168.12.1 255.255.255.0  --为端口配置ip地址
R1(config-if)#clock rate 64000  --配置时钟速率
This command applies only to DCE interfaces
R1(config-if)#no shutdown  --激活端口

%LINK-5-CHANGED: Interface Serial0/1/0, changed state to down
R1(config-if)#interface s0/0/1  --进入端口
R1(config-if)#ip address 192.168.22.1 255.255.255.0  --为端口配置ip地址
R1(config-if)#clock rate 64000  --配置时钟速率
This command applies only to DCE interfaces
R1(config-if)#no shutdown  --激活端口

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
R1(config-if)#exit  --返回上一级
R1(config)#ip route 192.168.42.0 255.255.255.0 192.168.32.1  --配置静态路由
R1(config)#router ospf 1  --将R1的静态路由重分布到OSPF
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1(config-router)#network 192.168.22.0 0.0.0.255 area 0
R1(config-router)#redistribute static subnet  --重分布静态路由
R1(config-router)#redistribute connected subnet  --重分布直连路由
R1(config-router)#end  --返回特权模式

(2)R2路由器配置

Router>enable  --进入特权模式
Router#configure terminal  --进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2  --修改路由器名为R2
R2(config)#interface s0/1/0  --进入端口
R2(config-if)#ip address 192.168.12.2 255.255.255.0  --为端口配置ip地址
R2(config-if)#clock rate 64000  --配置时钟速率
R2(config-if)#no shutdown  --激活端口

R2(config-if)#interface s0/0/1  --进入端口
R2(config-if)#ip address 192.168.23.2 255.255.255.0  --为端口配置ip地址

R2(config-if)#clock rate 64000  --配置时钟速率

This command applies only to DCE interfaces

R2(config-if)#no shutdown   --激活端口

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
R2(config-if)#interface s0/0/0  --进入端口
R2(config-if)#ip address 192.168.13.1 255.255.255.0  --为端口配置ip地址
R2(config-if)#clock rate 64000  --配置时钟速率
R2(config-if)#no shutdown  --激活端口

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R2(config-if)#exit  --返回上一级
R2(config)#router ospf 1  --将R2rip的路由信息重分布到OSPF
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R2(config-router)#network 192.168.13.0 0.0.0.255 area 0
R2(config-router)#redistribute rip metric 1  --重分布rip路由,必须指定度量值
% Only classful networks will be redistributed  
R2(config-router)#exit  --返回上一级
R2(config)#router rip  --开启rip协议
R2(config-router)#version 2  --版本2
R2(config-router)#network 192.168.23.0  --将直连网段添加到rip
R2(config-router)#redistribute ospf 1 metric 1  --重分布OSPF路由
R2(config-router)#end  --返回特权模式

(3)R3路由器配置

Router>enable  --进入特权模式
Router#configure terminal  --进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3  --修改路由器名为R3
R3(config)#interface s0/0/0  --进入端口
R3(config-if)#ip address 192.168.22.2 255.255.255.0  --为端口配置ip地址

R3(config-if)#clock rate 64000  --配置时钟速率
R3(config-if)#no shutdown  --激活端口

R3(config-if)#interface s0/0/1  --进入端口
R3(config-if)#ip address 192.168.13.2 255.255.255.0  --为端口配置ip地址
R3(config-if)#clock rate 64000  --配置时钟速率
This command applies only to DCE interfaces
R3(config-if)#no shutdown  --激活端口

R3(config-if)#interface s0/1/0  --进入端口
R3(config-if)#ip address 192.168.33.1 255.255.255.0  --为端口配置ip地址
R3(config-if)#clock rate 64000  --配置时钟速率
R3(config-if)#no shutdown  --激活端口

%LINK-5-CHANGED: Interface Serial0/1/0, changed state to down
R3(config-if)#exit  --返回上一级
R3(config)#router ospf 1  --将R3EIGRP的路由信息重分布到OSPF
R3(config-router)#network 192.168.12.0 0.0.0.255 area 0
R3(config-router)#network 192.168.13.0 0.0.0.255 area 0
R3(config-router)#redistribute eigrp 1 metric-type 1 subnet  --重分布EIGRP路由
R3(config-router)#exit  --返回上一级
R3(config)#router eigrp 1  --将OSPF的路由信息重分布到EIGRP
R3(config-router)#network 192.168.33.0 0.0.0.255
R3(config-router)#redistribute ospf 1 metric 1000 100 255 1 1500  --重分布EIGRP路由
R3(config-router)#end  --返回特权模式

(4)R4路由器配置

Router>enable  --进入特权模式
Router#configure terminal  --进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R4  --修改路由器名为R4
R4(config)#interface f0/0  --进入端口
R4(config-if)#ip address 192.168.42.254 255.255.255.0  --为端口配置ip地址
R4(config-if)#no shutdown  --激活端口

R4(config-if)#interface s0/0/0  --进入端口
R4(config-if)#ip address 192.168.32.1 255.255.255.0  --为端口配置ip地址
R4(config-if)#clock rate 64000  --配置时钟速率
This command applies only to DCE interfaces
R4(config-if)#no shutdown  --激活端口

R4(config-if)#exit  --返回上一级
R4(config)#ip route 0.0.0.0 0.0.0.0 192.168.32.2  --配置静态路由
R4(config)#end  --返回特权模式

(5)R5路由器配置

Router>enable  --进入特权模式
Router#configure terminal  --进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R5  --修改路由器名为R5
R5(config)#interface s0/0/0  --进入端口
R5(config-if)#ip address 192.168.23.1 255.255.255.0  --为端口配置ip地址
R5(config-if)#clock rate 64000  --配置时钟速率
This command applies only to DCE interfaces
R5(config-if)#no shutdown  --激活端口

R5(config-if)#interface f0/0  --进入端口
R5(config-if)#ip address 192.168.43.254 255.255.255.0  --为端口配置ip地址
R5(config-if)#no shutdown  --激活端口

R5(config-if)#exit  --返回上一级
R5(config)#route rip  --开启rip协议
R5(config-router)#version 2  --版本2
R5(config-router)#network 192.168.43.0  --添加直连网段到rip
R5(config-router)#network 192.168.23.0  --添加直连网段到rip
R5(config-router)#end  --返回特权模式

(6)R6路由器配置

Router>enable  --进入特权模式
Router#configure terminal  --进入全局配模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R6  --修改路由器名为R6
R6(config)#interface s0/0/0  --进入端口
R6(config-if)#ip address 192.168.33.2 255.255.255.0  --为端口配置ip地址

R6(config-if)#clock rate 64000  --配置时钟速率
R6(config-if)#no shutdown  --激活端口

R6(config-if)#interface f0/0  --进入端口
R6(config-if)#ip address 192.168.53.254 255.255.255.0  --为端口配置ip地址
R6(config-if)#no shutdown  --激活端口

R6(config-if)#exit  --返回上一级
R6(config)#route eigrp 1  --开启EIGRP协议
R6(config-router)#network 192.168.33.0
R6(config-router)#network 192.168.53.0
R6(config-router)#end  --返回特权模式

四、验证:三台主机相互ping,看是否全网互通

(1)PC1PC2

(2)PC2PC3

(3)PC3PC1

路由器配置——路由重分布2(OSPF)的更多相关文章

  1. 路由器配置——路由重分布1(rip)

    一.实验目的:使用路由重分布达到全网互通 二.拓扑图: 三.具体实验步骤配置 先给各个主机配置ip地址和网关以PC1为例: (1)R1路由器配置 Router>enable  --进入特权模式R ...

  2. CCNP路由实验之八 路由重公布

     CCNP路由实验之八 路由重公布 在前面几个实验,已经学习了静态路由和动态路由.如今,我们要掌握怎样使它们在一个网络中融合,即路由重公布. 使用出站口作为静态路由 0 使用下一跳地址作为静态路由 ...

  3. CCNA网络工程师学习进程(7)路由器的路由配置

        前面一节已经介绍了路由器的端口配置,接着我们介绍路由器的路由配置:静态路由.默认路由和浮动路由的配置:动态路由协议的配置,包括RIP.IGRP.EIGRP和OSPF.     (1)路由器的基 ...

  4. Huawei BGP和OSPF双边界重分布(二)

    网络拓扑: 本例主要配置和例一致,主要是在AR3260-AR1和AR3260-AR2的路由域的边界上,从AR3260-AR1上重分布进BGP 65001的路由的时候打tag 650011,在AR326 ...

  5. Huawei BGP和OSPF双边界重分布(一)

    网络拓扑: PS:本例使用明细前缀列表双边界引入 S5700-LSW1 ================================================================ ...

  6. 路由重分发 最重要 最难 ccnp

    路由重分发   多种协议之间    彼此学习到对方的路由 重分发好   结果好 重分发不好   结果最好是产生次优路径      最差事产生路由黑洞和环路 实例1:    重分发一般需要双向重分发   ...

  7. H3C路由器配置——动态路由OSPF协议

    一.介绍 1.OSPF协议介绍 (1).OSPF(Open Shortest Path First,开放最短路径优先)路由协议是用于网际协议(IP)网络的链路状态路由协议.是一个被各厂商设备广泛支持的 ...

  8. 交换路由中期测验20181226(动态路由配置与重分发、NAT转换、ACL访问控制列表)

    测试拓扑: 接口配置信息 HostName 接口 IP地址 网关 Server 0 Fa0 172.16.15.1/24 172.16.15.254 Server 1 Fa0 100.2.15.200 ...

  9. OSPF协议学习以及路由器配置

    OSPF协议学习以及路由器配置 1.实验任务 2,使用eNsp搭建网络拓扑 3.配置路由IP ps:要使用GE(3层口),2层口(E口)需要先配置Vlan才能配置IP地址 4.配置路由器R1的ospf ...

随机推荐

  1. dede添加自定义变量不显示

    dedecms前端无法调用自定义变量要怎么解决,登录他的网站后台看了一下,自定义变量已经添加了,也写入了数据库表中,但是就是前台没办法调用出来,后面想想可能是文件权限不够,具体是哪个文件呢?查了相关文 ...

  2. Python基础 第四章 字典(2)字典方法&章小结

    1. clear 方法clear删除所有的字典项,就地执行,什么都不返回(或者说返回None) d = {} d['name'] = 'Gumby' d['age'] = 42 print(d) re ...

  3. docker 入门5 - 栈 【翻译】

    入门,第 5 部分:堆栈 先决条件 安装 Docker 版本 1.13 或更高版本. 获取第 3 部分先决条件中所述的 Docker Compose. 获取 Docker Machine,如第 4 部 ...

  4. C# DataTable根据字段排序

    DataTable dt = new DataTable(); dt.Columns.Add("Name"); dt.Columns.Add("Age");// ...

  5. mysql 8.0.13开启远程连接 配置方式

    1:linux登录mysql [root@localhost mysql]# mysql -u root -p Enter password: Welcome to the MySQL monitor ...

  6. zepto学习(二)之tap事件以及tap事件点透处理

    前言 为什么通过touch可以触发click事件? touch事件的来源 PC网页上的大部分操作都是用鼠标的,即响应的是鼠标事件,包括mousedown.mouseup.mousemove和click ...

  7. POJ1845Sumdiv题解--约数之和

    题目链接 https://cn.vjudge.net/problem/POJ-1845 分析 \(POJ\)里的数学题总是这么妙啊 首先有一个结论就是\(A=\prod{ \ {p_i}^{c_i} ...

  8. JavaWeb-用过滤器修改请求的返回状态码

    问题: 客户SDK对接服务,默认只识别200和非200的请求状态码.需要修改当前应用的状态码(如将201转为200) 解决方案:通过扩展HttpServletResponseWrapper,获取到每个 ...

  9. 统一用户认证系统CUAS实现要点

    背景: 基于目前存在多套员工使用的日常工作子系统,现状为各系统各自有一套用户体系,员工需要记住各系统的用户名.密码等信息,还需要登录多个系统,重复工作量颇多.统一用户认证组件将用户名.密码等信息统一存 ...

  10. MySQL间隙锁问题

    间隙锁(Gap Lock):锁加在不存在的空闲空间,可以是两个索引记录之间,也可能是第一个索引记录之前或最后一个索引之后的空间. 最近用户反馈说系统老是出现insert时,等待超时了,最后发现是ins ...