将 OpenConfig OSPF 命令映射到 Junos 配置
有关 OpenConfig 数据模型的支持版本,请参阅 OpenConfig 数据模型版本 。
全局配置
有关 /network-instances/network-instance/protocols/protocol/ospfv2/ 下以下 OpenConfig 路径的配置映射,请参阅表 1:
- /global/config/router-id
- /global/config/igp-shortcuts
- /global/config/log-adjacency-changes
命令 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
路由器 ID |
openconfig-network-instance:network-instances { protocols ospf { ospfv2 { global { config { router-id <>; } } } } } |
routing-options { router-id <>; } |
一个 32 位数字,表示为分配给运行 OSPFv2 协议的每个路由器的点分四边形。此编号在自治系统中应该是唯一的。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/config/router-id |
||
IGP 快捷方式 |
openconfig-network-instance:network-instances { protocols ospf { ospfv2 { global { config { igp-shortcuts <>; } } } } } |
protocols { ospf { traffic-engineering { shortcuts; } } } |
当此叶设置为 true 时,OSPFv2 将通过任何 LSP 将流量路由到标记为符合快捷方式条件的系统。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/config/igp-shortcuts |
||
记录邻接更改 |
openconfig-network-instance:network-instances { protocols ospf { ospfv2 { global { config { log-adjacency-changes <>; } } } } } |
protocols { ospf { traceoptions { file <> size <>; flag state; } } } |
如果此叶设置为 true,则当 OSPFv2 邻接方的状态发生更改时,将生成一条日志消息。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/config/log-adjacency-changes |
计时器配置(全局)
有关 /network-instances/network-instance/protocols/protocol/ospfv2/ 下以下 OpenConfig 路径的配置映射,请参阅表 2:
- /global/timers/spf/config/initial-delay
- /global/timers/max-metric/config/set
- /global/timers/max-metric/config/timeout
- /global/timers/max-metric/config/include
命令 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
SPF 初始延迟 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { global { timer{ spf { config { initial-delay <>; } } } } } } } |
routing-options { ospf { spf-options { delay <>; } } } |
此叶的值指定从检测到的拓扑更改到首次运行 SPF 算法之间的时间。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/timers/spf/config/initial-delay |
||
最大指标 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { global { timer { max-metric { config { set <>; } } } } } } } |
protocols { ospf { overload; } } |
当此叶设置为 true 时,将使用最大衡量指标通告本地系统的所有非存根接口,这样路由器就不会充当中转系统。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/timers/max-metric/config/set |
||
最大指标超时 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { global { timer { max-metric { config { timeout <>; } } } } } } } |
protocols { ospf { overload { timeout <>; } } } |
延迟,在此延迟之后,应清除具有最大指标的实体的播发,并且系统将还原为默认或配置的指标。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/timers/max-metric/config/timeout |
||
最大指标包括 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { global { timer { max-metric { config { include <>; } } } } } } } |
protocols { ospf { overload { stub-network; as-external; } } } |
默认情况下,会为设备的所有非存根接口通告最大衡量指标。您可以使用叶列表指定 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/timers/max-metric/config/include |
定时器配置(接口)
有关 /network-instances/network-instance/protocols/protocol/ospfv2/ 下以下 OpenConfig 路径的配置映射,请参阅表 2:
- /areas/area/interfaces/interface/timers/config/hello-interval
- /areas/area/interfaces/interface/timers/config/dead-interval
- /areas/area/interfaces/interface/timers/config/retransmission-interval
命令 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
呼叫间隔 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { timers { config { hello-interval <>; } } } } } } } } } |
protocols { ospf { area <> { interface <> { hello-interval <>; } } } } |
OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/timers/config/hello-interval |
||
失效间隔 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { timers { config { dead-interval <>; } } } } } } } } } |
protocols { ospf { area <> { interface <> { dead-interval <>; } } } } |
OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/timers/config/dead-interval |
||
重传间隔 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { timers { config { retransmission- interval <>; } } } } } } } } } |
protocols { ospf { area <> { interface <> { retransmit- interval <>; } } } } |
OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/timers/config/retransmission-interval |
MPLS 配置(全局)
有关 OpenConfig 路径 /network-instances/network-instance/protocols/protocol/ospfv2/global/mpls/config/traffic-engineering-extensions 的配置映射,请参见表 4。
命令和路径 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
信息流工程扩展 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { global { mpls { config { traffic-engineering-extensions <>; } } } } } } |
protocols { ospf { traffic-engineering; } } |
当此叶设置为 true 时,OSPF 的信息流工程扩展将使用类型 10 的不透明 LSA 通告信息流工程参数。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/mpls/config/traffic-engineering-extensions |
MPLS 配置(接口)
有关 /network-instances/network-instance/protocols/protocol/ospfv2/ 下以下 OpenConfig 路径的配置映射,请参阅表 2:
- /areas/area/interfaces/interface/mpls/config/traffic-engineering-metric
- /areas/area/interfaces/interface/mpls/igp-ldp-sync/config/enabled
- /areas/area/interfaces/interface/mpls/igp-ldp-sync/config/post-session-up-delay
命令 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
流量工程指标 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { mpls { config { traffic-engineering- metric <>; } } } } } } } } } |
protocols { ospf { area <> { interface <> { te-metric <>; } } } } |
仅出于流量工程目的才应考虑的链接指标。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/config/traffic-engineering-metric |
||
IGP-LDP 同步 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { mpls { igp-ldp-sync { config { enabled <>; } } } } } } } } } } |
protocols { ospf { area <> { interface <> { ldp- synchronization <>; } } } } |
如果此叶设置为 true,则在通过链路建立与邻接方的 LDP 邻接关系之前,请勿使用此链路通过 IGP 进行转发。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp-ldp-sync/config/enabled |
||
会话后启动延迟 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { mpls { igp-ldp-sync { config { post-session-up-delay <>; } } } } } } } } } } |
protocols { ospf { area <> { interface <> { ldp- synchronization { hold-time <>; } } } } } |
此叶指定从建立到 IGP 邻接方的 LDP 会话与 IGP 将其视为同步之间的延迟(以毫秒为单位)。必须使用 1000 的倍数配置此叶,以便它映射到 Junos 等效 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/mpls/igp-ldp-sync/config/post-session-up-delay |
平稳重启配置
有关 /network-instances/network-instance/protocols/protocol/ospfv2/ 下以下 OpenConfig 路径的配置映射,请参阅表 6:
- /global/graceful-restart/config/enabled
- /global/graceful-restart/config/helper-only
命令 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
使 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { global { graceful-restart { config { enabled <>; } } } } } } |
system { commit synchronize; } chassis { redundancy { graceful-switchover; } } routing-options { graceful-restart; } |
OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/graceful-restart/config/enabled |
||
帮助程序模式 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { global { graceful-restart { config { helper-only <>; } } } } } } |
注意:
默认情况下,帮助程序模式处于启用状态。 如果使用 OpenConfig 启用帮助程序模式:
|
OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/global/graceful-restart/config/helper-only |
区域配置
有关 OpenConfig 路径 /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/config/identifier 的配置映射,请参见表 7。
命令和路径 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
区域 ID |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { config { identifier <>; } } } } } } |
protocols { ospf { area <>; } } |
OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/config/identifier |
接口配置
有关 /network-instances/network-instance/protocols/protocol/ospfv2/ 下以下 OpenConfig 路径的配置映射,请参阅表 8:
- /areas/area/interfaces/interface/config/id
- /areas/area/interfaces/interface/config/passive
- /areas/area/interfaces/interface/config/priority
- /areas/area/interfaces/interface/config/metric
- /areas/area/interfaces/interface/config/network-type
命令 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
接口 ID |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { config { id <>; } } } } } } } } |
protocols { ospf { area <> { interface <>; } } } |
使用此叶定义接口的唯一引用。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/id |
||
被动接口 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { config { passive <>; } } } } } } } } |
protocols { ospf { area <> { interface <> { passive; } } } } |
当此叶设置为 true 时,将在 OSPF 区域内通告接口,但不会通过接口建立 OSPF 邻接关系。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/passive |
||
接口优先级 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { config { priority <>; } } } } } } } } |
protocols { ospf { area <> { interface <> { priority <>; } } } } |
本地系统优先成为指定路由器。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/priority |
||
接口指标 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { config { metric <>; } } } } } } } } |
protocols { ospf { area <> { interface <> { metric <>; } } } } |
OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/metric |
||
接口网络类型 |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { config { network-type <>; } } } } } } } } |
protocols { ospf { area <> { interface <> { interface-type <>; } } } } |
OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospf/ospfv2/areas/area/interfaces/interface/config/network-type |
邻居配置
有关 OpenConfig 路径 /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config/router-id 的配置映射,请参见表 9。
命令和路径 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
邻居路由器 ID |
openconfig-network-instance:network-instances { protocol ospf { ospfv2 { areas { area <> { interfaces { interface <> { neighbors { neighbor <router-id> { config { router-id <router-id>; } } } } } } } } } } |
protocols { ospf { area <> { interface <> { neighbor <>; } } } } |
远程系统的路由器 ID。 OpenConfig 路径: /network-instances/network-instance/protocols/protocol/ospfv2/areas/area/interfaces/interface/neighbors/neighbor/config/router-id |