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

Feat(eos_designs): l3_edge with rfc5549 underlay and next-hop address-family ipv6 #4491

Draft
wants to merge 24 commits into
base: devel
Choose a base branch
from

Conversation

nathanmusser
Copy link
Contributor

@nathanmusser nathanmusser commented Sep 18, 2024

Change Summary

When routing_protocol is set to ebgp and the underlay is set to rfc5549 we now override the next-hop address-family ipv6 directive the neighbor inherits from the underlay peer-group.

Related Issue(s)

Partially fixes #4379

Component(s) name

arista.avd.eos_designs

Proposed changes

Override the next-hop address-family ipv6 directive the neighbor inherits from the underlay peer-group.

How to test

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

Copy link

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4491
# Activate the virtual environment
source test-avd-pr-4491/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/nathanmusser/avd.git@issue4379_p2p_links#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/nathanmusser/avd.git#/ansible_collections/arista/avd/,issue4379_p2p_links --force
# Optional: Install AVD examples
cd test-avd-pr-4491
ansible-playbook arista.avd.install_examples

Copy link
Contributor

@ClausHolbechArista ClausHolbechArista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the description for the routing_protocol key in the schema fragment to explain the new behavior.

@ClausHolbechArista
Copy link
Contributor

Also please add a test in molecule for this scenario. It should be enough to add another interface to one of the existing tests. I suggest ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/l3_edge_bgp.yml. To update the outputs (and verify that is is doing what you expect) run

cd ansible_collections/arista/avd
molecule converge -s eos_designs_unit_tests -- --limit l3_edge_bgp

@carlbuchmann carlbuchmann marked this pull request as draft September 30, 2024 20:19
@github-actions github-actions bot added state: Documentation role Updated role: eos_designs issue related to eos_designs role state: CI Updated CI scenario have been updated in the PR labels Oct 1, 2024
@nathanmusser nathanmusser marked this pull request as ready for review October 3, 2024 14:10
@nathanmusser nathanmusser marked this pull request as draft October 8, 2024 14:25
@github-actions github-actions bot added the role: eos_cli_config_gen issue related to eos_cli_config_gen role label Oct 9, 2024
@nathanmusser
Copy link
Contributor Author

Started a refactor of this after a discussion with @ClausHolbechArista . New iteration is such that when the underlay is set to RFC5549 and routing_protocol is set to ebgp we explicitly override the next-hop ipv6 command for that specific neighbor (since it's part of the underlay peer-group that gets it due to enabling RFC5549).

eos_cli_config_gen had the next-hop ipv6 knob for peer groups in router_bgp.address_family_ipv4 and for neighbors in the router_bgp.vrfs[].address_family_ipv4 path but did not have it exposed for neighbors for the default vrf router_bgp.address_family_ipv4. Since that's what we needed that key(s) had to be added.

I haven't done extensive testing of the latest commit yet, just verified it did what I wanted against a prod fabric. Need to finish testing the various edge cases and make sure it's implemented correctly. Need to update molecule, probably need to flesh out the documentation to correctly describe the eos_cli_config_gen keys as well as the behavior in eos_designs.

Ultimately I still want to explore having the ability to override the peer group for l3_edge neighbors, but not sure I want to tackle that here.

@ClausHolbechArista
Copy link
Contributor

Thanks Nathan

Ultimately I still want to explore having the ability to override the peer group for l3_edge neighbors, but not sure I want to tackle that here.

We would not want that capability in the l3_edge model. If you need custom peers and peer-groups, you should use the models under tenants to do it. There you can build interfaces, peers and peer-groups. With AVD 5.0 it also works well for VRF default.

@nathanmusser
Copy link
Contributor Author

We would not want that capability in the l3_edge model. If you need custom peers and peer-groups, you should use the models under tenants to do it. There you can build interfaces, peers and peer-groups. With AVD 5.0 it also works well for VRF default.

Respectfully I disagree here. I started to type a novel justifying my thoughts, but I figure we can revisit after 5.0. I did successfully prototype custom peer_groups yesterday after my initial comment. I'm sure I haven't considered all the implications but it wasn't as difficult as I imagined.

In the meantime I'll keep this PR focused on the above solution, I'll update the title and description today to better reflect the new focus.

@github-actions github-actions bot added the state: conflict PR with conflict label Oct 10, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the state: CI Updated CI scenario have been updated in the PR label Oct 10, 2024
@github-actions github-actions bot added type: documentation Improvements or additions to documentation state: CI Updated CI scenario have been updated in the PR labels Oct 16, 2024
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot removed state: conflict PR with conflict type: documentation Improvements or additions to documentation labels Oct 16, 2024
@nathanmusser nathanmusser changed the title Feat(eos_designs): Exclude l3_edge neighbors from peer_group Feat(eos_designs): l3_edge with rfc5549 underlay and next-hop address-family ipv6 Oct 16, 2024
Copy link

sonarcloud bot commented Oct 16, 2024

@nathanmusser nathanmusser marked this pull request as ready for review October 16, 2024 04:10
@nathanmusser
Copy link
Contributor Author

nathanmusser commented Oct 16, 2024

Added a new molecule test l3_edge_rfc5549 to validate the various interactions between rfc5549 and l3_edge. Though this edge case was present in some of the existing molecule tests so some of those artifacts have been updated to reflect this.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the state: conflict PR with conflict label Oct 16, 2024
Comment on lines +38 to +39
include_in_underlay_protocol: false
routing_protocol: ebgp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we are rendering BGP for this neighbor

@@ -250,6 +250,7 @@ router bgp 65104
no neighbor EVPN-OVERLAY-PEERS activate
neighbor UNDERLAY_PEERS activate
neighbor UNDERLAY_PEERS next-hop address-family ipv6 originate
no neighbor 10.23.23.2 next-hop address-family ipv6
Copy link
Contributor

@ClausHolbechArista ClausHolbechArista Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kornoa you implemented this 9 months ago. If we implement this change, we will no add this extra line, but as I see it, the config would actually be more correct with this change. Do you have a running network using the rfc5549 + the ebgp knob under l3_edge without ipv6_enable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, the customer's project had finished. I don't have access to this implementation anymore.
I think this line is redundant. An IPv4-based neighbor session with an IPv4 address-family defaults to a IPv4 next-hop within the NLRI. But anyway, it doesn't harm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An IPv4-based neighbor session with an IPv4 address-family defaults to a IPv4 next-hop within the NLRI.

This is true, but if the neighbor is is a member of the UNDERLAY_PEERS group (which l3_edge does) then line 252 forces the advertisements to advertise with ipv6 next-hops instead. Or at least this was my experience in my testing. Hence the need for the suggested 253.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy. :-)

@@ -251,6 +251,7 @@ router bgp 65105
no neighbor EVPN-OVERLAY-PEERS activate
neighbor UNDERLAY_PEERS activate
neighbor UNDERLAY_PEERS next-hop address-family ipv6 originate
no neighbor 10.23.23.6 next-hop address-family ipv6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nathanmusser I think we need to keep this neighbor with the next-hop, since we have ipv6_enable. Now I understand why you asked about this a long time ago :-/

Comment on lines +1170 to +1180
{% if neighbor.next_hop.address_family_ipv6.enabled is arista.avd.defined %}
{% if neighbor.next_hop.address_family_ipv6.enabled is arista.avd.defined(true) %}
{% set ipv6_originate_cli = "neighbor " ~ neighbor.ip_address ~ " next-hop address-family ipv6" %}
{% if neighbor.next_hop.address_family_ipv6.originate is arista.avd.defined(true) %}
{% set ipv6_originate_cli = ipv6_originate_cli ~ " originate" %}
{% endif %}
{% elif neighbor.next_hop.address_family_ipv6.enabled is arista.avd.defined(false) %}
{% set ipv6_originate_cli = "no neighbor " ~ neighbor.ip_address ~ " next-hop address-family ipv6" %}
{% endif %}
{{ ipv6_originate_cli }}
{% endif %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% if neighbor.next_hop.address_family_ipv6.enabled is arista.avd.defined %}
{% if neighbor.next_hop.address_family_ipv6.enabled is arista.avd.defined(true) %}
{% set ipv6_originate_cli = "neighbor " ~ neighbor.ip_address ~ " next-hop address-family ipv6" %}
{% if neighbor.next_hop.address_family_ipv6.originate is arista.avd.defined(true) %}
{% set ipv6_originate_cli = ipv6_originate_cli ~ " originate" %}
{% endif %}
{% elif neighbor.next_hop.address_family_ipv6.enabled is arista.avd.defined(false) %}
{% set ipv6_originate_cli = "no neighbor " ~ neighbor.ip_address ~ " next-hop address-family ipv6" %}
{% endif %}
{{ ipv6_originate_cli }}
{% endif %}
{% if neighbor.next_hop.address_family_ipv6.enabled is arista.avd.defined(true) %}
{% set ipv6_originate_cli = "neighbor " ~ neighbor.ip_address ~ " next-hop address-family ipv6" %}
{% if neighbor.next_hop.address_family_ipv6.originate is arista.avd.defined(true) %}
{% set ipv6_originate_cli = ipv6_originate_cli ~ " originate" %}
{% endif %}
{{ ipv6_originate_cli }}
{% elif neighbor.next_hop.address_family_ipv6.enabled is arista.avd.defined(false) %}
{% set ipv6_originate_cli = "no neighbor " ~ neighbor.ip_address ~ " next-hop address-family ipv6" %}
{{ ipv6_originate_cli }}
{% endif %}

@ClausHolbechArista
Copy link
Contributor

Moving to draft until comments have been addressed.

@ClausHolbechArista ClausHolbechArista marked this pull request as draft November 11, 2024 08:12
@nathanmusser
Copy link
Contributor Author

I will likely not have the cycles for this until mid/late December or January. I plan to complete at that time but just adding that for transparency here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_cli_config_gen issue related to eos_cli_config_gen role role: eos_designs issue related to eos_designs role state: CI Updated CI scenario have been updated in the PR state: conflict PR with conflict state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat(eos_designs): Support for IPv4 p2p_links in an RFC5549 Fabric
9 participants