在 OSPF 接口上配置特定于应用的链路属性
从 Junos OS 和 Junos OS 演化版 22.2R1 版开始,您可以在同一链路上为 RSVP 和灵活算法播发不同的 te 属性,例如 te-metric、delay-metric 或admin-groups。这是使用 RFC 8920 中定义的灵活算法、特定于应用的链路属性来完成的。
要在 OSPF 接口上配置基于应用特定链路属性的灵活算法:
- 创建 OSPF 区域。
[edit protocols] user@host#set protocols ospf area area-id
例如:
[edit protocols] user@host#set protocols ospf area 0.0.0.0
- 指定接口。
[edit protocols ospf area 0.0.0.0] user@host#set interface interface-name
例如:
[edit protocols ospf area 0.0.0.0] user@host#set interface ge-0/0/0.0
- 在设备的 OSPF 接口上配置特定于应用的链路属性。
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0] user@host#set application-specific
- 指定属性组。
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific] user@host#set attribute-group name
例如:
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific] user@host#set attribute-group asla
- 配置灵活的特定于算法的 te 属性,例如 te-metric、delay-metric 和 admin-groups。指定属性组的 te-metric。te-metric 表示 OSPFv2 计算路径所依据的指标类型。
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific attribute-group asla] user@host#set te-metric
例如:
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific] user@host#set 15
- 指定属性组的管理员组。
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific attribute-group asla] user@host#set admin-group
例如:
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific] user@host#set green
- 为属性组指定延迟度量。
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific attribute-group asla] user@host#set delay-metric
例如:
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific] user@host#set 123123
- 如果未配置 delay-metric,请指定 advertise-interface-delay 以从接口配置层次结构中获取延迟值,即旧延迟值。
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific attribute-group asla] user@host#set advertise-interface-delay
例如:
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific] user@host#set 123125
注意:仅当以下所有条件都匹配时,才能提交以下配置:
-
应用程序与属性组相关联。
-
层次结构中未配置延迟度量。
-
存在接口级延迟配置。
-
- 指定属性组的应用程序。在当前的实现中,只能将灵活的算法配置为应用程序。一个属性组可以有多个应用程序与之关联,它等同于一个特定于应用程序的链接属性,其应用程序位在特定于应用程序的链接属性子的标准应用程序标识符位掩码字段中设置。
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific attribute-group asla] user@host#set application aplication-name
[edit protocols ospf area 0.0.0.0 interface ge-0/0/0.0 application-specific attribute-group asla] user@host#set application flex-algorithm
- 从配置模式输入
commit
。 - 指定 strict-asla-based-flex-algorithm 以强制执行灵活的算法路径计算仅使用通过特定于应用程序的链路属性通告相关 te 属性的链路。
[edit protocols ospf source-packet-routing] user@host#set strict-asla-based-flex-algorithm
- 从配置模式输入
commit
。要验证配置结果,请使用
show protocols
作命令。ospf { area 0.0.0.0 interface ge-0/0/0.0 { application-specific { attribute-group asla { te-metric 15; admin-group green; delay-metric 123123; advertise-interface-delay; application flex-algorithm; } } } source-packet-routing { strict-asla-based-flex-algorithm; } }
Junos OS 和 Junos OS 演化版实施支持特定于应用的链路属性 subTLV,以符合 RFC 8920 标准。特定于应用的链路属性子 TLV 是 RFC 7684 中定义的 OSPFv2 扩展链路 TLV 的子 TLV。
要验证 OSPF 数据库中是否存在特定于应用的链路属性子 TLV,请使用
show ospf database extensive
作命令。user@host> show ospf database advertising-router self extensive lsa-id 10.0.0.2
OSPF database, Area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len OpaqArea*10.0.0.2 100.100.100.100 0x80000007 665 0x22 0x649d 104 Opaque LSA Extended Link (1), length 80: Link Type (1), length 1: 1 Link Id (2), length 4: 10.1.1.1 Link Data (3), length 4: 10.21.1.1 Adjacency Sid (2), length 7: Flags (1), length 1: 0x60 MT ID (2), length 1: 0 Weight (3), length 1: 0 Label (4), length 3: 17 Application Specific Link Attribute (10), length 52: SABM Length (1), length 1: 4 UDABM Length (2), length 1: 0 SABM (3), length 4: 0x10 UDABM (4), length 0: 0x0 TEMetric (5), length 4: 10 UnidirecLinkDelay (27), length 4: 123 MinMaxUnidirecLinkDelay (28), length 8: Min DM: 123, Max DM: 123 UnidirecLinkDelayVar (29), length 4: 0 Color (9), length 4: 2 Gen timer 00:34:55 Aging timer 00:48:55 Installed 00:11:05 ago, expires in 00:48:55, sent 00:11:05 ago Last changed 00:11:05 ago, Change count: 6, Ours, TE Link ID: 0
输出显示特定于应用程序的链路属性子 TLV 字段和属性。