配置路由协议rip和ospf
完成拓扑图,并使各个网段的主机可以通信。
1.使用RIP配置动态路由
对R0
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 10.1.5.1 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upRouter(config-if)#int f0/1
Router(config-if)#ip add 10.1.1.1 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#int s0/0/0
Router(config-if)#ip add 10.1.2.1 255.255.255.0
Router(config-if)#no shut%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Router(config-if)#int s0/0/1
Router(config-if)#ip add 10.1.3.1 255.255.255.0
Router(config-if)#no shut%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
Router(config-if)#int s0/1/0
Router(config-if)#ip add 10.1.4.1 255.255.255.0
Router(config-if)#no shut%LINK-5-CHANGED: Interface Serial0/1/0, changed state to down
Router(config-if)#router rip
Router(config-router)#net 10.1.1.0
Router(config-router)#net 10.1.2.0
Router(config-router)#net 10.1.3.0
Router(config-router)#net 10.1.4.0
Router(config-router)#net 10.1.5.0
Router(config-router)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
%IP-4-DUPADDR: Duplicate address 10.1.5.1 on FastEthernet0/0, sourced by 0060.4760.5201
%IP-4-DUPADDR: Duplicate address 10.1.5.1 on FastEthernet0/0, sourced by 0060.4760.5201
对R1
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 192.168.10.1 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#int f0/1
Router(config-if)#ip add 192.168.20.1 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#int s0/0/0
Router(config-if)# ip add 10.1.2.2 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to upRouter(config-if)#int s0/0/1
Router(config-if)#ip add 10.1.3.2 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to upRouter(config-if)#router rip
Router(config-router)#net 10.1.2.0
Router(config-router)#net 10.1.3.0
Router(config-router)#net 192.168.10.0
Router(config-router)#net 192.168.20.0
Router(config-router)#exit
对R2
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 192.168.30.1 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#int f0/1
Router(config-if)#ip add 192.168.40.1 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#int s0/0/0
Router(config-if)#ip add 10.1.4.2 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to upRouter(config-if)#router rip
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
Router(config-router)#router rip
Router(config-router)#net 10.1.4.0
Router(config-router)#net 192.168.30.0
Router(config-router)#net 192.168.40.0
Router(config-router)#exit
对R3
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 10.1.5.2 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
%IP-4-DUPADDR: Duplicate address 10.1.5.1 on FastEthernet0/0, sourced by 0090.2B99.CE01
%IP-4-DUPADDR: Duplicate address 10.1.5.1 on FastEthernet0/0, sourced by 0090.2B99.CE01Router(config-if)#int f0/1
Router(config-if)#ip add 172.16.10.1 255.255.255.0
Router(config-if)#no shutRouter(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#router rip
Router(config-router)#net 10.1.5.0
Router(config-router)#net 172.16.10.0
给各个主机设置ip、掩码、网关
PC0: 192.168.10.2 255.255.255.0 192.168.10.1
PC1: 192.168.20.2 255.255.255.0 192.168.20.1
PC2: 192.168.30.2 255.255.255.0 192.168.30.1
PC3: 192.168.40.2 255.255.255.0 192.168.40.1
PC4: 172.16.10.2 255.255.255.0 172.16.10.1
Server0:10.1.1.2 255.255.255.0 10.1.1.1
对R0
对R1
对R2
对R3
2.使用ospf配置动态路由(直接删除更改原有配置)
对R0
Router(config)#no router rip
Router(config)#router ospf 1
Router(config-router)#net 10.1.1.0 0.0.0.255 area 0
Router(config-router)#net 10.1.2.0 0.0.0.255 area 0
Router(config-router)#net 10.1.3.0 0.0.0.255 area 0
Router(config-router)#net 10.1.4.0 0.0.0.255 area 0
Router(config-router)#net 10.1.5.0 0.0.0.255 area 0
对R1
Router(config)#no router rip
Router(config)#router ospf 1
Router(config-router)#net 10.1.2.0 0.0.0.255 area 0
Router(config-router)#net 10.1.3.0 0.0.0.255 area 0
Router(config-router)#net 192.168.10.0 0.0.0.255 area 0
Router(config-router)#net 192.168.20.0 0.0.0.255 area 0
对R2
Router(config)#no router rip
Router(config)#router ospf 1
Router(config-router)#net 10.1.4.0 0.0.0.255 area 0
Router(config-router)#net 192.168.30.0 0.0.0.255 area 0
Router(config-router)#net 192.168.40.0 0.0.0.255 area 0
Router(config-router)#
对R3
Router(config)#no router rip
Router(config)#router ospf 1
Router(config-router)#net 10.1.5.0 0.0.0.255 area 0.
Router(config-router)#net 172.16.10.0 0.0.0.255 area 0
Router(config-router)#
OSPF配置完成,查看四个路由器的路由表
动态路由配置,使用了两种方法RIP和OSPF。配置过程比较简单,先是配置端口IP,然后开启RIP或OSPF宣告网络。与静态路由相比,路由协议只用宣告与其相邻的网络,而静态路由则需配置所有与其不同的固定路由。与OSPF相比,RIP适合小型网络,不支持子网和超网,而且容易产生环路,并消耗网络带宽。所以相同情况下应该使用OSPF。
配置路由协议rip和ospf相关推荐
- 【计算机网络】Internet原理与技术2(因特网的路由协议RIP、OSPF、BGP,网络地址转换NAT,网络协议IPv6)
Internet原理与技术 因特网的路由协议 自治系统与路由协议分类(IGP.EGP) 内部网关协议 - RIP [例]RIP路由信息表的交换 RIP工作过程 内部网关协议 - OSPF 外部网关协议 ...
- 路由协议RIP、OSPF、BGP比较
根据是否在一个自治域内部使用,动态路由协议分为内部网关协议(IGP)和外部网关协议(EGP).这里的自治域指一个具有统一管理机构.统一路由策略的网络.自治域内部采用的路由选择协议称为内部网关协议,常用 ...
- Junos路由器静态路由及动态路由rip和ospf配置测试
一.测试拓扑: 二.基本配置: A.R1: interface Ethernet0/0 ip address 202.100.100.1 255.255.255.0 no shut inter ...
- 动态路由协议RIP配置和动态路由协议OSPF配置
实验十二 动态路由协议RIP配置 1 实验目的 (1)掌握动态路由协议的原理. (2)掌握经典动态路由协议RIP的原理及过程. (3)掌握动态路由协议RIP的配置过程. 2 实验内容 (1)依据相应的 ...
- 计网技术实践 RIP和OSPF路由协议的配置及协议流程分析
一.实验环境 1.在Windows10系统下用Dynamips软件进行实验 2.实验拓扑图: 二.实验目的 1.在上一次实验的基础上实现RIP和OSPF路由协议 2.自己设计网络物理拓扑和逻辑网段,并 ...
- 动态路由协议RIP的基本原理与配置
前面学习了静态路由的原理,但是用静态路由搭建网络时,每一条路由的变更都需要手动进行配置,这在大型网络中的工作量是非常巨大的.有没有办法解决呢?答案是肯定的,使用动态路由即可解决此问题 动态路由协议 ...
- OSPF动态路由协议(了解ospf,RIP协议,外部网关协议内部网关协议,ospf工作过程,选举过程,ospf邻居关系7个状态)
文章目录 OSPF动态路由协议 常见的路由协议 RIP距离矢量型路由协议 RIP的度量值与更新时间 RIP v1和RIP v2的区别 内部网关协议和外部网关协议 OSPF的基本概念和工作过程 AS(a ...
- 路由协议Ⅰ(RIP、OSPF、IS-IS、IGP、BGP等)
路由协议 简介: 路由协议(Routing protocol)是一种指定数据包转送方式的网上协议.Internet网络的主要节点设备是路由器,路由器通过路由表来转发接收到的数据.转发策略可以是人工指定 ...
- 动态路由协议RIP的深层配置学习
动态路由协议: 动态路由相比静态路由的区别在于,动态路由是基于拓扑变化而收敛的路由协议.这使得动态路由更适用于复杂的大型网络(静态路由协议需要手工配置,工程量较大).当然动态路由有其他的问题:然如安全 ...
最新文章
- maven的配置-2019-4-13
- java 字符串常用函数_Java学习(5)——字符串常用函数
- springcloud----负载均衡--Ribbon与LoadBalance
- 时间控件_Selenium时间控件的处理
- 隔壁大爷都会网络布线啦、搞起来搞起来
- PHP网站使用JavaScript和Iframe简单实现部分刷新效果
- 【Linux】一步一步学Linux——Linux系统常用快捷键(12) 待更新...
- c++读取文件–结束条件的判断
- 对象交互。英雄搏击游戏。0107
- windows 安装mongodb
- 去中心化保证金交易平台Lever完成60万美元种子轮融资,NGC Venture等领投
- sydney airport hotel recommendations
- 连接mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决方法
- cron表达式及在线生成器
- 学习站点(ireaperwebEx播放器)
- CText类使用例程
- 【读书笔记】《乔布斯的魔力演讲》卡迈恩•加洛
- Java中将List分组到Map中算法(可用于android联系人拼音分组)
- TensorBoardX histogram查看说明
- 【微信小程序开发(云壁纸小程序教程)】