Skip to content

Conversation

@ChristopherJHart
Copy link
Contributor

@ChristopherJHart ChristopherJHart commented Nov 6, 2025

This PR adds support for CEF load balancing and port-channel load balancing configuration in the terraform-provider-iosxe.

These improvements enhance the iosxe_system resource with comprehensive load balancing capabilities including IPv4 and IPv6 CEF load-sharing algorithm configuration with port-based hashing, and port-channel load balance algorithm selection.


CLI Commands Supported

CEF Load-Sharing Algorithm Support

ip cef load-sharing algorithm include-ports source
ip cef load-sharing algorithm include-ports destination
ip cef load-sharing algorithm include-ports source destination
ipv6 cef load-sharing algorithm include-ports source
ipv6 cef load-sharing algorithm include-ports destination
ipv6 cef load-sharing algorithm include-ports source destination

Port-Channel Load Balance Support

port-channel load-balance <algorithm>

Supported algorithms include: src-dst-ip, src-dst-mac, src-ip, src-mac, dst-ip, dst-mac, src-dst-mixed-ip-port, and other platform-specific options.

Benefits:

  • Enables fine-grained control over CEF load balancing behavior for both IPv4 and IPv6 traffic using Layer 4 port information in hash calculations
  • Improves traffic distribution across ECMP paths by including source and destination ports in the load balancing algorithm
  • Provides flexible port-channel load balancing algorithm configuration to optimize traffic distribution across port-channel member links
  • Enhances network performance and utilization through intelligent hash-based load distribution that considers Layer 3 addresses and Layer 4 ports

Platform Compatibility:
These features have been validated against Catalyst 9300 switches running IOS-XE 17.12.5. The implementation uses the modern cef-v2 YANG model (Cisco-IOS-XE-cef) which is supported across Catalyst switch and router platforms.

Technical Implementation:

  • Added Cisco-IOS-XE-cef YANG model to code generation pipeline
  • Implemented proper namespace handling for augmented YANG containers
  • Correctly mapped YANG empty type leaves to boolean Terraform attributes
  • Fixed xpath patterns to follow RESTCONF JSON namespace conventions
  • Ensured idempotent behavior for all new attributes

@ChristopherJHart ChristopherJHart changed the title enhancement(system): Add support for CEF and port-channel load balancing configuration [CEF] Implement Load Sharing Algorithm Support in Terraform Provider Nov 6, 2025
@aitestino aitestino added the enhancement New feature or request label Nov 9, 2025
@danischm danischm merged commit afef2bd into CiscoDevNet:main Nov 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants