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

Containerlab fails to manage nft ipv6 forwarding policy #2389

Open
jbemmel opened this issue Jan 12, 2025 · 1 comment
Open

Containerlab fails to manage nft ipv6 forwarding policy #2389

jbemmel opened this issue Jan 12, 2025 · 1 comment

Comments

@jbemmel
Copy link
Contributor

jbemmel commented Jan 12, 2025

At Netlab we were seeing an inexplicable failure of IPv6 use cases: ipspace/netlab#1669

In short: It works with Libvirt, but fails with Containerlab; IPv6 router advertisements are not being received by the host containers when connected via a Linux bridge

The difference between both scenarios, is that in the Containerlab case the router gets attached to the Linux bridge using a veth pair. IPv6 packets are being dropped on this pair

Turns out on my Ubuntu machine, the default ip6 FORWARD policy is "drop"

jeroen@j:~/Projects/netlab/tests$ sudo nft list table ip6 filter
# Warning: table ip6 filter is managed by iptables-nft, do not touch!
table ip6 filter {

  ...

	chain FORWARD {
		type filter hook forward priority filter; policy drop;  <!-- !!
	}

Libvirt adds rules to bypass this default, but Containerlab does not. IMHO it should

See

rule, err := c.newClabNftablesRule(definitions.DockerFWUserChain, definitions.DockerFWTable, nftables.TableFamilyIPv4, 0)

it only handles ipv4 for the management bridge

Context:

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.1 LTS
Release:	24.04
Codename:	noble
uname -r
6.8.0-51-generic
@jbemmel
Copy link
Contributor Author

jbemmel commented Jan 13, 2025

This issue depends on security settings, I do not know how widely spread it is. I would suggest to start with modifying the smoke tests to detect this condition to start with.

It turns out in my case I installed Docker through snap, it loads the br_filter module which blocks IPv6 packet forwarding by default unless disabled.

A documentation update cautioning users to check their Docker installation could also be a solution

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

No branches or pull requests

1 participant