-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Unable to use IPv6 on rootless container #15850
Comments
@Luap99 PTAL - probably a slirp4netns options issue? |
We need to enable the slirp4netns ipv6 option in containers.conf (which should be already on by default) I think there are some routing issues with the ipv6 slirp4netns support, the output from, |
Yes, the option is already set: And the
This is the "test" network configuration:
Anything wrong? |
Looks like the default route is missing, try I think slirp4netns should configure that. |
fd00 address? |
The fd... address in |
The command |
Still interested in this question? |
fd..., not fe80... |
Well, it doesn't have an fd... address.
Is the cni-podman1 network you mean? |
If there is no fd address on the tap0 interface then there is a problem with slirp4netns. |
A friendly reminder that this issue had no activity for 30 days. |
Still an issue with 4.3. They still can use ipv6, but DNS resolution (uses IPv6) and IPv6 access are broken.
Also see rootless-containers/slirp4netns#305 |
I had the same issue, but I solved it with the following commands in my environment: # Add an fd00::/64 address on tap0 manually (if not presenting)
podman unshare --rootless-netns ip addr add fd00::100/64 dev tap0
# Set default route via fd00::2 (IPv6 Gateway of slirp4netns)
podman unshare --rootless-netns ip route add default via fd00::2 dev tap0 Although there seems to be an mtu-related issue. I have to set the mtu of the network used by the container to 65520 (same as the mtu of tap0) via podman (modifying mtu with The version I am usingOutput of
Output of
|
Is there honestly no ipv6 support out of the box? Like ipv4. Moreover, the premise of enabling ipv6 on the existing podman network is a fixed ipv6 prefix, which makes it impossible to use the random ipv6 prefix distributed by the ISP of the home network. |
@Luap99 PTAL |
A friendly reminder that this issue had no activity for 30 days. |
/remove stale |
Frustrating, I really want to use IPV6. |
Running into this today, on a v6-only LAN Here's the version information:
Similar to @sup39 I was able to get some connectivity by adding an address and route, but then ran into connection problems when doing anything beyond trivial HTTP requests e.g. |
This issue still exists on podman 4.5. |
This issue, as stated originally, still exists in Podman 4.6. Rootless IPv6 networking with a set network (For example, passing |
@Luap99 Thoughts? |
slirp4netns is already started with I am working on the |
Is there a way to use pasta now by setting options from run command instead of using slirp4netns? |
I also hope it for a future version. |
I just read on |
@maxi0604 No rootless bridge still uses slirp4netns, rootlesskit is only used for the port forwarding, see here for the architecture: https://web.archive.org/web/20211014184135/https://podman.io/community/meeting/notes/2021-10-05/Podman-Rootless-Networking.pdf To me this looks like slirp4netns does not configure a default ipv6 route but I wasn't able to verify that myself. However sounds like #15850 (comment) did confirm that it is indeed the missing default route. |
Ah, I see. Is there a way to test pasta with a custom network?
I can't confirm the missing route either.
The |
No that is WIP
Not the default route in the container the default route in |
I guess I'll have to just wait and see then, thanks for the info.
Sorry for the misunderstanding. I can confirm the issue now. Only while the container is running,
and IPv6 connections fail from After the container exits, an existing
and IPv6 networking works To summarize the reproduction:
|
podman unshare --rootless-netns ip -br -6 route has three routes fd00::/64 dev tap0 why fd00::/64? podman = 4.4.0 |
Since my issue was a dup of this, so I am putting informatio here: Steps to reproduce the issue
{
"name": "podman",
"id": "2f259bab93aaaaa2542ba43ef33eb990d0999ee1b9924b557b7be53c0b7a1bb9",
"driver": "bridge",
"network_interface": "podman0",
"created": "2022-08-27T13:25:16.808341191+08:00",
"subnets": [
{
"subnet": "10.89.0.0/16",
"gateway": "10.89.0.1"
},
{
"subnet": "fccd::/64",
"gateway": "fccd::1"
}
],
"ipv6_enabled": true,
"internal": false,
"dns_enabled": true,
"ipam_options": {
"driver": "host-local"
}
}
Describe the results you receivedI don't get ipv6 in container as expected. The address and route is configured in container but no connection. And I did some inspection with
The route here is weird as the default route is missing (and ipv6 is broken in this namespace too). I think this is the direct cause of the issue. Before running the container (or after the container has stopped) the route is
Adding the route in the rootless namespace can grant ipv6 access to containers. So I believe the issue is netavark somehow removed the route or stopped slirp4netns from creating it. But anyway, if just ipv6 access is needed, running podman with no explicit network flag and let slirp4netns to handle everything should work... |
I assume this works with podman 5.0 when pasta is used for the rootless-netns which it is by default |
My English is not good, so I used translation software.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
First create an ipv6 network:
podman network create --ipv6 test
And create a rootless container use this network:
podman run -it --rm --network test archlinux
But this container cannot connect to a ipv6 webserver.
I'm sure the host can connect to a ipv6 webserver.
And, a container created with option "--network slirp4netns:enable_ipv6=true" can use ipv6.
Is there something wrong with my settings?
Describe the results you expected:
Both the host and container can connect to the webserver by either its IPv4 or IPv6 address.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Rocky Linux 8.6 in VirtualBox
The text was updated successfully, but these errors were encountered: