将 OpenConfig 网络实例命令映射到 Junos 操作
请参阅 OpenConfig 数据模型版本主题 ,了解瞻博网络 ACX 系列、EX 系列、MX 系列、PTX 系列和 QFX 系列支持的数据模型版本及其 Junos OS 版本。
网络实例对设备上的通用虚拟转发表进行建模。这支持第 3 层转发结构(如虚拟路由和转发 (VRF) 实例)或第 2 层实例(如虚拟交换机实例)。还支持混合使用第 2 层和第 3 层实例。
从 Junos OS 17.4R1 版开始,支持基于网络实例的 BGP 配置。配置网络实例后,系统将提示您提供 BGP 配置选项,例如全局 bgp、邻居 bgp 等。
现有 BGP 配置没有变化,您可以在特定网络实例中配置 BGP。
#mapping-openconfig-network-instance-command-to-junos-operation__NetworkInstance-1377A821 列出了网络实例资源路径。
有关 Junos 命令的配置和映射,请参阅:
命令名称 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
描述 |
network-instances { network-instance <> { config { description; } } } |
routing-instances <> { description; } |
启用 |
network-instances { network-instance <> { config { enabled; } } } |
routing-instances <>;
注意:
使用 |
名字 |
network-instances { network-instance <> { config { name; } } } |
routing-instances <>; |
路由识别符 |
network-instances { network-instance <> { config { route-distinguisher <>; } } } |
routing-instances <> { route-distinguisher <>; } |
路由器 ID |
network-instances { network-instance <> { config { router-id <>; } } } |
routing-instances <> { router-options { router-id <>; } } |
类型 |
network-instances { network-instance <> { config { type <>; } } } |
routing-instances <> { instance-type <>; } |
命令名称 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
接口 |
network-instances { network-instance <> { interfaces { config { interface <>; } } } } |
routing-instances <> { interface <>; } |
子接口 |
network-instances { network-instance <> { interfaces { config { subinterface <>; } } } } |
routing-instances <> { interface <>; } |
命令名称 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
区间 |
openconfig-interfaces:interfaces { interface <> { subinterfaces { subinterface <> { oc-ip:ipv6 { oc-ip:router-advertisement { oc-ip:config { oc-ip:interval <>; } } } } } } } |
protocols { router-advertisement { interface <> { max-advertisement-interval <>; } } } |
一生 |
openconfig-interfaces:interfaces { interface <> { subinterfaces { subinterface <> { oc-ip:ipv6 { oc-ip:router-advertisement { oc-ip:config { oc-ip:lifetime <>; } } } } } } } |
protocols { router-advertisement { interface <> { default-lifetime <>; } } } |
抑制 |
openconfig-interfaces:interfaces { interface <> { subinterfaces { subinterface <> { oc-ip:ipv6 { oc-ip:router-advertisement { oc-ip:config { oc-ip:suppress <>; } } } } } } } |
protocols { router-advertisement { interface <> { passive-mode <>; } } } |
命令名称 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
描述 |
openconfig-network-instance:network-instances { network-instance <> { protocols { protocol <> { static-routes{ static <> { config { description <>; } } } } } } } |
routing-instances <> { routing-options { static { route <> { description <> } } } } |
前缀 |
network-instances { network-instance <> { protocols { protocol { static-routes { static { config { prefix <>; } } } } } } } |
routing-instances <> { routing-options { static { route <>; } } } |
设置标记(静态路由) |
network-instances { network-instance <> { protocols { protocol { static-routes { static { config { set-tag <>; } } } } } } } |
routing-instances <> { routing-options { static { route <> { tag <>; } } } } |
指数 |
network-instances { network-instance <> { protocols { protocol { static-routes { static { next-hops { next-hop <> { config { index <>; } } } } } } } } } |
routing-instances <> { routing-options { static { route <> { next-hop <>; } } } } |
度量 |
network-instances { network-instance <> { protocols { protocol { static-routes { static { next-hops { next-hop <> { config { metric <>; } } } } } } } } } |
routing-instances <> { routing-options { static { route <> { qualified-next-hop <> { metric <>; } } } } } |
下一跃点 |
network-instances { network-instance <> { protocols { protocol { static-routes { static { next-hops { next-hop <> { config { next-hop <>; } } } } } } } } } |
routing-instances <> { routing-options { static { route <> { next-hop <>; } } } } |
接口 |
network-instances { network-instance <> { protocols { protocol { static-routes { static { next-hops { next-hop <> { interface-ref { config { interface <>; } } } } } } } } } } |
routing-instances <> { routing-options { static { route <> { next-hop <>; } } } } |
子接口 |
network-instances { network-instance <> { protocols { protocol { static-routes { static { next-hops { next-hop <> { interface-ref { config { subinterface <>; } } } } } } } } } } |
routing-instances <> { routing-options { static { route <> { next-hop <>; } } } } |
递归 |
network-instances { network-instance <> { protocols { protocol { static-routes { static { next-hops { next-hop <> { config { recurse; } } } } } } } } } |
routing-instances <> { routing-options { static { route <> { resolve; } } } } |
默认指标 |
network-instances { network-instance <> { protocols { protocol { config { default-metric; } } } } } |
routing-instances <> { routing-options { static { defaults { metric <>; } } } } |
命令名称 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
描述 |
openconfig-network-instance:network-instances { network-instance <> { protocols { protocol <> { local-aggregates{ aggregate <> { config { description <>; } } } } } } } |
routing-instances <> { routing-options { aggregate { route <> { description <> } } } } |
丢弃 |
network-instances { network-instance <> { protocols { protocol { local-aggregates { aggregate { config { discard <>; } } } } } } } |
routing-instances <> { routing-options { aggregate { route <> { discard; } } } } |
前缀 |
network-instances { network-instance <> { protocols { protocol { local-aggregates { aggregate { config { prefix <>; } } } } } } } |
routing-instances <> { routing-options { aggregate { route <>; } } } |
设置标记 |
network-instances { network-instance { protocols { protocol { local-aggregates { aggregate { config { set-tag <>; } } } } } } } |
routing-instances <> { routing-options { aggregate { route <> { tag <>; } } } } |
度量 |
network-instances { network-instance { protocols { protocol { local-aggregates { aggregate <> { config { metric <>; } } } } } } } |
routing-instances <> { routing-options { aggregate { route <> { metric <>; } } } } |
偏好 |
network-instances { network-instance { protocols { protocol { local-aggregates { aggregate <> { config { preference <>; } } } } } } } |
routing-instances <> { routing-options { aggregate { route <> { preference <>; } } } } |
默认指标 |
network-instances { network-instance <> { protocols { protocol { config { default-metric; } } } } } |
routing-instances <> { routing-options { aggregate { defaults { metric <>; } } } } |
命令名称 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
导出策略 |
network-instances { network-instance <> { inter-instance-policies { apply-policy <> { config { export-policy; } } } } } |
routing-instances <> { vrf-export <>; } |
导入策略 |
network-instances { network-instance <> { inter-instance-policies { apply-policy <> { config { import-policy; } } } } } |
routing-instances <> { vrf-import <>; } |
默认导出策略 |
network-instances { network-instance <> { inter-instance-policies { apply-policy <> { config { default-export-policy; } } } } } |
routing-instances <> { export-default-action <accept | reject>; } |
您必须先配置导出策略,然后才能配置默认导出策略。 |
||
默认导入策略 |
network-instances { network-instance <> { inter-instance-policies { apply-policy <> { config { default-import-policy; } } } } } |
routing-instances <> { import-default-action <accept | reject>; } |
您必须先配置导入策略,然后才能配置默认导入策略。 |
||
导出路由目标 |
network-instances { network-instance <> { inter-instance-policies { import-export-policy { config { export-route-target; } } } } } |
routing-instances <> { vrf-target { export; } } |
导入路由目标 |
network-instances { network-instance <> { inter-instance-policies { import-export-policy { config { import-route-target; } } } } } |
routing-instances <> { vrf-target { import; } } |
命令名称 |
OpenConfig 配置 |
Junos 配置 |
---|---|---|
最大 |
network-instances { network-instance <> { route-limits { route-limit <> { config { maximum <>; } } } } } |
routing-instances <> { routing-options rib <> { maximum-paths <>; } } |
仅警告 |
network-instances { network-instance <> { route-limits { route-limit <> { config { warning-only <>; } } } } } |
routing-instances <> { routing-options rib <> { maximum-paths log-only; } } |
更改历史记录表
功能支持由您使用的平台和版本决定。使用 功能资源管理器 确定您的平台是否支持某个功能。