示例:为 IS-IS 接口上的链路状态 PDU 配置传输频率
此示例说明如何修改链路状态 PDU 间隔时间。
要求
开始之前,配置 IS-IS。有关 IS-IS 配置 示例的信息,请参阅示例:配置 IS-IS。
概述
为了保持网络中的可访问性信息最新,链路状态协议需要发起、分发和撤销或超时拓扑信息。在 IS-IS 中,拓扑信息编码在链路状态 PDU 中。
默认情况下,路由设备每 100 毫秒从一个接口中发送一个链路状态 PDU。要修改此间隔,请包括以下 lsp-interval
语句:
lsp-interval milliseconds;
要禁用所有链路状态 PDU 的传输,请设置为 0。
使用 lsp-interval
语句的链路状态 PDU 节流可控制相邻路由设备的泛洪速度,以避免它们过载,并确保低带宽链路上的用户流量不会延迟。
在此示例中,将 LAN 分段上的 IS-IS 路由设备配置为每 1000 毫秒发送一次链路状态 PDU。
图 1 显示了此示例中使用的拓扑。

此示例介绍了设备 R1 上的步骤。
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层级的 [edit]
CLI 中。
设备 R1
set interfaces fe-1/2/0 unit 0 description to-R2 set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.1/30 set interfaces fe-1/2/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0001.00 set protocols isis traceoptions file isis-trace set protocols isis traceoptions flag lsp set protocols isis interface fe-1/2/0.0 lsp-interval 1000 set protocols isis interface lo0.0
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置链路状态 PDU 间隔:
配置接口。
[edit interfaces] user@R1# set fe-1/2/0 unit 0 description to-R2 user@R1# set fe-1/2/0 unit 0 family inet address 10.0.0.1/30 user@R1# set fe-1/2/0 unit 0 family iso user@R1# set lo0 unit 0 family inet address 192.168.0.1/32 user@R1# set lo0 unit 0 family iso address 49.0002.0192.0168.0001.00
在接口上启用 IS-IS。
[edit protocols isis] user@R1# set interface fe-1/2/0.0 user@R1# set interface lo0.0
修改链路状态 PDU 间隔。
[edit protocols isis interface fe-1/2/0.0] user@R1# set lsp-interval 1000
(可选)启用跟踪以跟踪链路状态 PDU 操作。
[edit protocols isis traceoptions] user@R1# set file isis-trace user@R1# set flag lsp
结果
在配置模式下,输入和 show protocols
命令以确认show interfaces
您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@R1# show interfaces
fe-1/2/0 {
unit 0 {
description to-R2;
family inet {
address 10.0.0.1/30;
}
family iso;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
family iso {
address 49.0002.0192.0168.0001.00;
}
}
}
user@R1# show protocols
isis {
traceoptions {
file isis-trace;
flag lsp;
}
interface fe-1/2/0.0 {
lsp-interval 1000;
}
interface lo0.0;
}
完成设备配置后,请从配置模式进入 commit
。重复设备 R2 上的配置。
验证
确认配置工作正常。
验证链路状态 PDU 间隔
目的
检查 IS-IS 接口上的链路状态 PDU 间隔设置。
行动
在操作模式下,输入 show isis interface extensive
命令。
user@R1> show isis interface extensive fe-1/2/0.0 Index: 70, State: 0x6, Circuit id: 0x1, Circuit type: 3 LSP interval: 1000 ms, CSNP interval: 10 s, Loose Hello padding Adjacency advertisement: Advertise Level 1 Adjacencies: 1, Priority: 64, Metric: 10 Hello Interval: 9.000 s, Hold Time: 27 s Designated Router: R2.02 (not us) Level 2 Adjacencies: 1, Priority: 64, Metric: 10 Hello Interval: 9.000 s, Hold Time: 27 s Designated Router: R2.02 (not us)
意义
输出显示,链路状态 PDU 间隔设置为 1000 毫秒。
检查链路状态 PDU 统计信息
目的
检查发送和接收的链路状态 PDU 的数量。
行动
在操作模式下,输入 show isis statistics
命令。
user@R1> show isis statistics IS-IS statistics for R1: PDU type Received Processed Drops Sent Rexmit LSP 24 24 0 13 0 IIH 2467 24 0 836 0 CSNP 474 474 0 0 0 PSNP 0 0 0 0 0 Unknown 0 0 0 0 0 Totals 2965 522 0 849 0 Total packets received: 2965 Sent: 849 SNP queue length: 0 Drops: 0 LSP queue length: 0 Drops: 0 SPF runs: 14 Fragments rebuilt: 15 LSP regenerations: 6 Purges initiated: 0
user@R2> show isis statistics IS-IS statistics for R2: PDU type Received Processed Drops Sent Rexmit LSP 13 13 0 24 0 IIH 828 15 0 2459 0 CSNP 0 0 0 474 0 PSNP 0 0 0 0 0 Unknown 0 0 0 0 0 Totals 841 28 0 2957 0 Total packets received: 841 Sent: 2957 SNP queue length: 0 Drops: 0 LSP queue length: 0 Drops: 0 SPF runs: 17 Fragments rebuilt: 26 LSP regenerations: 11 Purges initiated: 0
意义
输出显示设备 R1 和设备 R2 上发送和接收的链路状态 PDU 数。
检查跟踪日志
目的
检查 IS-IS 跟踪日志,查看数据包之间的间隔。
行动
在操作模式下,输入 show log isis-trace | match lsp
命令。
user@R1> show log isis | match lsp Jun 18 15:27:02.692031 Received L1 LSP R2.00-00, on interface fe-1/2/0.0 Jun 18 15:27:02.692753 Updating L1 LSP R2.00-00 in TED Jun 18 15:27:44.396480 Updating L1 LSP R1.00-00 in TED Jun 18 15:27:45.398077 Sending L1 LSP R1.00-00 on interface fe-1/2/0.0 Jun 18 15:28:44.689024 Received L1 LSP R2.02-00, on interface fe-1/2/0.0 Jun 18 15:28:44.689663 Updating L1 LSP R2.02-00 in TED Jun 18 15:29:15.954900 Updating L2 LSP R1.00-00 in TED Jun 18 15:29:16.955620 Sending L2 LSP R1.00-00 on interface fe-1/2/0.0 Jun 18 15:29:28.789986 Received L2 LSP R2.00-00, on interface fe-1/2/0.0 Jun 18 15:29:28.790620 Updating L2 LSP R2.00-00 in TED Jun 18 15:30:27.727892 Received L2 LSP R2.02-00, on interface fe-1/2/0.0 Jun 18 15:30:27.728519 Updating L2 LSP R2.02-00 in TED
意义
输出显示,大约每 1000 毫秒(1 秒)发送和接收一次级别 1 和 2 级链路状态 PDU。