junipernetworks.junos.junos_ospfv2 模块 – OSPFv2 资源模块
注意
此模块是 junipernetworks.junos 集合(版本 9.1.0)的一部分。
如果您使用的是 ansible
包,您可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install junipernetworks.junos
。您需要进一步的要求才能使用此模块,请参阅要求 了解详细信息。
要在 playbook 中使用它,请指定:junipernetworks.junos.junos_ospfv2
。
junipernetworks.junos 1.0.0 中的新增功能
概要
此模块管理运行 Juniper JUNOS 的设备上的 OSPFv2 配置。
要求
执行此模块的主机上需要以下要求。
ncclient (>=v0.6.4)
xmltodict (>=0.12.0)
参数
参数 |
注释 |
---|---|
OSPFv2 进程配置的列表。 |
|
OSPFv2 区域配置的列表。 |
|
区域 ID,可以是整数或 IP 地址。 |
|
配置区域的地址范围。 包含此选项是为了兼容性,请在 2025-07-01 之后删除/弃用。 此选项的替代方案是 area_ranges,它是一个列表。 |
|
配置区域的 IP 地址范围。 |
|
指定 IP 地址。 |
|
强制对此区域范围的通告进行精确匹配。 选项
|
|
覆盖此区域范围的动态指标。 |
|
限制此区域范围的通告。 选项
|
|
此区域中的接口列表。 |
|
指定身份验证类型 |
|
MD5 身份验证密钥 |
|
指定密钥值 |
|
指定密钥标识 |
|
指定密钥传输的开始时间 (YYYY-MM-DD.HH:MM) |
|
指定身份验证密钥。 |
|
要使用的身份验证类型。 包含此选项是为了兼容性,请在 2025-07-01 之后删除/弃用。 |
|
指定基于带宽的指标列表 |
|
应用指标的带宽。 选项
|
|
指定指标 |
|
启用洪泛减少。 选项
|
|
应用于接口的指标。 |
|
接口的名称。 |
|
指定被动 选项
|
|
接口的优先级。 |
|
指定计时器 |
|
死亡间隔(秒)。 |
|
Hello 间隔(秒)。 |
|
轮询间隔(秒)。 |
|
重传间隔(秒)。 |
|
传输延迟(秒)。 |
|
用于将区域配置为末梢区域的设置。 |
|
此区域中默认路由的指标。 |
|
将区域配置为末梢区域。 选项
|
|
外部路由的优先级。 |
|
指定过载模式重置的时间 |
|
配置过载时允许路由泄漏。 选项
|
|
使用最大可用指标通告为外部路由。 选项
|
|
使用最大指标通告末梢网络。 选项
|
|
过载模式重置的时间(秒)。 |
|
内部路由的优先级。 |
|
可以导出的最大外部前缀数。 |
|
用于计算指标默认值的带宽。 选项
|
|
设置 RFC1583 兼容性 选项
|
|
OSPFv2 路由器 ID。 |
|
配置 SPF 的选项。 |
|
在运行 SPF 之前等待的时间(秒)。 |
|
在运行 SPF 之前保持的时间(秒)。 |
|
不忽略自身生成的外部和 NSSA LSA。 选项
|
|
在保持之前最大快速 SPF 运行的次数(秒)。 |
|
此选项仅与状态 parsed 一起使用。 此选项的值应是通过执行命令 show protocols ospf 从 Junos 设备收到的输出。 状态 parsed 从 |
|
配置应保留的状态。 选项
|
注释
注意
此模块需要在被管理的设备上启用 netconf 系统服务。
此模块与连接
netconf
一起使用。请参阅Junos OS 平台选项。
已针对 JunOS v18.4R1 进行测试
示例
# Using merged
#
# Before state
# ------------
#
# admin# show protocols ospf
- name: Merge provided OSPFv2 configuration into running config.
junipernetworks.junos.junos_ospfv2:
config:
- reference_bandwidth: 10g
areas:
- area_id: 0.0.0.100
area_ranges:
- address: 10.200.17.0/24
exact: true
restrict: true
override_metric: 2000
- address: 10.200.15.0/24
exact: true
restrict: true
override_metric: 2000
stub:
default_metric: 100
set: true
interfaces:
- name: so-0/0/0.0
priority: 3
metric: 5
flood_reduction: false
passive: true
bandwidth_based_metrics:
- bandwidth: 1g
metric: 5
- bandwidth: 10g
metric: 40
timers:
dead_interval: 4
hello_interval: 2
poll_interval: 2
retransmit_interval: 2
rfc1583compatibility: false
state: merged
# Task Output:
# ------------
#
# before: []
#
# commands:
# - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:ospf><nc:reference-bandwidth>10g</nc:reference-bandwidth><nc:no-rfc-1583/>
# <nc:area><nc:name>0.0.0.100</nc:name><nc:area-range><nc:name>10.200.17.0/24</nc:name><nc:exact/>
# <nc:restrict/><nc:override-metric>2000</nc:override-metric></nc:area-range><nc:area-range>
# <nc:name>10.200.15.0/24</nc:name><nc:exact/><nc:restrict/><nc:override-metric>2000</nc:override-metric>
# </nc:area-range><nc:interface><nc:name>so-0/0/0.0</nc:name><nc:priority>3</nc:priority>
# <nc:metric>5</nc:metric><nc:passive/><nc:bandwidth-based-metrics><nc:bandwidth><nc:name>1g</nc:name>
# <nc:metric>5</nc:metric></nc:bandwidth><nc:bandwidth><nc:name>10g</nc:name><nc:metric>40</nc:metric>
# </nc:bandwidth></nc:bandwidth-based-metrics><nc:dead-interval>4</nc:dead-interval>
# <nc:hello-interval>2</nc:hello-interval><nc:poll-interval>2</nc:poll-interval>
# <nc:retransmit-interval>2</nc:retransmit-interval></nc:interface><nc:stub>
# <nc:default-metric>100</nc:default-metric></nc:stub></nc:area></nc:ospf></nc:protocols>
#
# after:
# - areas:
# - area_id: 0.0.0.100
# area_range: '[''10.200.17.0/24'', ''10.200.15.0/24'']'
# area_ranges:
# - address: 10.200.17.0/24
# exact: true
# override_metric: 2000
# restrict: true
# - address: 10.200.15.0/24
# exact: true
# override_metric: 2000
# restrict: true
# interfaces:
# - bandwidth_based_metrics:
# - bandwidth: 1g
# metric: 5
# - bandwidth: 10g
# metric: 40
# metric: 5
# name: so-0/0/0.0
# passive: true
# priority: 3
# timers:
# dead_interval: 4
# hello_interval: 2
# poll_interval: 2
# retransmit_interval: 2
# stub:
# default_metric: 100
# set: true
# reference_bandwidth: 10g
# rfc1583compatibility: false
# After state
# -----------
#
# admin# show protocols ospf
# reference-bandwidth 10g;
# no-rfc-1583;
# area 0.0.0.100 {
# stub default-metric 100;
# area-range 10.200.17.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# area-range 10.200.15.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# interface so-0/0/0.0 {
# passive;
# bandwidth-based-metrics {
# bandwidth 1g metric 5;
# bandwidth 10g metric 40;
# }
# metric 5;
# priority 3;
# retransmit-interval 2;
# hello-interval 2;
# dead-interval 4;
# poll-interval 2;
# }
# }
#
# Using replaced
#
# Before state
# ------------
#
# admin# show protocols ospf
# reference-bandwidth 10g;
# no-rfc-1583;
# area 0.0.0.100 {
# stub default-metric 100;
# area-range 10.200.17.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# area-range 10.200.15.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# interface so-0/0/0.0 {
# passive;
# bandwidth-based-metrics {
# bandwidth 1g metric 5;
# bandwidth 10g metric 40;
# }
# metric 5;
# priority 3;
# retransmit-interval 2;
# hello-interval 2;
# dead-interval 4;
# poll-interval 2;
# }
# }
- name: Replace existing Junos OSPFv2 config with provided config
junipernetworks.junos.junos_ospfv2:
config:
- reference_bandwidth: 10g
areas:
- area_id: 0.0.0.100
area_ranges:
- address: 10.200.17.0/24
exact: true
restrict: true
- address: 10.200.16.0/24
exact: true
restrict: true
override_metric: 1000
stub:
default_metric: 100
set: true
interfaces:
- name: so-0/0/0.0
priority: 3
metric: 5
flood_reduction: false
passive: true
bandwidth_based_metrics:
- bandwidth: 1g
metric: 5
- bandwidth: 10g
metric: 40
timers:
dead_interval: 4
hello_interval: 2
poll_interval: 2
retransmit_interval: 2
rfc1583compatibility: false
state: replacedd
# Task Output:
# ------------
#
# before:
# - areas:
# - area_id: 0.0.0.100
# area_range: '[''10.200.17.0/24'', ''10.200.15.0/24'']'
# area_ranges:
# - address: 10.200.17.0/24
# exact: true
# override_metric: 2000
# restrict: true
# - address: 10.200.15.0/24
# exact: true
# override_metric: 2000
# restrict: true
# interfaces:
# - bandwidth_based_metrics:
# - bandwidth: 1g
# metric: 5
# - bandwidth: 10g
# metric: 40
# metric: 5
# name: so-0/0/0.0
# passive: true
# priority: 3
# timers:
# dead_interval: 4
# hello_interval: 2
# poll_interval: 2
# retransmit_interval: 2
# stub:
# default_metric: 100
# set: true
# reference_bandwidth: 10g
# rfc1583compatibility: false
#
# commands:
# - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:ospf><nc:area delete="delete">0.0.0.100</nc:area></nc:ospf><nc:ospf>
# <nc:reference-bandwidth>10g</nc:reference-bandwidth><nc:no-rfc-1583/><nc:area>
# <nc:name>0.0.0.100</nc:name><nc:area-range><nc:name>10.200.17.0/24</nc:name><nc:exact/>
# <nc:restrict/></nc:area-range><nc:area-range><nc:name>10.200.16.0/24</nc:name><nc:exact/>
# <nc:restrict/><nc:override-metric>1000</nc:override-metric></nc:area-range><nc:interface>
# <nc:name>so-0/0/0.0</nc:name><nc:priority>3</nc:priority><nc:metric>5</nc:metric><nc:passive/>
# <nc:bandwidth-based-metrics><nc:bandwidth><nc:name>1g</nc:name><nc:metric>5</nc:metric>
# </nc:bandwidth><nc:bandwidth><nc:name>10g</nc:name><nc:metric>40</nc:metric></nc:bandwidth>
# </nc:bandwidth-based-metrics><nc:dead-interval>4</nc:dead-interval><nc:hello-interval>2</nc:hello-interval>
# <nc:poll-interval>2</nc:poll-interval><nc:retransmit-interval>2</nc:retransmit-interval></nc:interface>
# <nc:stub><nc:default-metric>100</nc:default-metric></nc:stub></nc:area></nc:ospf></nc:protocols>
#
# after:
# - areas:
# - area_id: 0.0.0.100
# area_range: '[''10.200.17.0/24'', ''10.200.16.0/24'']'
# area_ranges:
# - address: 10.200.17.0/24
# exact: true
# restrict: true
# - address: 10.200.16.0/24
# exact: true
# override_metric: 1000
# restrict: true
# interfaces:
# - bandwidth_based_metrics:
# - bandwidth: 1g
# metric: 5
# - bandwidth: 10g
# metric: 40
# metric: 5
# name: so-0/0/0.0
# passive: true
# priority: 3
# timers:
# dead_interval: 4
# hello_interval: 2
# poll_interval: 2
# retransmit_interval: 2
# stub:
# default_metric: 100
# set: true
# reference_bandwidth: 10g
# rfc1583compatibility: false
#
# After state
# -----------
#
# admin# show protocols ospf
# reference-bandwidth 10g;
# no-rfc-1583;
# area 0.0.0.100 {
# stub default-metric 100;
# area-range 10.200.17.0/24 {
# restrict;
# exact;
# }
# area-range 10.200.16.0/24 {
# restrict;
# exact;
# override-metric 1000;
# }
# interface so-0/0/0.0 {
# passive;
# bandwidth-based-metrics {
# bandwidth 1g metric 5;
# bandwidth 10g metric 40;
# }
# metric 5;
# priority 3;
# retransmit-interval 2;
# hello-interval 2;
# dead-interval 4;
# poll-interval 2;
# }
# }
#
# Using overridden
#
# Before state
# ------------
#
# admin# show protocols ospf
# reference-bandwidth 10g;
# no-rfc-1583;
# area 0.0.0.100 {
# stub default-metric 100;
# area-range 10.200.17.0/24 {
# restrict;
# exact;
# }
# area-range 10.200.16.0/24 {
# restrict;
# exact;
# override-metric 1000;
# }
# interface so-0/0/0.0 {
# passive;
# bandwidth-based-metrics {
# bandwidth 1g metric 5;
# bandwidth 10g metric 40;
# }
# metric 5;
# priority 3;
# retransmit-interval 2;
# hello-interval 2;
# dead-interval 4;
# poll-interval 2;
# }
# }
- name: Override runnig OSPFv2 config with provided config
junipernetworks.junos.junos_ospfv2:
config:
- reference_bandwidth: 10g
areas:
- area_id: 0.0.0.110
area_ranges:
- address: 20.200.17.0/24
exact: true
restrict: true
override_metric: 2000
- address: 20.200.15.0/24
exact: true
restrict: true
override_metric: 2000
stub:
default_metric: 200
set: true
interfaces:
- name: so-0/0/0.0
priority: 3
metric: 5
flood_reduction: false
passive: true
bandwidth_based_metrics:
- bandwidth: 1g
metric: 5
- bandwidth: 10g
metric: 40
state: overridden
# Task Output:
# ------------
#
# before:
# - areas:
# - area_id: 0.0.0.100
# area_range: '[''10.200.17.0/24'', ''10.200.16.0/24'']'
# area_ranges:
# - address: 10.200.17.0/24
# exact: true
# restrict: true
# - address: 10.200.16.0/24
# exact: true
# override_metric: 1000
# restrict: true
# interfaces:
# - bandwidth_based_metrics:
# - bandwidth: 1g
# metric: 5
# - bandwidth: 10g
# metric: 40
# metric: 5
# name: so-0/0/0.0
# passive: true
# priority: 3
# timers:
# dead_interval: 4
# hello_interval: 2
# poll_interval: 2
# retransmit_interval: 2
# stub:
# default_metric: 100
# set: true
# reference_bandwidth: 10g
# rfc1583compatibility: false
#
# commands:
# - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:ospf><nc:area delete="delete">0.0.0.100</nc:area></nc:ospf><nc:ospf>
# <nc:reference-bandwidth>10g</nc:reference-bandwidth><nc:area><nc:name>0.0.0.110</nc:name>
# <nc:area-range><nc:name>20.200.17.0/24</nc:name><nc:exact/><nc:restrict/>
# <nc:override-metric>2000</nc:override-metric></nc:area-range><nc:area-range>
# <nc:name>20.200.15.0/24</nc:name><nc:exact/><nc:restrict/><nc:override-metric>2000</nc:override-metric>
# </nc:area-range><nc:interface><nc:name>so-0/0/0.0</nc:name><nc:priority>3</nc:priority>
# <nc:metric>5</nc:metric><nc:passive/><nc:bandwidth-based-metrics><nc:bandwidth><nc:name>1g</nc:name>
# <nc:metric>5</nc:metric></nc:bandwidth><nc:bandwidth><nc:name>10g</nc:name><nc:metric>40</nc:metric>
# </nc:bandwidth></nc:bandwidth-based-metrics></nc:interface><nc:stub>
# <nc:default-metric>200</nc:default-metric></nc:stub></nc:area></nc:ospf></nc:protocols>
#
# after:
# - areas:
# - area_id: 0.0.0.110
# area_range: '[''20.200.17.0/24'', ''20.200.15.0/24'']'
# area_ranges:
# - address: 20.200.17.0/24
# exact: true
# override_metric: 2000
# restrict: true
# - address: 20.200.15.0/24
# exact: true
# override_metric: 2000
# restrict: true
# interfaces:
# - bandwidth_based_metrics:
# - bandwidth: 1g
# metric: 5
# - bandwidth: 10g
# metric: 40
# metric: 5
# name: so-0/0/0.0
# passive: true
# priority: 3
# stub:
# default_metric: 200
# set: true
# reference_bandwidth: 10g
# rfc1583compatibility: false
# After state
# -----------
#
# admin# show protocols ospf
# reference-bandwidth 10g;
# no-rfc-1583;
# area 0.0.0.110 {
# stub default-metric 200;
# area-range 20.200.17.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# area-range 20.200.15.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# interface so-0/0/0.0 {
# passive;
# bandwidth-based-metrics {
# bandwidth 1g metric 5;
# bandwidth 10g metric 40;
# }
# metric 5;
# priority 3;
# }
# }
# Using deleted
#
# Before state
# ------------
#
# admin# show protocols ospf
# reference-bandwidth 10g;
# no-rfc-1583;
# area 0.0.0.110 {
# stub default-metric 200;
# area-range 20.200.17.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# area-range 20.200.15.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# interface so-0/0/0.0 {
# passive;
# bandwidth-based-metrics {
# bandwidth 1g metric 5;
# bandwidth 10g metric 40;
# }
# metric 5;
# priority 3;
# }
# }
- name: Delete OSPFv2 running config.
junipernetworks.junos.junos_ospfv2:
config:
state: deleted
# Task Output:
# ------------
#
# before:
# - areas:
# - area_id: 0.0.0.110
# area_range: '[''20.200.17.0/24'', ''20.200.15.0/24'']'
# area_ranges:
# - address: 20.200.17.0/24
# exact: true
# override_metric: 2000
# restrict: true
# - address: 20.200.15.0/24
# exact: true
# override_metric: 2000
# restrict: true
# interfaces:
# - bandwidth_based_metrics:
# - bandwidth: 1g
# metric: 5
# - bandwidth: 10g
# metric: 40
# metric: 5
# name: so-0/0/0.0
# passive: true
# priority: 3
# stub:
# default_metric: 200
# set: true
# reference_bandwidth: 10g
# rfc1583compatibility: false
#
# commands:
# - <nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:ospf><nc:area delete="delete">0.0.0.100</nc:area><nc:reference-bandwidth delete="delete"/>
# <nc:no-rfc-1583 delete="delete"/></nc:ospf></nc:protocols>
#
# after: []
#
#
# After state
# -----------
#
# admin# show protocols ospf
# Using gathered
#
# Before state
# ------------
#
# admin# show protocols ospf
# reference-bandwidth 10g;
# no-rfc-1583;
# area 0.0.0.100 {
# stub default-metric 100;
# area-range 10.200.17.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# area-range 10.200.15.0/24 {
# restrict;
# exact;
# override-metric 2000;
# }
# interface so-0/0/0.0 {
# passive;
# bandwidth-based-metrics {
# bandwidth 1g metric 5;
# bandwidth 10g metric 40;
# }
# metric 5;
# priority 3;
# retransmit-interval 2;
# hello-interval 2;
# dead-interval 4;
# poll-interval 2;
# }
# }
- name: Gather Junos OSPFv2 running-configuration
junipernetworks.junos.junos_ospfv2:
config:
state: gathered
#
#
# Task Output:
# ------------
#
# gathered:
#
# - areas:
# - area_id: 0.0.0.100
# area_range: '[''10.200.17.0/24'', ''10.200.15.0/24'']'
# area_ranges:
# - address: 10.200.17.0/24
# exact: true
# override_metric: 2000
# restrict: true
# - address: 10.200.15.0/24
# exact: true
# override_metric: 2000
# restrict: true
# interfaces:
# - bandwidth_based_metrics:
# - bandwidth: 1g
# metric: 5
# - bandwidth: 10g
# metric: 40
# metric: 5
# name: so-0/0/0.0
# passive: true
# priority: 3
# timers:
# dead_interval: 4
# hello_interval: 2
# poll_interval: 2
# retransmit_interval: 2
# stub:
# default_metric: 100
# set: true
# reference_bandwidth: 10g
# rfc1583compatibility: false
# Using parsed
# parsed.cfg
# ------------
# <?xml version="1.0" encoding="UTF-8"?>
# <rpc-reply message-id="urn:uuid:0cadb4e8-5bba-47f4-986e-72906227007f">
# <configuration changed-seconds="1590139550" changed-localtime="2020-05-22 09:25:50 UTC">
# <version>18.4R1-S2.4</version>
# <protocols>
# <ospf>
# <reference-bandwidth>10g</reference-bandwidth>
# <no-rfc-1583/>
# <area>
# <name>0.0.0.100</name>
# <stub>
# <default-metric>100</default-metric>
# </stub>
# <area-range>
# <name>10.200.16.0/24</name>
# <exact/>
# <override-metric>10000</override-metric>
# </area-range>
# <area-range>
# <name>10.200.11.0/24</name>
# <restrict/>
# <exact/>
# </area-range>
# <interface>
# <name>so-0/0/0.0</name>
# <passive>
# </passive>
# <bandwidth-based-metrics>
# <bandwidth>
# <name>1g</name>
# <metric>5</metric>
# </bandwidth>
# <bandwidth>
# <name>10g</name>
# <metric>40</metric>
# </bandwidth>
# </bandwidth-based-metrics>
# <metric>5</metric>
# <priority>3</priority>
# <retransmit-interval>2</retransmit-interval>
# <hello-interval>2</hello-interval>
# <dead-interval>4</dead-interval>
# <poll-interval>2</poll-interval>
# </interface>
# </area>
# </ospf>
# </protocols>
# <routing-options>
# <static>
# <route>
# <name>172.16.17.0/24</name>
# <discard />
# </route>
# </static>
# <router-id>10.200.16.75</router-id>
# <autonomous-system>
# <as-number>65432</as-number>
# </autonomous-system>
# </routing-options>
# </configuration>
# </rpc-reply>
- name: Parsed the ospfv2 config into structured ansible resource facts.
junipernetworks.junos.junos_ospfv2:
running_config: "{{ lookup('file', './parsed.cfg') }}"
state: parsed
#
# Task Output:
# ------------
#
# parsed:
# - areas:
# - area_id: 0.0.0.100
# area_range: '[''10.200.16.0/24'', ''10.200.11.0/24'']'
# area_ranges:
# - address: 10.200.16.0/24
# exact: true
# override_metric: 10000
# - address: 10.200.11.0/24
# exact: true
# restrict: true
# interfaces:
# - bandwidth_based_metrics:
# - bandwidth: 1g
# metric: 5
# - bandwidth: 10g
# metric: 40
# metric: 5
# name: so-0/0/0.0
# passive: true
# priority: 3
# timers:
# dead_interval: 4
# hello_interval: 2
# poll_interval: 2
# retransmit_interval: 2
# stub:
# default_metric: 100
# set: true
# reference_bandwidth: 10g
# rfc1583compatibility: false
# router_id: 10.200.16.75
# Using rendered
#
- name: Render the commands for provided configuration
junipernetworks.junos.junos_ospfv2:
config:
- reference_bandwidth: 10g
areas:
- area_id: 0.0.0.100
area_ranges:
- address: 10.200.17.0/24
exact: true
restrict: true
override_metric: 2000
- address: 10.200.15.0/24
exact: true
restrict: true
override_metric: 2000
stub:
default_metric: 100
set: true
interfaces:
- name: so-0/0/0.0
priority: 3
metric: 5
flood_reduction: false
passive: true
bandwidth_based_metrics:
- bandwidth: 1g
metric: 5
- bandwidth: 10g
metric: 40
timers:
dead_interval: 4
hello_interval: 2
poll_interval: 2
retransmit_interval: 2
rfc1583compatibility: false
state: rendered
# Task Output:
# ------------
#
# rendered: "<nc:protocols xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
# <nc:ospf><nc:reference-bandwidth>10g</nc:reference-bandwidth><nc:no-rfc-1583/><nc:area><nc:name>0.0.0.100</nc:name>
# <nc:area-range><nc:name>10.200.17.0/24</nc:name><nc:exact/><nc:restrict/><nc:override-metric>2000</nc:override-metric>
# </nc:area-range><nc:area-range><nc:name>10.200.15.0/24</nc:name><nc:exact/><nc:restrict/>
# <nc:override-metric>2000</nc:override-metric></nc:area-range><nc:interface><nc:name>so-0/0/0.0</nc:name>
# <nc:priority>3</nc:priority><nc:metric>5</nc:metric><nc:passive/><nc:bandwidth-based-metrics><nc:bandwidth>
# <nc:name>1g</nc:name><nc:metric>5</nc:metric></nc:bandwidth><nc:bandwidth><nc:name>10g</nc:name>
# <nc:metric>40</nc:metric></nc:bandwidth></nc:bandwidth-based-metrics><nc:dead-interval>4</nc:dead-interval>
# <nc:hello-interval>2</nc:hello-interval><nc:poll-interval>2</nc:poll-interval>
# <nc:retransmit-interval>2</nc:retransmit-interval></nc:interface><nc:stub>
# <nc:default-metric>100</nc:default-metric></nc:stub></nc:area></nc:ospf></nc:protocols>"
返回值
通用返回值记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
模块调用后的结果配置。 返回: 当更改时 示例: |
|
模块调用之前的配置。 返回: 始终 示例: |
|
推送到远程设备的命令集。 返回: 始终 示例: |
|
从远程设备收集的关于网络资源的结构化数据的事实。 返回: 当state为 示例: |
|
根据模块参数规范,将running_config选项中提供的设备原生配置解析为结构化数据。 返回: 当state为 示例: |
|
任务中提供的配置以设备原生格式(离线)呈现。 返回: 当state为 示例: |