Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlay Controller bugfixes and underlay BFD #630

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,8 @@ overlay_controller_p2p_network_summary: < IPv4_network/Mask >
# Assign range larger then:
# [ total overlay_controllers ]
overlay_controller_loopback_network_summary: < IPv4_network/Mask >
# Enable BFD for p2p BGP sessions - useful if the overlay_controller is a VM | Optional
overlay_controller_p2p_bfd: < true | false | default -> false >
# additional lines for overlay-controller BGP config
overlay_controller_bgp_defaults:
- no bgp default ipv4-unicast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,47 @@
{% set switch.spanning_tree_mode = "none" %}
{% for node in overlay_controller.nodes | arista.avd.natural_sort %}
{% if node == inventory_hostname %}
{% set switch.id = overlay_controller.nodes[node].id %}
{% if overlay_controller.nodes[node].bgp_as is defined %}
{% set switch.bgp_as = overlay_controller.nodes[node].bgp_as %}
{% set switch.id = overlay_controller.nodes[ node ].id %}
{% if overlay_controller.nodes[ node ].bgp_as is defined %}
{% set switch.bgp_as = overlay_controller.nodes[ node ].bgp_as %}
{% else %}
{% set switch.bgp_as = overlay_controller.defaults.bgp_as %}
{% endif %}
{# Get local RR/RS interface to configure #}
{% if overlay_controller.nodes[node].uplink_to_remote_switches is defined %}
{% set switch.uplink_to_remote_switches = overlay_controller.nodes[node].uplink_to_remote_switches %}
{% if overlay_controller.nodes[ node ].uplink_to_remote_switches is defined %}
{% set switch.uplink_to_remote_switches = overlay_controller.nodes[ node ].uplink_to_remote_switches %}
{% else %}
{% set switch.uplink_to_remote_switches = overlay_controller.defaults.uplink_to_remote_switches %}
{% endif %}
{# Get remote switch interface to configure #}
{% if overlay_controller.nodes[node].remote_switches_interfaces is defined %}
{% set switch.remote_switches_interfaces = overlay_controller.nodes[node].remote_switches_interfaces %}
{% if overlay_controller.nodes[ node ].remote_switches_interfaces is defined %}
{% set switch.remote_switches_interfaces = overlay_controller.nodes[ node ].remote_switches_interfaces %}
{% endif %}
{# Get remote hostname #}
{% if overlay_controller.nodes[node].remote_switches is defined %}
{% set switch.remote_switches = overlay_controller.nodes[node].remote_switches %}
{% if overlay_controller.nodes[ node ].remote_switches is defined %}
{% set switch.remote_switches = overlay_controller.nodes[ node ].remote_switches %}
{% else %}
{% set switch.remote_switches = overlay_controller.defaults.remote_switches %}
{% endif %}
{# Get group of remote devices where RS/RR are connected #}
{% if overlay_controller.nodes[node].remote_switches_group is defined %}
{% set switch.remote_switches_group = overlay_controller.nodes[node].remote_switches_group %}
{% else %}
{% set switch.remote_switches_group = overlay_controller.defaults.remote_switches_group %}
{% endif %}
{# Get ASN of remote devices where RS/RR are connected #}
{% set switch.remote_switches_asn = [] %}
{% for remote_switch in switch.remote_switches %}
{% set remote_switch_vars = hostvars[ remote_switch ] %}
{% if remote_switch_vars.type == 'l3leaf' %}
{% for l3leaf_node_group in remote_switch_vars.l3leaf.node_groups | arista.avd.natural_sort %}
{% if remote_switch in remote_switch_vars.l3leaf.node_groups[ l3leaf_node_group ].nodes | arista.avd.natural_sort %}
{% do switch.remote_switches_asn.append( remote_switch_vars.l3leaf.node_groups[ l3leaf_node_group ].bgp_as | arista.avd.default ( remote_switch_vars.l3leaf.defaults.bgp_as ) ) %}
{% break %}
{% endif %}
{% endfor %}
{% elif remote_switch_vars.type == 'spine' %}
{% do switch.remote_switches_asn.append( remote_switch_vars.spine.bgp_as ) %}
{% elif remote_switch_vars.type == 'super-spine' %}
{% do switch.remote_switches_asn.append( remote_switch_vars.super_spine.bgp_as ) %}
{% elif remote_switch_vars.type == 'overlay-controller' %}
{% do switch.remote_switches_asn.append( remote_switch_vars.overlay_controller.nodes[ some_switch ].bgp_as | arista.avd.default ( remote_switch_vars.overlay_controller.defaults.bgp_as ) ) %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{# Build variables for fabric protocols #}
Expand Down Expand Up @@ -88,7 +101,7 @@
{% for l3leaf_node_group in some_switch_vars.l3leaf.node_groups | arista.avd.natural_sort %}
{% for node in some_switch_vars.l3leaf.node_groups[l3leaf_node_group].nodes | arista.avd.natural_sort %}
{% if node == some_switch %}
{% set peer.id = some_switch_vars.l3leaf.node_groups[l3leaf_node_group].nodes[node].id %}
{% set peer.id = some_switch_vars.l3leaf.node_groups[l3leaf_node_group].nodes[ node ].id %}
{% if some_switch_vars.l3leaf.node_groups[l3leaf_node_group].bgp_as is defined %}
{% set peer.bgp_as = some_switch_vars.l3leaf.node_groups[l3leaf_node_group].bgp_as %}
{% else %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
{# EBGP #}
{## Underlay network peering #}
{% if switch.underlay_routing_protocol == "ebgp" %}

{% for uplink_to_remote_switches in switch.uplink_to_remote_switches %}
{{ overlay_controller_p2p_network_summary | ipaddr('network') | ipmath(((switch.id -1) * 2 * overlay_controller.nodes | length * max_overlay_controller_to_switch_links ) + loop.index0 * 2) }}:
peer_group: IPv4-UNDERLAY-PEERS
description: {{ switch.remote_switches[loop.index0] }}
remote_as: {{ switch.remote_switches_asn[loop.index0] }}
{% if overlay_controller_p2p_bfd is arista.avd.defined(true) %}
bfd: true
{% endif %}
{% endfor %}
{% endif %}
{# Overlay network peerings based on evpn_overlay_controller variable #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
peer_group: IPv4-UNDERLAY-PEERS
description: {{ overlay_controller_node }}
remote_as: {{ overlay_controller.nodes[overlay_controller_node].bgp_as | arista.avd.default( overlay_controller.defaults.bgp_as ) }}
{% if overlay_controller_p2p_bfd is arista.avd.defined(true) %}
bfd: true
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
Expand Down