Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Set BFD neighbor and per-link in port-chann…
Browse files Browse the repository at this point in the history
…el interfaces (#3509)
  • Loading branch information
Shivani-gslab authored Jan 24, 2024
1 parent f903099 commit e18dab6
Show file tree
Hide file tree
Showing 15 changed files with 140 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ interface Port-Channel9
ip address 10.9.2.3/31
bfd interval 500 min-rx 500 multiplier 5
bfd echo
bfd neighbor 10.1.2.4
bfd per-link rfc-7130
!
interface Port-Channel10
description SRV01_bond0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ interface Management1
router bfd
interval 900 min-rx 900 multiplier 50 default
multihop interval 300 min-rx 300 multiplier 3
local-address 192.168.255.1
session stats snapshot interval 51
!
sbfd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ interface Port-Channel9
ip address 10.9.2.3/31
bfd interval 500 min-rx 500 multiplier 5
bfd echo
bfd neighbor 10.1.2.4
bfd per-link rfc-7130
!
interface Port-Channel10
description SRV01_bond0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface Management1
router bfd
interval 900 min-rx 900 multiplier 50 default
multihop interval 300 min-rx 300 multiplier 3
local-address 192.168.255.1
session stats snapshot interval 51
!
sbfd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ port_channel_interfaces:
interval: 500
min_rx: 500
multiplier: 5
neighbor: 10.1.2.4
per_link:
enabled: true
rfc_7130: true
spanning_tree_guard: root

- name: Port-Channel20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

router_bfd:
interval: 900
local_address: 192.168.255.1
min_rx: 900
multiplier: 50
multihop:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interval</samp>](## "port_channel_interfaces.[].bfd.interval") | Integer | | | | Interval in milliseconds |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min_rx</samp>](## "port_channel_interfaces.[].bfd.min_rx") | Integer | | | | Rate in milliseconds |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multiplier</samp>](## "port_channel_interfaces.[].bfd.multiplier") | Integer | | | Min: 3<br>Max: 50 | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;neighbor</samp>](## "port_channel_interfaces.[].bfd.neighbor") | String | | | | IPv4 or IPv6 address. When the Port-channel is a L2 interface, a local L3 BFD address (router_bfd.local_address) has to be defined globally on the switch. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;per_link</samp>](## "port_channel_interfaces.[].bfd.per_link") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled</samp>](## "port_channel_interfaces.[].bfd.per_link.enabled") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rfc_7130</samp>](## "port_channel_interfaces.[].bfd.per_link.rfc_7130") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;service_policy</samp>](## "port_channel_interfaces.[].service_policy") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pbr</samp>](## "port_channel_interfaces.[].service_policy.pbr") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;input</samp>](## "port_channel_interfaces.[].service_policy.pbr.input") | String | | | | Policy Based Routing Policy-map name |
Expand Down Expand Up @@ -331,6 +335,12 @@
# Rate in milliseconds
min_rx: <int>
multiplier: <int; 3-50>

# IPv4 or IPv6 address. When the Port-channel is a L2 interface, a local L3 BFD address (router_bfd.local_address) has to be defined globally on the switch.
neighbor: <str>
per_link:
enabled: <bool>
rfc_7130: <bool>
service_policy:
pbr:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
| -------- | ---- | -------- | ------- | ------------------ | ----------- |
| [<samp>router_bfd</samp>](## "router_bfd") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;interval</samp>](## "router_bfd.interval") | Integer | | | | Rate in milliseconds |
| [<samp>&nbsp;&nbsp;local_address</samp>](## "router_bfd.local_address") | String | | | | Configure BFD local IP/IPv6 address |
| [<samp>&nbsp;&nbsp;min_rx</samp>](## "router_bfd.min_rx") | Integer | | | | Rate in milliseconds |
| [<samp>&nbsp;&nbsp;multiplier</samp>](## "router_bfd.multiplier") | Integer | | | Min: 3<br>Max: 50 | |
| [<samp>&nbsp;&nbsp;multihop</samp>](## "router_bfd.multihop") | Dictionary | | | | |
Expand Down Expand Up @@ -38,6 +39,9 @@
# Rate in milliseconds
interval: <int>

# Configure BFD local IP/IPv6 address
local_address: <str>

# Rate in milliseconds
min_rx: <int>
multiplier: <int; 3-50>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ keys:
- str
min: 3
max: 50
neighbor:
type: str
description: IPv4 or IPv6 address. When the Port-channel is a L2 interface, a local L3 BFD address (router_bfd.local_address) has to be defined globally on the switch.
per_link:
type: dict
keys:
enabled:
type: bool
rfc_7130:
type: bool
service_policy:
type: dict
keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ keys:
interval:
type: int
description: Rate in milliseconds
local_address:
type: str
description: Configure BFD local IP/IPv6 address
min_rx:
type: int
description: Rate in milliseconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,16 @@ interface {{ port_channel_interface.name }}
{% elif port_channel_interface.bfd.echo is arista.avd.defined(false) %}
no bfd echo
{% endif %}
{% if port_channel_interface.bfd.neighbor is arista.avd.defined %}
bfd neighbor {{ port_channel_interface.bfd.neighbor }}
{% endif %}
{% if port_channel_interface.bfd.per_link.enabled is arista.avd.defined(true) %}
{% if port_channel_interface.bfd.per_link.rfc_7130 is arista.avd.defined(true) %}
bfd per-link rfc-7130
{% else %}
bfd per-link
{% endif %}
{% endif %}
{% for link_tracking_group in port_channel_interface.link_tracking_groups | arista.avd.natural_sort('name') %}
{% if link_tracking_group.name is arista.avd.defined and link_tracking_group.direction is arista.avd.defined %}
link tracking group {{ link_tracking_group.name }} {{ link_tracking_group.direction }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ router bfd
{% if router_bfd.multihop.interval is arista.avd.defined and router_bfd.multihop.min_rx is arista.avd.defined and router_bfd.multihop.multiplier is arista.avd.defined %}
multihop interval {{ router_bfd.multihop.interval }} min-rx {{ router_bfd.multihop.min_rx }} multiplier {{ router_bfd.multihop.multiplier }}
{% endif %}
{% if router_bfd.local_address is arista.avd.defined %}
local-address {{ router_bfd.local_address }}
{% endif %}
{% if router_bfd.session_snapshot_interval is arista.avd.defined and router_bfd.session_snapshot_interval < 10 and router_bfd.session_snapshot_interval_dangerous is arista.avd.defined(true, fail_action="error", var_name="router_bfd.session_snapshot_interval_dangerous") %}
session stats snapshot interval dangerous {{ router_bfd.session_snapshot_interval }}
{% elif router_bfd.session_snapshot_interval is arista.avd.defined %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e18dab6

Please sign in to comment.