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

nhrp: T2326: NHRP migration to FRR #4217

Open
wants to merge 1 commit into
base: current
Choose a base branch
from

Conversation

aapostoliuk
Copy link
Contributor

NHRP migration to FRR

Change Summary

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe): migration to another package

Related Task(s)

https://vyos.dev/T2326

Related PR(s)

Component(s) name

nhrp

Proposed changes

Replaced the old package opnnhrp with FRR nhrpd.
Advantages:

  1. opennhrp project is not supported now.
  2. It fixes compatibility between NHRP and IPSec. FRR manages an IPSec VPN connection.
  3. It will allow the use of IPv6 over DMVPN in the future.

Restrictions:

  1. The tunnel interface subnet mask must be /32

Changes:
Configuration mode:
All commands were remade according to FRR.

vyos@vyos# set protocols nhrp tunnel tun100
Possible completions:
   authentication       NHRP authentication
   holdtime             Holding time in seconds
 > map                  Map tunnel IP to NBMA
   mtu                  Maximum Transmission Unit (MTU)
+  multicast            Map multicast to NBMA
   network-id           NHRP network id
 > nhs                  Map tunnel IP to NBMA of Next Hop Server
   redirect             Enable sending of Cisco style NHRP Traffic Indication packets
   registration-no-unique
                        Zone to be local-zone
   shortcut             Enable creation of shortcut routes. A received NHRP Traffic
                        Indication will trigger the resolution and establishment of a
                        shortcut route

Operational mode:
All commands were remade according to FRR.

vyos@vyos:~$ show ip nhrp
Possible completions:
  cache                 Show NHRP interface connection information
  nhs                   Show NHRP tunnel connection information
  shortcut

vyos@vyos:~$ reset ip nhrp
Possible completions:
  cache                 Clear Dynamic cache entries
  shortcut              Clear Shortcut entries

How to test

Smoketest result

vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_protocols_nhrp.py
test_01_nhrp_config (__main__.TestProtocolsNHRP.test_01_nhrp_config) ... ok

----------------------------------------------------------------------
Ran 1 test in 9.307s

OK
vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_vpn_ipsec.py
test_dhcp_fail_handling (__main__.TestVPNIPsec.test_dhcp_fail_handling) ... ok
test_dmvpn (__main__.TestVPNIPsec.test_dmvpn) ... ok
test_flex_vpn_vips (__main__.TestVPNIPsec.test_flex_vpn_vips) ... ok
test_remote_access (__main__.TestVPNIPsec.test_remote_access) ... ok
test_remote_access_dhcp_fail_handling (__main__.TestVPNIPsec.test_remote_access_dhcp_fail_handling) ... ok
test_remote_access_eap_tls (__main__.TestVPNIPsec.test_remote_access_eap_tls) ... ok
test_remote_access_no_rekey (__main__.TestVPNIPsec.test_remote_access_no_rekey) ... ok
test_remote_access_pool_range (__main__.TestVPNIPsec.test_remote_access_pool_range) ... ok
test_remote_access_vti (__main__.TestVPNIPsec.test_remote_access_vti) ... ok
test_remote_access_x509 (__main__.TestVPNIPsec.test_remote_access_x509) ... ok
test_site_to_site (__main__.TestVPNIPsec.test_site_to_site) ... ok
test_site_to_site_vti (__main__.TestVPNIPsec.test_site_to_site_vti) ... ok
test_site_to_site_x509 (__main__.TestVPNIPsec.test_site_to_site_x509) ... ok

----------------------------------------------------------------------
Ran 13 tests in 88.830s

