示例:为 IS-IS 接口上的 CSNP 数据包配置传输频率
此示例说明如何在 IS-IS 接口上修改完整的序列号 PDU (CSNP) 间隔。
要求
开始之前,配置 IS-IS。有关 IS-IS 配置 示例的信息,请参阅示例:配置 IS-IS。
概述
CSNP 包含 IS-IS 数据库中所有链路状态 PDU 的完整列表。CSNP 会定期在所有链路上发送,接收系统使用 CSNP 中的信息来更新和同步其链路状态 PDU 数据库。指定路由器对广播链路进行 CSNP 组播,取代为每个链路状态 PDU 发送显式确认。
如果路由设备是 LAN 上的指定路由器,则 IS-IS 每 10 秒发送一次 CSNP。您可能需要修改默认间隔以防止 CSNP 泛洪。
仅当在 LAN 接口上配置该语句时,才 csnp-interval 有效。
要修改 CSNP 间隔,请包括以下 csnp-interval
语句:
csnp-interval seconds;
时间从 1 秒到 65,535 秒不等。
要将接口配置为不发送任何 CSNP,请指定 disable
选项:
csnp-interval disable;
在此示例中,将 LAN 分段上的 IS-IS 路由设备配置为每 30 秒发送一次 CSNP。
图 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 csn set protocols isis interface fe-1/2/0.0 csnp-interval 30 set protocols isis interface lo0.0
逐步过程
以下示例要求您在配置层次结构中的各个级别上导航。有关导航 CLI 的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置 CSNP 间隔:
配置接口。
[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
修改 CSNP 间隔。
[edit protocols isis interface fe-1/2/0.0] user@R1# set csnp-interval 30
(可选)启用跟踪以跟踪 CSNP 操作。
[edit protocols isis traceoptions] user@R1# set file isis-trace user@R1# set flag csn
结果
在配置模式下,输入和 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 csn;
}
interface fe-1/2/0.0 {
csnp-interval 30;
}
interface lo0.0;
}
完成设备配置后,请从配置模式进入 commit
。重复设备 R2 上的配置。
验证
确认配置工作正常。
验证 CSNP 间隔
目的
检查 IS-IS 接口上的 CSNP 间隔设置。
行动
在操作模式下,输入 show isis interface extensive
命令。
user@R1> show isis interface extensive IS-IS interface database: fe-1/2/0.0 Index: 70, State: 0x6, Circuit id: 0x1, Circuit type: 3 LSP interval: 100 ms, CSNP interval: 30 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)
意义
输出显示 CSNP 间隔设置为 30 秒。
检查 CSNP 统计数据
目的
检查发送和接收的 CSNP 数量。
行动
在操作模式下,输入 show isis statistics
命令。
user@R1> show isis statistics IS-IS statistics for R1: PDU type Received Processed Drops Sent Rexmit LSP 5 5 0 3 0 IIH 94 20 0 43 0 CSNP 6 6 0 0 0 PSNP 0 0 0 0 0 Unknown 0 0 0 0 0 Totals 105 31 0 46 0 Total packets received: 105 Sent: 46 SNP queue length: 0 Drops: 0 LSP queue length: 0 Drops: 0 SPF runs: 5 Fragments rebuilt: 5 LSP regenerations: 0 Purges initiated: 0 -----
user@R2> show isis statistics IS-IS statistics for R2: PDU type Received Processed Drops Sent Rexmit LSP 3 3 0 5 0 IIH 35 11 0 86 0 CSNP 0 0 0 6 0 PSNP 0 0 0 0 0 Unknown 0 0 0 0 0 Totals 38 14 0 97 0 Total packets received: 38 Sent: 97 SNP queue length: 0 Drops: 0 LSP queue length: 0 Drops: 0 SPF runs: 7 Fragments rebuilt: 7 LSP regenerations: 0 Purges initiated: 0
意义
输出显示设备 R1 和设备 R2 上发送和接收的 CSNP 数。
在广播链路上,只有指定的中间系统 (DIS) 发送 CSNP。
检查 IS-IS 日志
目的
检查 IS-IS 跟踪日志,查看数据包之间的间隔。
行动
在操作模式下,输入 show log isis-trace | match csn
命令。
user@R1> show log isis-trace | match csn Jun 18 14:36:19.504064 Received L1 CSN, source R2, interface fe-1/2/0.0 Jun 18 14:36:19.523065 Received L2 CSN, source R2, interface fe-1/2/0.0 Jun 18 14:36:48.904120 Received L1 CSN, source R2, interface fe-1/2/0.0 Jun 18 14:36:48.916425 Received L2 CSN, source R2, interface fe-1/2/0.0 Jun 18 14:37:14.954447 Received L1 CSN, source R2, interface fe-1/2/0.0 Jun 18 14:37:14.971329 Received L2 CSN, source R2, interface fe-1/2/0.0 Jun 18 14:37:44.227106 Received L1 CSN, source R2, interface fe-1/2/0.0 Jun 18 14:37:44.244181 Received L2 CSN, source R2, interface fe-1/2/0.0
意义
输出显示,大约每 30 秒接收一次级别 1 和级别 2 的 CSNP。