Skip to content

Conversation

@plamen-bardarov
Copy link
Contributor

@plamen-bardarov plamen-bardarov commented Feb 3, 2025

Summary

RFC0038
Tracking Issue

Key things to note:

  • There's a dependency on BOSH for exporting the ipv6 prefix for the cells so for now its hardcoded.
  • Cloud Controller has to be extended as it currently doesn't support IPv6 ASGs
  • There's a dependency on garden, bbs and executor, where a branch "icmpv6-support-asg" exists
  • C2C support for IPv6 is not in the scope of the PR
  • Some IPv6 specific tests cant be ran in the concourse pipeline so setting "GINKGO_TEST_IPV6=true" will trigger the execution of all tests. It requires IPv6 enabled docker.

Testing

In order to run the IPv6 tests locally "GINKGO_TEST_IPV6=true" has to be set inside the container. Also docker engine has to have IPv6 enabled with the following config:

{
  "fixed-cidr-v6": "2001:db8:2::/64",
  "ipv6": true
}

Code Changes

CNI Wrapper Plugin

Spec Changes

  • Added host_tcp_services_ipv6, similar to host_tcp_services for ipv4, adds those networks as ACCEPT iptables rules
  • Added deny_networks_ipv6, similar to deny_networks for ipv4
  • Added ipv6.enable

Code Changes

  • If IPv6 is enabled on the host and the host-local plugin assigns an IPv6 address to the container, NetOut and NetOutChain are created specifically for IPv6 and used to initialize default and egress rules.
  • netrules.NetOut:
    • Changed default overlay rules for IPv6 to REJECT all instead of allowing marked packets.
    • Removed packet marking.
    • Implemented support for host TCP services and DNS validation.
  • netrules.RuleConverter:
    • Added ICMPv6 protocol support.

Silk CNI (Plugin)

Code Changes

  • If silk-daemon returns an IPv6 prefix, pass it to the IPAM host-local plugin.
  • If an IPv6 address is allocated by the IPAM plugin, assign it to both host and container devices, configuring them similarly to IPv4.

Silk Daemon

Spec Changes

  • Added ipv6_prefix
  • Added ipv6.enable
  • Added ipv6.prefix_network, the network name from spec.networks that holds the ipv6 prefix for containers

Note:
ipv6_prefix is not part of the spec, it is dynamically assigned value, taken from a network named ipv6.prefix_network

Code Changes

  • The healthcheck endpoint returns the network lease (from the silk-controller) for the cell. If IPv6 is enabled(ipv6.enable=true) and the host supports it and ipv6_prefix is set in the config, return the configured prefix as well.

VXLAN Policy Agent

Spec Changes

  • Added ipv6.enable. Disclaimer: if ipv6.enable=true but the cni-wrapper plugin is not configured to assign IPv6 addresses, the vxlan-policy-agent fails to setup ASG rules, because of the missing netout chains for IPv6

Code Changes

  • If IPv6 is enabled in the config and the host supports it:
    1. netrules.NetOutChain, Enforcer, and planner.VxlanPolicyPlanner are created with IPv6 configurations.
    2. A new converger.SinglePollCycle is instantiated for IPv6 and added to PollCycleGroup, wrapping both IPv6 and IPv4 implementations.
  • planner.VxlanPolicyPlanner:
    • Extended with an IPv6 flag.
    • Security group rules received from Policy Server are filtered based on IP version.

Backward Compatibility

Breaking Change? TBD

@plamen-bardarov plamen-bardarov requested a review from a team as a code owner February 3, 2025 09:00
@plamen-bardarov plamen-bardarov force-pushed the vxlan-policy-agent-ipv6-pr branch from 8060719 to 4f4eb21 Compare February 20, 2025 07:51
@plamen-bardarov plamen-bardarov changed the title WIP: IPv6 support for Silk CNI and VXLAN policy agent IPv6 support for Silk CNI and VXLAN policy agent Feb 24, 2025
@plamen-bardarov plamen-bardarov changed the title IPv6 support for Silk CNI and VXLAN policy agent [RFC0038] IPv6 support for Silk CNI and VXLAN policy agent Mar 19, 2025
dimitardimitrov13 and others added 23 commits May 15, 2025 15:21
IPv6: Sysctl for IPv6.
IPv6: forwarding.
IPv6: point-to-point for containers.
IPv6: neighbors for IPv6.
IPv6: enable routing for IPv6.
IPv6: extend the CNIResult.

IPv6: remove IPv6 routes from routing slice.

IPv6 for silk-cni: prepare IPAM for IPv6.

IPv6 for silk-daemon: extend network info for IPv6.

IPv6 silk-cni and cni-wrapper: extending of datastore.
IPv6 cni-wrapper: fix IPv6 validation.

IPv6: ipv4 and ipv6 alidation.

IPv6: datastore, optimization.

IPv6 silk-daemon: extend config file with ipv6_prefix field.

IPv6 silk/lib, silk-cni: fix datastore build.

IPv6 silk/lib, silk-cni, cni-wrapper: fix datastore validator because of broken build.

IPv6 silk-daemon: validate whether the host is IPv6 enabled.

IPv6 silk-cni: add SysctlIPv6Security.
@plamen-bardarov plamen-bardarov force-pushed the vxlan-policy-agent-ipv6-pr branch from 40756ff to 83a7dd1 Compare June 12, 2025 13:57
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 2, 2025

CLA Not Signed

@plamen-bardarov
Copy link
Contributor Author

plamen-bardarov commented Jul 2, 2025

Ginkgo test results(tl;dr all green): https://gist.github.com/plamen-bardarov/b4d40c27383be0269b39f191864b6b13

@winkingturtle-vmw
Copy link
Contributor

@plamen-bardarov Can you please resolve the conflict so that we can start the process for merging ?

@winkingturtle-vmw
Copy link
Contributor

Changes looks good to me as far keeping the backward compatibility and keeping ipv6 behind a flag. Since there is a lot of code changes here, I've asked for a second pair of eyes to make sure I didn't miss anything.

@plamen-bardarov plamen-bardarov requested a review from ameowlia July 8, 2025 12:18
@winkingturtle-vmw
Copy link
Contributor

winkingturtle-vmw commented Jul 17, 2025

@ameowlia This looks to good to me now. Is there any other changes you are requesting ? Ideally I would to squash all of these commits into one for a better visibility of the changes.

@plamen-bardarov
Copy link
Contributor Author

cf-acceptance-tests results: https://gist.github.com/plamen-bardarov/49852860f721b99dd6f928754ee32e02
Ran with the following config:

{
    "admin_user": "admin",
    "api": "api.api",
    "apps_domain": "apps.apps",
    "artifacts_directory": "logs",
    "include_apps": true,
    "include_container_networking": true,
    "include_detect": true,
    "include_deployments": true,
    "include_docker": true,
    "include_http2_routing": false,
    "include_internet_dependent": true,
    "include_routing_isolation_segments": false,
    "include_isolation_segments": false,
    "include_route_services": true,
    "include_routing": true,
    "include_security_groups": true,
    "include_services": true,
    "include_service_discovery": true,
    "include_service_instance_sharing": true,
    "include_ssh": true,
    "include_sso": true,
    "include_tasks": true,
    "include_tcp_isolation_segments": false,
    "include_tcp_routing": false,
    "include_user_provided_services": true,
    "include_v3": true,
    "include_volume_services": false,
    "include_zipkin": true,
    "skip_ssl_validation": true,
    "stacks": ["cflinuxfs4"],
    "timeout_scale": 10,
    "use_http": false,
    "include_app_syslog_tcp": false
}

@peanball
Copy link

@winkingturtle-vmw, @ameowlia just as quick reminder: I think we've now provided everything that is needed to consider merging this. It is still considered experimental, but having a release will significantly help us in testing this with real world scenarios.

@n-sandalski
Copy link
Contributor

Hi @ameowlia, the CATs have been executed successfully, and the changes don't affect the IPv4 functionality.

Is there anything further we can do on our end, or may we proceed with the merge?

@github-project-automation github-project-automation bot moved this from Inbox to Pending Merge | Prioritized in Application Runtime Platform Working Group Aug 13, 2025
@ameowlia ameowlia merged commit d3551e3 into cloudfoundry:develop Aug 13, 2025
1 check failed
@github-project-automation github-project-automation bot moved this from Pending Merge | Prioritized to Done in Application Runtime Platform Working Group Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

6 participants