草庐IT

实训十九:RIP2路由协议定时器配置

晓近 2024-02-13 原文

一、实验目的

  1. 掌握 RIP 定时器的配置
  2. 理解 RIP 周期性发送的机制

二、应用环境

  1. 在某些变化频繁的环境中,需要缩短定时器的值以便及时更新路由表
  2. 在某些变化非常少的环境中,也需要延长定时器的值以便减少流量和开销
  3. 重要三个定时器:update、expire、holddown

三、实验设备

  1. DCR-2655 两台
  2. 网线(交叉线) 三条

四、实验拓扑

五、实验要求

六、实验步骤

第一步:按照上表,配置路由器的所有接口地址并测试连通性

Router_config#hostname Router-A
Router-A_config#interface g0/3
Router-A_config_g0/3#ip address 192.168.1.1 255.255.255.0
Router-A_config_g0/3#exit
Router-A_config#interface g0/4
Router-A_config_g0/4#ip address 192.168.0.1 255.255.255.0
Router-A_config_g0/4#exit
Router-B 同上

第二步:配置路由器 A 与路由器 B

Router-A_config#router rip
Router-A_config_rip#version 2 !配置为版本 2
Router-A_config_rip#network 192.168.0.0
Router-A_config_rip#network 192.168.1.0
Router-A_config_rip#exit
Router-B_config#router rip
Router-B_config_rip#version 2 !配置为版本 2
Router-B_config_rip#network 192.168.1.0
Router-B_config_rip#network 192.168.2.0
Router-B_config_rip#exit
查看默认的定时器的值
Router-B#show ip rip protocol
RIP is Active 
update interval 30(s), Invalid interval 180(s) 
Holddown interval 120(s), Trigger interval 5(s) !默认值
Automatic network summarization: Enable
Network List:
 network 192.168.1.0
 network 192.168.2.0
Filter list:
Offset list:
Redistribute policy:
Interface send version and receive version:
Global version : default
 Interface Send-version Recv-version Nbr_number
 GigaEthernet0/3 V1 V1 V2 1
 GigaEthernet0/4 V1 V1 V2 0
Distance: 0 (default is 120):
Maximum route count: 1024, Current route count:2 

第三步:为路由器 B 设置定时器

Router-B#conf
Router-B_config#router rip !运行 rip 协议 
Router-B_config_rip#timer update 10 !设置更新周期为 10 秒
Router-B_config_rip#timer expire 30 !过期时间为 30 秒
Router-B_config_rip#timer holddown 50 !holddown 时间为 50

第四步:验证配置

Router-B#show run 
Building configuration...
Current configuration:
!
!version 1.3.3H
service timestamps log date
service timestamps debug date
no service password-encryption
!
hostname Router-B
!
!
gbsc group default
!
! 
interface FastEthernet0/0
no ip address
no ip directed-broadcast
!
interface GigaEthernet0/3
ip address 192.168.1.2 255.255.255.0
no ip directed-broadcast
!
interface GigaEthernet0/4
ip address 192.168.2.1 255.255.255.0
no ip directed-broadcast
!
interface GigaEthernet0/5
no ip address
no ip directed-broadcast
!
interface GigaEthernet0/6
no ip address
no ip directed-broadcast
!
interface Serial0/1
no ip address
no ip directed-broadcast
!
interface Serial0/2
no ip address
no ip directed-broadcast
!
interface Async0/0
no ip address
no ip directed-broadcast
!
router rip
version 2
network 192.168.1.0
network 192.168.2.0
timers update 10
timers expire 30
timers holddown 50
!
!

七、 注意事项和排错

  1. 根据时间环境设置合适的值
  2. 一般过期时间为更新周期的 3 倍

八、相关配置命令详解

timers expire
使用 timers expire 路由器配置命令调整 RIP 网络的计时器,no timers expire 恢复缺省的计时器。
timers expire interval
no timers expire

缺省:expire 是 180 秒
命令模式 :路由配置状态
使用说明 :RIP 基本的计时参数是可调整的。由于 RIP 执行的是一种分布式的异步路由算法,把网络中所有的
路由器和访问服务器的这些计时参数设为相同就显得非常重要。
注意:可以用 show ip rip 命令来察看当前的或缺省的计时器参数。
示例 :下面的例子设置 RIP,如果在 30 秒内没有接收到路由器的信息,这条路由就宣告为不可用。
router rip
timers expire 30


缺省: holddown 是 120 seconds
命令模式 : 路由配置状态
使用说明 : RIP 基本的计时参数是可调整的。由于 RIP 执行的是一种分布式的异步路由算法,把网络中所有的
路由器和访问服务器的这些计时参数设为相同就显得非常重要。
注意:可以用 show ip rip 命令来察看当前的或缺省的计时器参数。
示例
下面的例子设置 RIP,如果在路由被宣告为不可用后,接下去的 30 秒内仍然没有接收到路由器的信
息,就从路由表中把这条路由删除。
router rip
timers holddown 30
timers update

使用 timers update 路由器配置命令调整 RIP 网络的计时器,no timers update 恢复缺省的计时器。
timers update update
no timers update


缺省: update 是 30 秒
命令模式 :路由配置状态
使用说明: RIP 基本的计时参数是可调整的。由于 RIP 执行的是一种分布式的异步路由算法,把网络中所有的
路由路由器和访问服务器的这些计时参数设为相同就显得非常重要。
注意:可以用 show ip rip protocol 命令来察看当前的或缺省的计时器参数。
示例: 下面的例子设置 RIP 更新每 5 秒钟广播一次。
router rip
timers update 5

注意:把更新的周期设置太小,可能导致低速串行链路的拥塞,但在快速的以太网和 T-1 速率的串行
链路上,则不必担心。同时,如果更新中包括许多路由,可能导致路由路由器花费较多的时间来处理更新。

有关实训十九:RIP2路由协议定时器配置的更多相关文章

  1. ruby-on-rails - Rails 3 中的多个路由文件 - 2

    Rails2.3可以选择随时使用RouteSet#add_configuration_file添加更多路由。是否可以在Rails3项目中做同样的事情? 最佳答案 在config/application.rb中:config.paths.config.routes在Rails3.2(也可能是Rails3.1)中,使用:config.paths["config/routes"] 关于ruby-on-rails-Rails3中的多个路由文件,我们在StackOverflow上找到一个类似的问题

  2. ruby - rails 3 redirect_to 将参数传递给命名路由 - 2

    我没有找到太多关于如何执行此操作的信息,尽管有很多关于如何使用像这样的redirect_to将参数传递给重定向的建议:action=>'something',:controller=>'something'在我的应用程序中,我在路由文件中有以下内容match'profile'=>'User#show'我的表演Action是这样的defshow@user=User.find(params[:user])@title=@user.first_nameend重定向发生在同一个用户Controller中,就像这样defregister@title="Registration"@user=Use

  3. ruby-on-rails - Rails 3,嵌套资源,没有路由匹配 [PUT] - 2

    我真的为这个而疯狂。我一直在搜索答案并尝试我找到的所有内容,包括相关问题和stackoverflow上的答案,但仍然无法正常工作。我正在使用嵌套资源,但无法使表单正常工作。我总是遇到错误,例如没有路线匹配[PUT]"/galleries/1/photos"表格在这里:/galleries/1/photos/1/edit路线.rbresources:galleriesdoresources:photosendresources:galleriesresources:photos照片Controller.rbdefnew@gallery=Gallery.find(params[:galle

  4. CAN协议的学习与理解 - 2

    最近在学习CAN,记录一下,也供大家参考交流。推荐几个我觉得很好的CAN学习,本文也是在看了他们的好文之后做的笔记首先是瑞萨的CAN入门,真的通透;秀!靠这篇我竟然2天理解了CAN协议!实战STM32F4CAN!原文链接:https://blog.csdn.net/XiaoXiaoPengBo/article/details/116206252CAN详解(小白教程)原文链接:https://blog.csdn.net/xwwwj/article/details/105372234一篇易懂的CAN通讯协议指南1一篇易懂的CAN通讯协议指南1-知乎(zhihu.com)视频推荐CAN总线个人知识总

  5. ruby-on-rails - Rails - 从命名路由中提取 HTTP 动词 - 2

    Rails中有没有一种方法可以提取与路由关联的HTTP动词?例如,给定这样的路线:将“users”匹配到:“users#show”,通过:[:get,:post]我能实现这样的目标吗?users_path.respond_to?(:get)(显然#respond_to不是正确的方法)我最接近的是通过执行以下操作,但它似乎并不令人满意。Rails.application.routes.routes.named_routes["users"].constraints[:request_method]#=>/^GET$/对于上下文,我有一个设置cookie然后执行redirect_to:ba

  6. ruby-on-rails - 如何在 Rails 中设置路由的默认格式? - 2

    路由有如下代码:resources:orders,only:[:create],defaults:{format:'json'}resources:users,only:[:create,:update],defaults:{format:'json'}resources:delivery_types,only:[:index],defaults:{format:'json'}resources:time_corrections,only:[:index],defaults:{format:'json'}是否可以使用1个字符串为所有资源设置默认格式,每行不带“默认值”散列?谢谢。

  7. ruby - Ruby 性能中的计时器 - 2

    我正在寻找一个用ruby​​演示计时器的在线示例,并发现了下面的代码。它按预期工作,但这个简单的程序使用30Mo内存(如Windows任务管理器中所示)和太多CPU有意义吗?非常感谢deftime_blockstart_time=Time.nowThread.new{yield}Time.now-start_timeenddefrepeat_every(seconds)whiletruedotime_spent=time_block{yield}#Tohandle-vesleepinteravalsleep(seconds-time_spent)iftime_spent

  8. ruby - cucumber 的路由问题 - 2

    我正在使用rails3和cucumber,除了这个小问题,一切都很顺利GivenIamonthe"editautomobile"pageNoroutematches{:controller=>"automobiles",:action=>"edit"}(ActionController::RoutingError)现在路径在paths.rb中设置为edit_automobile_path在routes.rb中我有汽车作为资源,我搭建了它所以请告诉我我遗漏了什么,清楚地定义了路线并且匹配,因为我运行了rake路线并看到了路线。请指出正确的方向 最佳答案

  9. ruby - Rails 路由 : Giving default values for path helpers - 2

    有什么方法可以为url/path助手提供默认值吗?我有一个可选范围环绕我的所有路线:#config/routes.rbFoo::Application.routes.drawdoscope"(:current_brand)",:constraints=>{:current_brand=>/(foo)|(bar)/}do#...allotherroutesgohereendend我希望用户能够使用这些URL访问网站:/foo/some-place/bar/some-place/some-place为了方便起见,我在我的ApplicationController中设置了一个@current

  10. ruby-on-rails - 将 Rails 路由助手作为类方法添加到类中 - 2

    我如何将像“root_path”这样的Rails路由助手作为类方法添加到像my_model.rb这样的类中?所以我的课是这样的:ClassMyModeldefself.fooreturnself.root_pathendendMyModel.foo以上不起作用,因为ClassMyModel不响应root_path这是我所知道的:我可以使用includeRails.application.routes.url_helpers,但这只会将模块的方法添加为实例方法我试过扩展Rails.application.routes.url_helpers但它没用请随时给我上课:)

随机推荐