cisco.ios.ios_bgp_address_family 模块 – 用于配置 BGP 地址族的资源模块。
注意
此模块是 cisco.ios 集合(版本 9.0.3)的一部分。
如果您使用的是 ansible
包,您可能已经安装了此集合。 它不包含在 ansible-core
中。 要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install cisco.ios
。
要在 playbook 中使用它,请指定: cisco.ios.ios_bgp_address_family
。
cisco.ios 1.2.0 中的新功能
概要
此模块在 Cisco IOS 上配置和管理 BGP 地址族的属性。
参数
参数 |
注释 |
---|---|
BGP 地址族的一系列配置。 |
|
BGP 地址族的一系列配置。 |
|
配置路径通告/导出到其他地址族 |
|
VRF 通告/导出的地址族 选项
|
|
向地址族通告/导出前缀 选项
|
|
地址族 选项
|
|
配置 BGP 聚合条目 |
|
聚合地址 (A.B.C.D) |
|
设置通告属性的条件 |
|
生成 AS confed set 路径信息 选项
|
|
生成 AS set 路径信息 选项
|
|
设置聚合的属性 |
|
聚合掩码 (A.B.C.D) |
|
从更新中筛选出更具体的路由 选项
|
|
有条件地从更新中筛选出更具体的路由 |
|
启用自动网络号汇总 选项
|
|
配置 BGP 聚合条目 |
|
BGP 表中的其他路径 |
|
要安装到 RIB 中的其他路径 选项
|
|
从邻居接收其他路径 选项
|
|
选择路径的选择标准 |
|
选择所有可用路径 选项
|
|
选择备份路径 选项
|
|
选择最佳 N 条路径 (2-3)。 |
|
选择最佳外部路径 选项
|
|
选择组最佳路径 选项
|
|
向邻居发送其他路径 选项
|
|
配置聚合计时器 有关有效值,请参阅供应商文档 |
|
启用路由震荡抑制 |
|
抑制稳定路由的最大持续时间 有关有效值,请参阅供应商文档 |
|
惩罚的半衰期 有关有效值,请参阅供应商文档 |
|
开始重用路由的值 有关有效值,请参阅供应商文档 |
|
用于指定抑制标准的路由映射 |
|
开始抑制路由的值 有关有效值,请参阅供应商文档 |
|
使用 DMZ 链路带宽作为 BGP 多路径的权重 选项
|
|
下一跳跟踪命令 |
|
有效下一跳的路由映射 |
|
下一跳触发 |
|
设置触发下一跳跟踪的延迟 有关有效值,请参阅供应商文档 |
|
启用下一跳跟踪 选项
|
|
允许将 iBGP 重新分配到 IGP(危险) 选项
|
|
route-map 控制命令 使路由映射设置命令优先于 BGP 命令(例如下一跳不变) 选项
|
|
配置后台扫描器间隔 有关有效值,请参阅供应商文档 |
|
下一跳触发 此选项已弃用,并替换为 slow_peer_options,此属性将在 2025-01-01 之后删除。 |
|
慢速对等体检测 |
|
启用慢速对等体检测 选项
|
|
设置慢速对等体检测阈值 阈值(秒) 有关有效值,请参阅供应商文档 |
|
配置慢速对等体拆分更新组 |
|
动态地将慢速对等体拆分到慢速更新组 选项
|
|
将慢速对等体永久保留在慢速更新组中 选项
|
|
下一跳触发 |
|
慢速对等体检测 |
|
启用慢速对等体检测 选项
|
|
设置慢速对等体检测阈值 阈值(秒) 有关有效值,请参阅供应商文档 |
|
配置慢速对等体拆分更新组 |
|
动态地将慢速对等体拆分到慢速更新组 选项
|
|
将慢速对等体永久保留在慢速更新组中 选项
|
|
仅当未协商路由刷新时才使用软重新配置入站 选项
|
|
管理 BGP 更新组中的对等体 根据策略拆分更新组 将具有 as-override 的对等体保留在不同的更新组中 选项
|
|
将命令设置为其默认值 选项
|
|
默认信息的分布 分发默认路由 选项
|
|
设置重新分配的路由的指标 |
|
定义管理距离 |
|
AS 外部路由的距离 |
|
AS 内部路由的距离 |
|
本地路由的距离 |
|
通过多条路径转发数据包 |
|
eBGP 和 iBGP 路径都作为多路径 |
|
iBGP 多路径 |
|
路径数 |
|
最大辅助路径数 |
|
eBGP 和 iBGP 路径都作为辅助多路径 |
|
iBGP 辅助多路径 |
|
辅助路径数 |
|
指定邻居路由器 |
|
为此邻居启用地址族 选项
|
|
与此邻居协商额外的路径功能。 |
|
禁用此邻居的额外路径功能。 选项
|
|
从邻居接收其他路径 选项
|
|
向此邻居发送额外的路径。 选项
|
|
邻居地址 (A.B.C.D) 此选项已弃用,并由 neighbor_address 替代。此属性将在 2025-01-01 之后移除。 |
|
向此邻居通告。 通告额外的路径。 |
|
选择所有可用路径 选项
|
|
选择最佳 N 条路径 (2-3)。 |
|
选择组最佳路径 选项
|
|
为条件通告指定路由映射。 |
|
仅当前缀在条件存在时才通告前缀。 条件路由映射名称。 |
|
通告路由映射名称。 |
|
仅当条件中不存在前缀时才通告前缀。 条件路由映射名称。 |
|
发送 BGP 路由更新之间的最小间隔。 |
|
向此邻居通告。 |
|
通告额外的路径。 |
|
选择所有可用路径 选项
|
|
选择最佳 N 条路径 (2-3)。 |
|
选择组最佳路径 选项
|
|
通告最佳外部(在路由反射器上的最佳内部)路径。 选项
|
|
通告额外的路径。 |
|
不同路径可以是备份路径。 选项
|
|
不同路径可以是多路径。 选项
|
|
在此邻居上启用 AIGP。 |
|
在此邻居上启用 AIGP。 |
|
携带 AIGP 值的成本社团或 MED。 |
|
携带 AIGP 值的成本扩展社团。 |
|
社团 ID。 有关有效值,请参阅供应商文档 |
|
插入点。 |
|
在 IGP 之后插入。 选项
|
|
在开始时插入。 选项
|
|
成本社团是可传递的。 选项
|
|
携带 AIGP 值的 MED。 选项
|
|
为此 IBGP 邻居启用策略支持。 选项
|
|
接受 AS 路径中存在我的 AS 的路径。 有关有效值,请参阅供应商文档 |
|
发送更新时覆盖匹配的 AS 号。 |
|
启用 AS 覆盖。 选项
|
|
发送更新时维护水平分割。 选项
|
|
激活 BGP 对等体的 BMP 监控。 |
|
激活所有服务器的 BMP 监控。 选项
|
|
激活服务器的 BMP。 BMP 服务器编号。 有关有效值,请参阅供应商文档 |
|
向对等体通告功能。 向对等体通告 ORF 功能。 向此邻居通告前缀列表 ORF 功能。 |
|
从/向此邻居发送和接收 ORF 的功能。 选项
|
|
从此邻居接收 ORF 的功能。 选项
|
|
向此邻居发送 ORF 的功能。 选项
|
|
配置路由反射器群集 ID(对等体可能会重置)。 路由反射器群集 ID,为 32 位数字,或路由反射器群集 ID,采用 IP 地址格式 (A.B.C.D)。 |
|
向此邻居发起默认路由。 |
|
指定发起默认路由的条件的路由映射。 |
|
将默认路由设置为此邻居。 选项
|
|
邻居特定描述。 |
|
使用环回地址的单跳 EBGP 对等体。 选项
|
|
过滤到/来自此邻居的更新。 |
|
ACL ID/名称。 |
|
过滤传入的更新。 选项
|
|
过滤传出的更新。 选项
|
|
传播 DMZ 链路带宽。 选项
|
|
允许不在直接连接网络上的 EBGP 邻居。 |
|
允许不在直接连接网络上的 EBGP 邻居。 选项
|
|
最大跳数。 有关有效值,请参阅供应商文档 |
|
对等路由丢失时会话失效。 |
|
使用 BFD 检测故障。 |
|
强制 BFD 多跳检测故障。 选项
|
|
设置 bfd。 选项
|
|
强制 BFD 单跳检测故障。 选项
|
|
对等路由的路由映射。 |
|
建立 BGP 过滤器。 |
|
AS 路径访问列表。 有关有效值,请参阅供应商文档 |
|
过滤传入的更新。 选项
|
|
过滤传出的更新。 选项
|
|
高可用性模式。 |
|
禁用平稳重启。 选项
|
|
为此对等体设置 ha-mode 和平稳重启。 选项
|
|
继承模板。 继承对等策略模板。 |
|
在 ATTR_SET 中为 vpn 更新堆叠 iBGP-CE 邻居路径。 选项
|
|
邻居 IPv6 地址 (X:X:X:X::X) 此选项已弃用,并由 neighbor_address 替代。此属性将在 2025-01-01 之后移除。 |
|
指定本地 AS 号 |
|
接受来自 ebgp 对等体的真实 AS 或本地 AS 选项
|
|
不将本地 AS 添加到来自 ebgp 对等体的更新中 |
|
在 EBGP 更新中将真实 AS 替换为本地 AS 选项
|
|
设置 prepend 选项
|
|
用作本地 AS 的 AS 号 有关有效值,请参阅供应商文档 |
|
设置本地 AS 号 选项
|
|
记录邻居启动/关闭和重置原因 |
|
禁用记录邻居启动/关闭和重置 选项
|
|
设置记录邻居启动/关闭和重置 选项
|
|
建立 BGP 过滤器。 |
|
最大前缀限制数量 有关有效值,请参阅供应商文档 |
|
超过限制后重启 BGP 连接 |
|
生成警告消息的阈值 (%) 有关有效值,请参阅供应商文档 |
|
仅在超过限制时给出警告消息 选项
|
|
邻居地址 (A.B.C.D) 邻居标签 邻居 IPv6 地址 (X:X:X:X::X) |
|
将 iBGP 路径的下一跳保持不变地传播到此邻居 将所有路径(iBGP 和 eBGP)的下一跳保持不变地传播到此邻居 |
|
将所有路径(iBGP 和 eBGP)的下一跳保持不变地传播到此邻居 选项
|
|
启用 next-hop-unchanged 选项
|
|
禁用此邻居的下一跳计算 |
|
为接收到的 eBGP 和 iBGP 路径启用 next-hop-self 选项
|
|
设置下一跳自环 选项
|
|
设置具有加密类型的密码 |
|
加密类型(0 为禁用加密,7 为专有) |
|
密码 |
|
BGP 可选属性过滤 |
|
为此邻居丢弃匹配的路径属性 |
|
执行入站路径属性过滤 选项
|
|
路径属性范围 |
|
路径属性范围结束值 有关有效值,请参阅供应商文档 |
|
路径属性范围起始值 有关有效值,请参阅供应商文档 |
|
路径属性类型 有关有效值,请参阅供应商文档 |
|
为此邻居将匹配的路径属性视为撤回 |
|
执行入站路径属性过滤 选项
|
|
路径属性范围 |
|
路径属性范围结束值 有关有效值,请参阅供应商文档 |
|
路径属性范围起始值 有关有效值,请参阅供应商文档 |
|
路径属性类型 有关有效值,请参阅供应商文档 |
|
对等组的成员 选项
|
|
对等组的成员 |
|
过滤到/来自此邻居的更新。 此选项已弃用,并由接受字典列表作为输入的 prefix_lists 替换 |
|
过滤传入的更新。 选项
|
|
前缀列表的名称 |
|
过滤传出的更新。 选项
|
|
过滤到/来自此邻居的更新。 |
|
过滤传入的更新。 选项
|
|
前缀列表的名称 |
|
过滤传出的更新。 选项
|
|
指定 BGP 邻居 远程邻居的 AS |
|
从出站更新中删除私有 AS 号 |
|
删除所有私有 AS 号 选项
|
|
将所有私有 AS 号替换为本地 AS 选项
|
|
从出站更新中删除私有 AS 号 选项
|
|
将路由图应用于邻居 此选项已弃用,并由接受字典列表作为输入的 route_maps 替换 |
|
将路由图应用于入站路由 选项
|
|
路由图的名称 |
|
将路由图应用于出站路由 选项
|
|
将路由图应用于邻居 |
|
将路由图应用于入站路由 选项
|
|
路由图的名称 |
|
将路由图应用于出站路由 选项
|
|
将邻居配置为路由反射器客户端 选项
|
|
将邻居配置为路由服务器客户端 选项
|
|
向此邻居发送 Community 属性 |
|
发送标准和扩展 Community 属性 选项
|
|
发送扩展 Community 属性 选项
|
|
发送标准 Community 属性。 保持与未指定 send-community 类型的配置的向后兼容性。 选项
|
|
发送标准 Community 属性 选项
|
|
以管理方式关闭此邻居 |
|
平缓关闭此邻居 时间(秒) 有关有效值,请参阅供应商文档 |
|
关闭 选项
|
|
配置慢速对等体 此选项已弃用,并替换为 slow_peer_options,此属性将在 2025-01-01 之后删除。 |
|
配置慢速对等体 |
|
禁用慢速对等体检测 选项
|
|
启用慢速对等体检测 选项
|
|
设置慢速对等体检测阈值 |
|
配置慢速对等体 |
|
配置慢速对等体 |
|
配置慢速对等体 选项
|
|
配置慢速对等体 选项
|
|
配置慢速对等体 选项
|
|
配置慢速对等体 选项
|
|
配置慢速对等体选项 |
|
配置慢速对等体 |
|
禁用慢速对等体检测 选项
|
|
启用慢速对等体检测 选项
|
|
设置慢速对等体检测阈值 |
|
配置慢速对等体 |
|
配置慢速对等体 |
|
配置慢速对等体 选项
|
|
配置慢速对等体 选项
|
|
配置慢速对等体 选项
|
|
配置慢速对等体 选项
|
|
每个邻居的软重配置 允许此邻居的入站软重配置 选项
|
|
源站点扩展社团 |
|
邻居标签 此选项已弃用,并由 neighbor_address 替代。此属性将在 2025-01-01 之后移除。 |
|
BGP 每个邻居计时器 |
|
保持时间 |
|
保活间隔 |
|
来自邻居的最小保持时间 |
|
传输选项 |
|
指定被动或主动连接 |
|
主动建立 TCP 会话 选项
|
|
被动建立 TCP 会话 选项
|
|
使用多会话进行传输 选项
|
|
使用传输路径 MTU 发现 |
|
禁用 选项
|
|
使用路径 MTU 发现 选项
|
|
BGP TTL 安全检查 最大跳数 有关有效值,请参阅供应商文档 |
|
用于选择性取消抑制被抑制路由的路由映射 |
|
设置 BGP 版本以匹配邻居 邻居的 BGP 版本 有关有效值,请参阅供应商文档 |
|
为此邻居的路由设置默认权重 |
|
指定要通过 BGP 通告的网络 |
|
网络号 (A.B.C.D) |
|
指定 BGP 后门路由 选项
|
|
通告或导出到 EVPN 地址族 选项
|
|
网络掩码 (A.B.C.D) |
|
用于修改属性的路由映射 |
|
从另一个路由协议重新分配信息 |
|
应用程序 |
|
重新分配的路由的指标 |
|
应用程序名称 |
|
路由映射参考 |
|
边界网关协议 (BGP) |
|
自治系统号 |
|
重新分配的路由的指标 |
|
路由映射参考 |
|
已连接 |
|
重新分配的路由的指标 |
|
路由映射参考 |
|
重新分配自动建立的 IP 连接路由。 只有在使用 metric 或 route_map 时才需要设置。 选项
|
|
增强型内部网关路由协议 (EIGRP) |
|
自治系统号 |
|
重新分配的路由的指标 |
|
路由映射参考 |
|
ISO IS-IS |
|
ISO 路由区域标签 |
|
OSI 动态路由的重新分配 选项
|
|
IP 动态路由的重新分配 选项
|
|
重新分配的路由的指标 |
|
路由映射参考 |
|
用于 OSI 网络的 IGRP |
|
ISO 路由区域标签 |
|
路由映射参考 |
|
定位符 ID 分离协议 (LISP) |
|
重新分配的路由的指标 |
|
路由映射参考 |
|
设置顶级属性 选项
|
|
移动路由 |
|
重新分配的路由的指标 |
|
路由映射参考 |
|
设置顶级属性 选项
|
|
按需存根路由 |
|
重新分配的路由的指标 |
|
路由映射参考 |
|
设置顶级属性 选项
|
|
开放最短路径优先 (OSPF) |
|
包括已连接。仅适用于 IPv6 AFI 选项
|
|
重新分配匹配的路由 |
|
重新分配 OSPF 外部路由 此选项已弃用,并替换为 externals 选项,此属性将在 2025-01-01 之后删除。 选项
|
|
重新分配 OSPF 外部路由 |
|
重新分配 OSPF 外部 1 类路由 选项
|
|
重新分配 OSPF 外部 1 类路由 选项
|
|
重新分配 OSPF 内部路由 选项
|
|
重新分配 OSPF NSSA 外部路由 此选项已弃用,并替换为 nssa_externals 选项,此属性将在 2025-01-01 之后删除。 选项
|
|
重新分配 OSPF NSSA 外部路由 |
|
重新分配 NSSA 外部 1 类路由 选项
|
|
重新分配 NSSA 外部 2 类路由 选项
|
|
重新分配 NSSA 外部 1 类路由 此选项已弃用,并替换为 nssa_externals.type_1 选项,此属性将在 2025-01-01 之后删除。 选项
|
|
重新分配 NSSA 外部 2 类路由 此选项已弃用,并替换为 nssa_externals.type_2 选项,此属性将在 2025-01-01 之后删除。 选项
|
|
重新分配的路由的指标 |
|
进程 ID |
|
路由映射参考 |
|
VPN 路由/转发实例 |
|
OSPFv3 |
|
重新分配匹配的路由 |
|
重新分配 OSPF 外部路由 此选项已弃用,并替换为 externals,此属性将在 2025-01-01 之后删除。 选项
|
|
重新分配 OSPF 外部路由 |
|
重新分配 OSPF 外部 1 类路由 选项
|
|
重新分配 OSPF 外部 1 类路由 选项
|
|
重新分配 OSPF 内部路由 选项
|
|
重新分配 OSPF 内部路由 此选项已弃用,并替换为 nssa_externals,此属性将在 2025-01-01 之后删除。 选项
|
|
重新分配 OSPF NSSA 外部路由 |
|
重新分配 NSSA 外部 1 类路由 选项
|
|
重新分配 NSSA 外部 2 类路由 选项
|
|
重新分配 NSSA 外部 1 类路由 此选项已弃用,并替换为 nssa_externals.type_1 选项,此属性将在 2025-01-01 之后删除。 选项
|
|
重新分配 NSSA 外部 2 类路由 此选项已弃用,并替换为 nssa_externals.type_2 选项,此属性将在 2025-01-01 之后删除。 选项
|
|
重新分配的路由的指标 |
|
进程 ID |
|
路由映射参考 |
|
路由信息协议 (RIP) |
|
重新分配的路由的指标 |
|
路由映射参考 |
|
设置顶级属性 选项
|
|
静态路由 |
|
OSI 静态路由的重新分配 选项
|
|
IP 静态路由的重新分配 选项
|
|
重新分配的路由的指标 |
|
路由映射参考 |
|
设置顶级属性 选项
|
|
指定源 VRF |
|
全局 VRF 选项
|
|
源 VRF 名称 |
|
地址族修饰符 选项
|
|
修改 snmp 参数 |
|
配置 SNMP 上下文 上下文名称 |
|
配置 SNMP v2c 团体字符串和访问权限 |
|
允许使用此团体字符串访问的标准 IP 访问列表 允许使用此团体字符串访问的扩展 IP 访问列表 访问列表名称 |
|
指定 IPv6 命名访问列表 IPv6 访问列表名称 |
|
使用此团体字符串进行只读访问 选项
|
|
使用此团体字符串进行读写访问 选项
|
|
SNMP 团体字符串 |
|
上下文名称 |
|
配置 SNMP v3 用户 |
|
指定与此组关联的访问列表 |
|
SNMP 团体字符串 |
|
指定 IPv6 命名访问列表 IPv6 访问列表名称 |
|
用户的身份验证参数 |
|
使用 HMAC MD5 算法进行身份验证 用户的身份验证密码 |
|
使用 HMAC SHA 算法进行身份验证 用户的身份验证密码 |
|
如果用户密码已配置并保存 选项
|
|
将密码指定为 MD5 或 SHA 摘要 选项
|
|
SNMP 团体字符串 |
|
用户的加密参数 |
|
使用 128 位 AES 算法进行加密 |
|
使用 192 位 3DES 算法进行加密 |
|
使用 256 位 DES 算法进行加密 |
|
使用 56 位 DES 算法进行加密 |
|
使用 56 位 DES 算法进行加密 |
|
将外部条目属性映射到路由表 |
|
选择性路由下载 选项
|
|
路由映射名称 |
|
指定 VPN 路由/转发实例的参数 |
|
自治系统号。 |
|
此选项仅与状态 *parsed* 一起使用。 此选项的值应是通过执行命令 **sh running-config | section ^router bgp** 从 IOS 设备收到的输出。 状态 *parsed* 从 |
|
配置应保留的状态 状态 *rendered*、*gathered* 和 *parsed* 不会对设备执行任何更改。 状态 *rendered* 会将 状态 *gathered* 将从设备中获取运行配置,并按照资源模块 argspec 的格式将其转换为结构化数据,该值将返回到结果中的 *gathered* 键中。 状态 *parsed* 从 选项
|
注释
注意
已在 CML 上针对 Cisco IOS-XE 版本 17.3 进行了测试。
此模块与连接
network_cli
一起使用。请参阅 https://docs.ansible.org.cn/ansible/latest/network/user_guide/platform_ios.html模块示例使用回调插件 (stdout_callback = yaml) 以 yaml 格式生成任务输出。
示例
# Using merged
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp nopeerup-delay cold-boot 20
- name: Merge provided configuration with device configuration
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
vrf: blue
aggregate_address:
- address: 192.0.2.1
netmask: 255.255.255.255
as_confed_set: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 1
reuse_route_val: 1
suppress_route_val: 1
max_suppress: 1
slow_peer:
- detection:
threshold: 150
neighbor:
- address: 198.51.100.1
aigp:
send:
cost_community:
id: 100
poi:
igp_cost: true
transitive: true
slow_peer:
- detection:
threshold: 150
remote_as: 10
route_map:
- name: test-route-out
out: true
- name: test-route-in
in: true
route_server_client: true
network:
- address: 198.51.110.10
mask: 255.255.255.255
backdoor: true
snmp:
context:
name: snmp_con
community:
snmp_community: community
ro: true
acl: 10
- afi: ipv4
safi: mdt
bgp:
dmzlink_bw: true
dampening:
penalty_half_time: 1
reuse_route_val: 10
suppress_route_val: 100
max_suppress: 5
soft_reconfig_backup: true
- afi: ipv4
safi: multicast
aggregate_address:
- address: 192.0.3.1
netmask: 255.255.255.255
as_confed_set: true
default_metric: 12
distance:
external: 10
internal: 10
local: 100
network:
- address: 198.51.111.11
mask: 255.255.255.255
route_map: test
table_map:
name: test_tableMap
filter: true
state: merged
# Task Output:
# ------------
#
# before: {}
# commands:
# - router bgp 65000
# - address-family ipv4 multicast vrf blue
# - bgp aggregate-timer 10
# - bgp dampening 1 1 1 1
# - bgp slow-peer detection threshold 150
# - snmp context snmp_con community community ro 10
# - neighbor 198.51.100.1 remote-as 10
# - neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# - neighbor 198.51.100.1 slow-peer detection threshold 150
# - network 198.51.110.10 mask 255.255.255.255 backdoor
# - aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv4 multicast
# - default-metric 12
# - distance bgp 10 10 100
# - table-map test_tableMap filter
# - network 198.51.111.11 mask 255.255.255.255 route-map test
# - aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# - address-family ipv4 mdt
# - bgp dmzlink-bw
# - bgp soft-reconfig-backup
# - bgp dampening 1 10 100 5
# after:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.3.1
# as_confed_set: true
# netmask: 255.255.255.255
# default_metric: 12
# distance:
# external: 10
# internal: 10
# local: 100
# networks:
# - address: 198.51.111.11
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# table_map:
# filter: true
# name: test_tableMap
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
# After state:
# ------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# table-map test_tableMap filter
# network 198.51.111.11 mask 255.255.255.255 route-map test
# aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# default-metric 12
# distance bgp 10 10 100
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
# Using replaced
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# table-map test_tableMap filter
# network 198.51.111.11 mask 255.255.255.255 route-map test
# aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# default-metric 12
# distance bgp 10 10 100
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
- name: Replaces device configuration of listed AF BGP with provided configuration
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
vrf: blue
aggregate_address:
- address: 192.0.2.1
netmask: 255.255.255.255
as_confed_set: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 1
reuse_route_val: 1
suppress_route_val: 1
max_suppress: 1
slow_peer:
- detection:
threshold: 150
neighbor:
- address: 198.51.110.1
activate: true
aigp:
send:
cost_community:
id: 200
poi:
igp_cost: true
transitive: true
slow_peer:
- detection:
threshold: 150
remote_as: 10
network:
- address: 198.51.110.10
mask: 255.255.255.255
backdoor: true
- afi: ipv4
safi: multicast
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 10
reuse_route_val: 10
suppress_route_val: 10
max_suppress: 10
slow_peer:
- detection:
threshold: 200
network:
- address: 192.0.2.1
mask: 255.255.255.255
route_map: test
state: replaced
# Task Output:
# ------------
# before:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.3.1
# as_confed_set: true
# netmask: 255.255.255.255
# default_metric: 12
# distance:
# external: 10
# internal: 10
# local: 100
# networks:
# - address: 198.51.111.11
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# table_map:
# filter: true
# name: test_tableMap
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
# commands:
# - router bgp 65000
# - address-family ipv4 multicast vrf blue
# - bgp aggregate-timer 10
# - bgp dampening 1 1 1 1
# - bgp slow-peer detection threshold 150
# - neighbor 198.51.110.1 remote-as 10
# - neighbor 198.51.110.1 activate
# - neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# - neighbor 198.51.110.1 slow-peer detection threshold 150
# - network 198.51.110.10 mask 255.255.255.255 backdoor
# - aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv4 multicast
# - no default-metric 12
# - no distance bgp 10 10 100
# - no table-map test_tableMap filter
# - bgp aggregate-timer 10
# - bgp dampening 10 10 10 10
# - bgp slow-peer detection threshold 200
# - network 192.0.2.1 mask 255.255.255.255 route-map test
# - no network 198.51.111.11 mask 255.255.255.255 route-map test
# - no aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# after:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# networks:
# - address: 192.0.2.1
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 192.0.2.1 mask 255.255.255.255 route-map test
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
# Using overridden
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 192.0.2.1 mask 255.255.255.255 route-map test
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
- name: Override device configuration of all AF BGP with provided configuration
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
vrf: blue
aggregate_address:
- address: 192.0.2.1
netmask: 255.255.255.255
as_confed_set: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 10
reuse_route_val: 10
suppress_route_val: 100
max_suppress: 50
slow_peer:
- detection:
threshold: 150
neighbor:
- address: 198.51.110.1
activate: true
log_neighbor_changes:
disable: true
maximum_prefix:
number: 1
threshold_value: 10
restart: 100
slow_peer:
- detection:
threshold: 150
remote_as: 100
version: 4
network:
- address: 198.51.110.10
mask: 255.255.255.255
backdoor: true
- afi: ipv6
safi: multicast
default_information: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 10
reuse_route_val: 10
suppress_route_val: 10
max_suppress: 10
slow_peer:
- detection:
threshold: 200
network:
- address: 2001:DB8:0:3::/64
route_map: test_ipv6
state: overridden
# Task Output:
# ------------
#
# before:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv4
# safi: multicast
# - afi: ipv4
# safi: mdt
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# commands:
# - router bgp 65000
# - address-family ipv4
# - no default-information originate
# - no bgp aggregate-timer 10
# - no bgp dampening 10 10 10 10
# - no bgp slow-peer detection threshold 200
# - no neighbor 198.51.100.1
# - no neighbor 198.51.110.1
# - no network 198.51.110.10 mask 255.255.255.255 backdoor
# - no aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv4 multicast vrf blue
# - bgp aggregate-timer 10
# - bgp dampening 10 10 100 50
# - bgp slow-peer detection threshold 150
# - neighbor 198.51.110.1 remote-as 100
# - neighbor 198.51.110.1 activate
# - neighbor 198.51.110.1 disable
# - neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# - neighbor 198.51.110.1 slow-peer detection threshold 150
# - neighbor 198.51.110.1 version 4
# - network 198.51.110.10 mask 255.255.255.255 backdoor
# - aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv6 multicast
# - default-information originate
# - bgp aggregate-timer 10
# - bgp dampening 10 10 10 10
# - bgp slow-peer detection threshold 200
# after:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv4
# safi: multicast
# - afi: ipv4
# safi: mdt
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# default-information originate
# exit-address-family
# !
# address-family ipv4 multicast
# exit-address-family
# !
# address-family ipv4 mdt
# exit-address-family
# !
# address-family ipv6 multicast
# exit-address-family
# Using deleted
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# default-information originate
# exit-address-family
# !
# address-family ipv4 multicast
# exit-address-family
# !
# address-family ipv4 mdt
# exit-address-family
# !
# address-family ipv6 multicast
# exit-address-family
- name: "Delete AF BGP (Note: This won't delete the all configured AF BGP)"
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
- afi: ipv4
safi: mdt
state: deleted
# Task Output:
# ------------
#
# before:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv4
# safi: multicast
# - afi: ipv4
# safi: mdt
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# commands:
# - router bgp 65000
# - no address-family ipv4 multicast
# - no address-family ipv4 mdt
# after:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# After state:
# -------------
#
# vios#sh running-config | section ^router bg
# hostname#show running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# default-information originate
# exit-address-family
# !
# address-family ipv6 multicast
# exit-address-family
# Using Deleted without any config passed (delete all)
# Before state:
# -------------
#
# vios#sh running-config | section ^router bg
# hostname#show running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# default-information originate
# exit-address-family
# !
# address-family ipv6 multicast
# exit-address-family
- name: "Delete ALL of configured AF BGP"
cisco.ios.ios_bgp_address_family:
state: deleted
# Task Output:
# ------------
#
# before:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# commands:
# - router bgp 65000
# - no address-family ipv4
# - no address-family ipv6 multicast
# after:
# address_family:
# - afi: ipv4
# bgp:
# aggregate_timer: 10
# as_number: '65000'
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# no neighbor 198.51.100.1 activate
# no neighbor 198.51.110.1 activate
# exit-address-family
# Using gathered
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# table-map test_tableMap filter
# network 198.51.111.11 mask 255.255.255.255 route-map test
# aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# default-metric 12
# distance bgp 10 10 100
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
- name: Gather listed AF BGP with provided configurations
cisco.ios.ios_bgp_address_family:
config:
state: gathered
# Task Output:
# ------------
#
# gathered:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.3.1
# as_confed_set: true
# netmask: 255.255.255.255
# default_metric: 12
# distance:
# external: 10
# internal: 10
# local: 100
# networks:
# - address: 198.51.111.11
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# table_map:
# filter: true
# name: test_tableMap
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
# Using rendered
- name: Rendered the provided configuration with the existing running configuration
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
vrf: blue
aggregate_address:
- address: 192.0.2.1
netmask: 255.255.255.255
as_confed_set: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 1
reuse_route_val: 1
suppress_route_val: 1
max_suppress: 1
slow_peer:
- detection:
threshold: 150
neighbor:
- address: 198.51.100.1
aigp:
send:
cost_community:
id: 100
poi:
igp_cost: true
transitive: true
slow_peer:
- detection:
threshold: 150
remote_as: 10
route_maps:
- name: test-route
out: true
route_server_client: true
network:
- address: 198.51.110.10
mask: 255.255.255.255
backdoor: true
snmp:
context:
name: snmp_con
community:
snmp_community: community
ro: true
acl: 10
- afi: ipv4
safi: mdt
bgp:
dmzlink_bw: true
dampening:
penalty_half_time: 1
reuse_route_val: 10
suppress_route_val: 100
max_suppress: 5
soft_reconfig_backup: true
state: rendered
# Task Output:
# ------------
#
# rendered:
# - router bgp 65000
# - address-family ipv4 multicast vrf blue
# - bgp aggregate-timer 10
# - bgp dampening 1 1 1 1
# - bgp slow-peer detection threshold 150
# - snmp context snmp_con community community ro 10
# - neighbor 198.51.100.1 remote-as 10
# - neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# - neighbor 198.51.100.1 slow-peer detection threshold 150
# - network 198.51.110.10 mask 255.255.255.255 backdoor
# - aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv4 mdt
# - bgp dmzlink-bw
# - bgp soft-reconfig-backup
# - bgp dampening 1 10 100 5
# Using parsed
# File: parsed.cfg
# ----------------
# router bgp 65000
# bgp log-neighbor-changes
# bgp nopeerup-delay cold-boot 20
# !
# address-family ipv4 multicast
# table-map test_tableMap filter
# network 1.1.1.1 mask 255.255.255.255 route-map test
# aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# default-metric 12
# distance bgp 10 10 100
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
# !
- name: Parse the commands for provided configuration
cisco.ios.ios_bgp_address_family:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task Output:
# ------------
#
# parsed:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.3.1
# as_confed_set: true
# netmask: 255.255.255.255
# default_metric: 12
# distance:
# external: 10
# internal: 10
# local: 100
# networks:
# - address: 198.51.111.11
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# table_map:
# filter: true
# name: test_tableMap
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
返回值
常见的返回值记录在这里,以下是此模块特有的字段
键 |
描述 |
---|---|
模块执行后的最终配置。 返回:发生更改时 示例: |
|
模块执行之前的配置。 返回: 当 state 为 示例: |
|
推送到远程设备的命令集。 返回: 当 state 为 示例: |
|
从远程设备收集的关于网络资源的结构化数据事实。 返回: 当 state 为 示例: |
|
根据模块参数规范,将 running_config 选项中提供的设备原生配置解析为结构化数据。 返回: 当 state 为 示例: |
|
任务中提供的配置以设备原生格式呈现(离线)。 返回: 当 state 为 示例: |