RIPng 定时器
示例:配置 RIPng 更新间隔
此示例说明如何配置 RIPng 更新间隔以及如何监控更改的影响。
要求
配置此示例之前,不需要除设备初始化之外的特殊配置。
概述
在此示例中,设备 R2 的邻居设备 R1 的更新间隔为 60 秒,其邻接设备 R3 的更新间隔为 10 秒。
此示例不一定实用,但出于演示目的而展示。通常,我们建议反对更改 RIPng 计时器,除非人们充分了解更改的影响。通常,对于标准操作,最好保留默认值。
导出策略也显示,因为需要导出策略作为 RIPng 的最低配置的一部分。
图 1 显示了此示例中使用的拓扑。

CLI 快速配置 显示了 图 1 中所有设备的配置。第 #d13e66__d13e190 节介绍了设备 R2 上的步骤。
拓扑
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层级的 [edit]
CLI 中。
设备 R1
set interfaces fe-1/2/0 unit 1 description to-R2 set interfaces fe-1/2/0 unit 1 family inet6 address 2001:db8:0:1::/64 eui-64 set interfaces lo0 unit 1 family inet6 address 2001:db8::1/128 set protocols ripng group ripng-group export advertise-routes-through-ripng set protocols ripng group ripng-group neighbor fe-1/2/0.1 set policy-options policy-statement advertise-routes-through-ripng term 1 from protocol direct set policy-options policy-statement advertise-routes-through-ripng term 1 from protocol ripng set policy-options policy-statement advertise-routes-through-ripng term 1 then accept
设备 R2
set interfaces fe-1/2/0 unit 2 description to-R1 set interfaces fe-1/2/0 unit 2 family inet6 address 2001:db8:0:2::/64 eui-64 set interfaces fe-1/2/1 unit 5 description to-R3 set interfaces fe-1/2/1 unit 5 family inet6 address 2001:db8:0:3::/64 eui-64 set interfaces lo0 unit 2 family inet6 address 2001:db8::2/128 set protocols ripng group ripng-group export advertise-routes-through-ripng set protocols ripng group ripng-group neighbor fe-1/2/0.2 update-interval 60 set protocols ripng group ripng-group neighbor fe-1/2/1.5 update-interval 10 set policy-options policy-statement advertise-routes-through-ripng term 1 from protocol direct set policy-options policy-statement advertise-routes-through-ripng term 1 from protocol ripng set policy-options policy-statement advertise-routes-through-ripng term 1 then accept
设备 R3
set interfaces fe-1/2/0 unit 6 description to-R2 set interfaces fe-1/2/0 unit 6 family inet6 address 2001:db8:0:4::/64 eui-64 set interfaces lo0 unit 3 family inet6 address 2001:db8::3/128 set protocols ripng group ripng-group export advertise-routes-through-ripng set protocols ripng group ripng-group neighbor fe-1/2/0.6 set policy-options policy-statement advertise-routes-through-ripng term 1 from protocol direct set policy-options policy-statement advertise-routes-through-ripng term 1 from protocol ripng set policy-options policy-statement advertise-routes-through-ripng term 1 then accept
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置 RIPng 更新间隔:
配置网络接口。
此示例显示了多个用于模拟附加网络的环路接口地址。
[edit interfaces] user@R2# set fe-1/2/0 unit 2 description to-R1 user@R2# set fe-1/2/0 unit 2 family inet6 address 2001:db8:0:2::/64 eui-64 user@R2# set fe-1/2/1 unit 5 description to-R3 user@R2# set fe-1/2/1 unit 5 family inet6 address 2001:db8:0:3::/64 eui-64 user@R2# set lo0 unit 2 family inet6 address 2001:db8::2/128
为两个 RIPng 邻接方配置不同的更新间隔。
要在 Junos OS 中配置 RIPng,必须配置一个包含启用了 RIPng 的接口的组。无需在环路接口上启用 RIPng。
[edit protocols ripng group ripng-group] user@R2# set neighbor fe-1/2/0.2 update-interval 60 user@R2# set neighbor fe-1/2/1.5 update-interval 10
创建路由策略以播发直接路由和 RIPng 学习路由。
[edit policy-options policy-statement advertise-routes-through-ripng term 1] user@R2# set from protocol direct user@R2# set from protocol ripng user@R2# set then accept
应用路由策略。
在 Junos OS 中,只能在组级别应用 RIPng 导出策略。
[edit protocols ripng group ripng-group] user@R2# set export advertise-routes-through-ripng
结果
在配置模式下,输入 、 show protocols
和show policy-options
命令,show interfaces
以确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明,以便进行更正。
user@R2# show interfaces
fe-1/2/0 {
unit 2 {
description to-R1;
family inet6 {
address 2001:db8:0:2::/64 {
eui-64;
}
}
}
}
fe-1/2/1 {
unit 5 {
description to-R3;
family inet6 {
address 2001:db8:0:3::/64 {
eui-64;
}
}
}
}
lo0 {
unit 2 {
family inet6 {
address 2001:db8::2/128;
}
}
}
user@R2# show protocols
ripng {
group ripng-group {
export advertise-routes-through-ripng;
neighbor fe-1/2/0.2 {
update-interval 60;
}
neighbor fe-1/2/1.5 {
update-interval 10;
}
}
}
user@R2# show policy-options
policy-statement advertise-routes-through-ripng {
term 1 {
from protocol [ direct ripng ];
then accept;
}
}
完成设备配置后,请在配置模式下输入 提交 。
验证
确认配置工作正常。
检查设备 R2 发送的 RIPng 更新
目的
请确保 RIPng 更新数据包按预期的间隔发送。
行动
在操作模式下,输入 show ripng statistics
命令。
user@R2> show ripng statistics RIPng info: port 521; holddown 120s. rts learned rts held down rqsts dropped resps dropped 4 0 0 0 fe-1/2/0.2: 2 routes learned; 5 routes advertised; timeout 180s; update interval 60s Counter Total Last 5 min Last minute ------- ----------- ----------- ----------- Updates Sent 1 1 1 Triggered Updates Sent 0 0 0 Responses Sent 0 0 0 Bad Messages 0 0 0 Updates Received 1 0 0 Bad Route Entries 0 0 0 Updates Ignored 0 0 0 RIPng Requests Received 0 0 0 RIPng Requests Ignored 0 0 0 fe-1/2/1.5: 2 routes learned; 5 routes advertised; timeout 180s; update interval 10s Counter Total Last 5 min Last minute ------- ----------- ----------- ----------- Updates Sent 6 2 2 Triggered Updates Sent 0 0 0 Responses Sent 0 0 0 Bad Messages 0 0 0 Updates Received 2 0 0 Bad Route Entries 0 0 0 Updates Ignored 0 0 0 RIPng Requests Received 0 0 0 RIPng Requests Ignored 0 0 0
意义
更新间隔字段显示,其邻接方设备 R1 的间隔为 60 秒,其邻接方设备 R3 的间隔为 10 秒。“已发送的更新”字段显示,设备 R2 向设备 R1 发送更新的速率大约是向设备 R3 发送更新的 1/6。
检查设备 R2 接收的 RIPng 更新
目的
请确保 RIPng 更新数据包按预期的间隔发送。
行动
在操作模式下,输入 show ripng statistics
命令。
user@R1> show ripng statistics RIPng info: port 521; holddown 120s. rts learned rts held down rqsts dropped resps dropped 5 8 0 0 fe-1/2/0.1: 5 routes learned; 2 routes advertised; timeout 180s; update interval 30s Counter Total Last 5 min Last minute ------- ----------- ----------- ----------- Updates Sent 6 5 2 Triggered Updates Sent 0 0 0 Responses Sent 0 0 0 Bad Messages 0 0 0 Updates Received 3 3 1 Bad Route Entries 0 0 0 Updates Ignored 0 0 0 RIPng Requests Received 0 0 0 RIPng Requests Ignored 0 0 0
意义
收到的 更新 数字段显示从设备 R2 接收的更新数量。
检查设备 R3 接收的 RIPng 更新
目的
请确保 RIPng 更新数据包按预期的间隔发送。
行动
在操作模式下,输入 show ripng statistics
命令。
user@R3> show ripng statistics RIPng info: port 521; holddown 120s. rts learned rts held down rqsts dropped resps dropped 5 0 0 0 fe-1/2/0.6: 5 routes learned; 2 routes advertised; timeout 180s; update interval 30s Counter Total Last 5 min Last minute ------- ----------- ----------- ----------- Updates Sent 5 5 2 Triggered Updates Sent 0 0 0 Responses Sent 0 0 0 Bad Messages 0 0 0 Updates Received 16 15 6 Bad Route Entries 0 0 0 Updates Ignored 0 0 0 RIPng Requests Received 0 0 0 RIPng Requests Ignored 0 0 0
意义
收到的 更新 数字段显示从设备 R2 接收的更新数量。