OK
vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_interfaces_tunnel.py
test_add_multiple_ip_addresses (__main__.TunnelInterfaceTest.test_add_multiple_ip_addresses) ... ok
test_add_single_ip_address (__main__.TunnelInterfaceTest.test_add_single_ip_address) ... ok
test_add_to_invalid_vrf (__main__.TunnelInterfaceTest.test_add_to_invalid_vrf) ... ok
test_dhcp_client_options (__main__.TunnelInterfaceTest.test_dhcp_client_options) ... skipped 'not supported'
test_dhcp_disable_interface (__main__.TunnelInterfaceTest.test_dhcp_disable_interface) ... skipped 'not supported'
test_dhcp_vrf (__main__.TunnelInterfaceTest.test_dhcp_vrf) ... skipped 'not supported'
test_dhcpv6_client_options (__main__.TunnelInterfaceTest.test_dhcpv6_client_options) ... skipped 'not supported'
test_dhcpv6_vrf (__main__.TunnelInterfaceTest.test_dhcpv6_vrf) ... skipped 'not supported'
test_dhcpv6pd_auto_sla_id (__main__.TunnelInterfaceTest.test_dhcpv6pd_auto_sla_id) ... skipped 'not supported'
test_dhcpv6pd_manual_sla_id (__main__.TunnelInterfaceTest.test_dhcpv6pd_manual_sla_id) ... skipped 'not supported'
test_eapol (__main__.TunnelInterfaceTest.test_eapol) ... skipped 'not supported'
test_erspan_v1 (__main__.TunnelInterfaceTest.test_erspan_v1) ... ok
test_gretap_parameters_change (__main__.TunnelInterfaceTest.test_gretap_parameters_change) ... ok
test_interface_description (__main__.TunnelInterfaceTest.test_interface_description) ... ok
test_interface_disable (__main__.TunnelInterfaceTest.test_interface_disable) ... ok
test_interface_ip_options (__main__.TunnelInterfaceTest.test_interface_ip_options) ... ok
test_interface_ipv6_options (__main__.TunnelInterfaceTest.test_interface_ipv6_options) ... ok
test_interface_mtu (__main__.TunnelInterfaceTest.test_interface_mtu) ... ok
test_ip6erspan_v2 (__main__.TunnelInterfaceTest.test_ip6erspan_v2) ... ok
test_ipv4_encapsulations (__main__.TunnelInterfaceTest.test_ipv4_encapsulations) ... ok
test_ipv6_encapsulations (__main__.TunnelInterfaceTest.test_ipv6_encapsulations) ... ok
test_ipv6_link_local_address (__main__.TunnelInterfaceTest.test_ipv6_link_local_address) ... ok
test_move_interface_between_vrf_instances (__main__.TunnelInterfaceTest.test_move_interface_between_vrf_instances) ... ok
test_mtu_1200_no_ipv6_interface (__main__.TunnelInterfaceTest.test_mtu_1200_no_ipv6_interface) ... ok
test_multiple_gre_tunnel_different_remote (__main__.TunnelInterfaceTest.test_multiple_gre_tunnel_different_remote) ... ok
test_multiple_gre_tunnel_same_remote (__main__.TunnelInterfaceTest.test_multiple_gre_tunnel_same_remote) ... ok
test_span_mirror (__main__.TunnelInterfaceTest.test_span_mirror) ... skipped 'not supported'
test_tunnel_invalid_source_interface (__main__.TunnelInterfaceTest.test_tunnel_invalid_source_interface) ... ok
test_tunnel_parameters_gre (__main__.TunnelInterfaceTest.test_tunnel_parameters_gre) ... ok
test_tunnel_src_any_gre_key (__main__.TunnelInterfaceTest.test_tunnel_src_any_gre_key) ... ok
test_vif_8021q_interfaces (__main__.TunnelInterfaceTest.test_vif_8021q_interfaces) ... skipped 'not supported'
test_vif_8021q_lower_up_down (__main__.TunnelInterfaceTest.test_vif_8021q_lower_up_down) ... skipped 'not supported'
test_vif_8021q_mtu_limits (__main__.TunnelInterfaceTest.test_vif_8021q_mtu_limits) ... skipped 'not supported'
test_vif_8021q_qos_change (__main__.TunnelInterfaceTest.test_vif_8021q_qos_change) ... skipped 'not supported'
test_vif_s_8021ad_vlan_interfaces (__main__.TunnelInterfaceTest.test_vif_s_8021ad_vlan_interfaces) ... skipped 'not supported'
test_vif_s_protocol_change (__main__.TunnelInterfaceTest.test_vif_s_protocol_change) ... skipped 'not supported'

----------------------------------------------------------------------
Ran 36 tests in 139.949s

OK (skipped=15)

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link

github-actions bot commented Dec 3, 2024

👍
No issues in PR Title / Commit Title

Copy link

github-actions bot commented Dec 3, 2024

✅ No issues found in unused-imports check.. Please refer the workflow run

Copy link

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

Copy link

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

@aapostoliuk aapostoliuk force-pushed the T2326-circinus branch 2 times, most recently from 82c7537 to 58f3339 Compare January 6, 2025 15:18
@aapostoliuk aapostoliuk marked this pull request as ready for review January 6, 2025 15:24
@aapostoliuk aapostoliuk force-pushed the T2326-circinus branch 4 times, most recently from 204e822 to 8a80ad9 Compare January 9, 2025 13:40
Copy link
Member

@sarthurdev sarthurdev left a comment

Choose a reason for hiding this comment

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

LGTM

Should also have PR to remove the package build: https://github.com/vyos/vyos-build/tree/current/scripts/package-build/opennhrp

@@ -147,6 +148,43 @@ def dict_helper_pim_defaults(pim, path):
pim = config_dict_merge(default_values, pim)
return pim

def dict_helper_nhrp_defaults(nhrp):
nflog_redirect = 1
Copy link
Member

Choose a reason for hiding this comment

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

What are those magic numbers? Please add a proper comment.

Copy link
Contributor Author

@aapostoliuk aapostoliuk Jan 9, 2025

Choose a reason for hiding this comment

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

no_tag_node_value_mangle=True)

for name, profile_conf in profile.items():
if 'disable' not in profile_conf:
Copy link
Member

Choose a reason for hiding this comment

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

You can unindent one entire block by using

Suggested change
if 'disable' not in profile_conf:
if 'disable' in profile_conf:
continue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -378,6 +428,8 @@ def dict_helper_pim_defaults(pim, path):
else:
dict.update({'static' : {'pppoe' : tmp}})


Copy link
Member

Choose a reason for hiding this comment

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

Why are those whitespace lines needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

NHRP migration to FRR
Copy link

github-actions bot commented Jan 9, 2025

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants