Closed lezruk closed 8 months ago
Thanks for the report. However, we do not support Multicast with IPv6 (see https://github.com/antrea-io/antrea/blob/main/docs/multicast-guide.md#limitations). @wenyingd @ceclinux could we fail early if Multicast is enabled in an IPv6 cluster?
We should probably also open an issue to discuss adding this support. I don't know if anything specific was identified as a technical blocker for implementing Multicast with IPv6.
We should probably also open an issue to discuss adding this support. I don't know if anything specific was identified as a technical blocker for implementing Multicast with IPv6.
The design for Multicast is generic for both IPv4 and IPv6. The major difference with IPv6 is we need to use MLD protocol as an alternative for IGMP which only works for IPv4. From the openflow library (libOpenflow), MLD packet format was already added, but we didn't add the corresponding invocation in antrea logic. And another reason for not support it in IPv6 is we didn't receive a user request on it yet, so it is processed with a lower priority until now.
Before Multicast can be supported with IPv6, does it make sense to make the code self-adaptive that it would enable Multicast for IPv4 and skip IPv6 for a dual-stack cluster? I feel there may be use cases that the Multicast is only needed for IPv4 even though the whole cluster is dual-stack. The validation could be:
@lezruk do you need multicast to work for IPv6, or you only need it with IPv4 in a dual-stack cluster?
Hi @tnqn thank you. I understand IPv6 multicast is not there yet , here the case is to have IPv4 multicast in dual-stack configuration for IPv4 only (which is failling becuase IPv4 multicast prerouting rule is tried to be applied for IPv6). This is exact problem here
-A ANTREA-PREROUTING -m comment --comment "Antrea: drop Pod multicast traffic forwarded via underlay network" -m set --match-set **CLUSTER-NODE-IP6** src -d **224.0.0.0/4** -j DROP
@lezruk do you need multicast to work for IPv6, or you only need it with IPv4 in a dual-stack cluster?
To be more precise answering your question: at the moment to have only IPv4 multicast working in dual-stack.
@antoninbas @tnqn Having looked through the code, it is difficult to check the Multicast feature gate status along with the IPv6 cluster in agent option validation stage (https://github.com/antrea-io/antrea/blob/main/cmd/antrea-agent/options.go#L141), since antrea-agent didn't get the IPv4/IPv6/dual-stack settings at that time. So if we plan to check and quit as early as we can, the earliest chance is after the agent Initialize in run
(https://github.com/antrea-io/antrea/blob/main/cmd/antrea-agent/agent.go#L303). But it looks strange to add such check in agent.run
. A thought in my mind is to add the check inside agentInitializer.initNodeLocalConfig
(https://github.com/antrea-io/antrea/blob/main/pkg/agent/agent.go#L1302) . What is your thought?
Maybe we could do it inside the call to mcastController.Initialize
. This function is only called if Multicast is enabled, and it should know if the cluster is IPv4 / IPv6 / dual-stack.
AFAIK, the agentInitializer
is not currently aware of whether Multicast is enabled, so it would require providing that information to it?
Describe the bug
Agent failing to initialize node network becuase of ip6tables failure in agent with enable dual-stack and multicast
To Reproduce Enable cluster dual stack Enable Antrea multicast support
Expected Traffic rule to be applied to IPv4 only
Actual behavior ip6tables command error Agent log:
Versions:
kubectl version
). If your Kubernetes components have different versions, please provide the version for all of them. v1.29k3s:v1.29.2+k3s1
uname -r
).Linux vk3scontrolt0 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
modinfo openvswitch
for the Kubernetes Nodes.Default Debian 12.5
Additional context