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_cli_config_gen): Support STUN #3147

Merged
merged 27 commits into from
Sep 30, 2023
Merged

Conversation

burnyd
Copy link
Contributor

@burnyd burnyd commented Sep 18, 2023

Change Summary

Add new CLI for STUN for eos devices.

It is possible and likely that many of the edge devices will be behind NAT devices. In order for a full mesh of connectivity to be created we need a method of determining the public IP / mapped port of each device. STUN serves this purpose. Each edge will initiate a stun request to the configured STUN server. The STUN server will then record the IP / Port mappings and import that information into BGP 1/79 to be shared with other devices in the network.

Component(s) name

arista.avd.eos_cli_gen

Proposed changes

Add stun for both client and server to eos cli gen

stun:
  server: 
    local_interface: ethernet1 
  client:
    - server_profile: server1 
      ip_address: 1.2.3.4
    - server_profile: server2
      ip_address: 2.3.4.5

Needed to separate both client and device since there are different possible cli knobs under each. It would render like the following..

stun
  server
    local-interface ethernet1
    client
        server_profile server1
         ip address 1.2.3.4
        !
         server_profile server2
         ip address 2.3.4.5

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.

@burnyd burnyd requested review from a team as code owners September 18, 2023 16:08
@github-actions github-actions bot added the role: eos_cli_config_gen issue related to eos_cli_config_gen role label Sep 18, 2023
@burnyd burnyd changed the title Add STUN to eos_cli_gen Feat(eos_cli_config_gen): Support STUN Sep 18, 2023
Copy link
Contributor

@gmuloc gmuloc left a comment

Choose a reason for hiding this comment

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

Fixed the arista.avd.defined filters in templates for you. You would now need to add some test under the eos_cli_config_gen molecule scenario

burnyd and others added 2 commits September 19, 2023 08:35
…tes/documentation/stun.j2

Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label Sep 19, 2023
burnyd and others added 4 commits September 20, 2023 08:05
…entory/host_vars/stun.yml

Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
…tes/documentation/stun.j2

Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
…tes/eos/stun.j2

Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
burnyd and others added 4 commits September 22, 2023 07:34
…tes/documentation/stun.j2

Co-authored-by: Claus Holbech <holbech@arista.com>
…tes/documentation/stun.j2

Co-authored-by: Claus Holbech <holbech@arista.com>
…tes/documentation/stun.j2

Co-authored-by: Claus Holbech <holbech@arista.com>
@gmuloc
Copy link
Contributor

gmuloc commented Sep 25, 2023

servers are sorted alphabetically:
Before

leaf1#show run | se stun
stun
   client
      refresh interval 42 seconds
      !
      server-profile TEST
         ip address 42.42.42.42
      !
      server-profile TEST2
         ip address 66.66.66.66
   !
   server
      local-interface Ethernet42

Add ing the server-profile BLAH

leaf1(config-stun-client)#server-profile BLAH
leaf1(config-stun-server-profile)#show run | se stun
stun
   client
      refresh interval 42 seconds
      !
      server-profile BLAH
      !
      server-profile TEST
         ip address 42.42.42.42
      !
      server-profile TEST2
         ip address 66.66.66.66
   !
   server
      local-interface Ethernet42

Co-authored-by: Claus Holbech <holbech@arista.com>
@ClausHolbechArista ClausHolbechArista added this to the v4.4.0 milestone Sep 27, 2023
@carlbuchmann carlbuchmann merged commit e428e0a into aristanetworks:devel Sep 30, 2023
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants