Unable to use NAT-networking on Windows #2173
Replies: 3 comments 2 replies
-
Just chiming in I have the same issue.
|
Beta Was this translation helpful? Give feedback.
-
The error here is a bug in nerdctl. The I've put up a PR for WinCNI to support CNI 1.0.0 configs like current nerdctl generates: microsoft/windows-container-networking#96, and even with this change, the above faulty warning appears, but the container still works. I put up a PR that includes a fix for that faulty warning: #2587 |
Beta Was this translation helpful? Give feedback.
-
I'm trying to tell - I think based on commit and release dates that this PR isn't in the 0.3.0 release of CNI at that repository. Is that so? Am I to conclude that I can't have networking in a container on Windows until a new release is made? That doesn't seem to align with all the documentation implying it is possible. |
Beta Was this translation helpful? Give feedback.
-
I saw that the latest release of nerdctl (1.3.0) has improved support (mainly due to this PR: #1953) for networking on Windows and I tried to make it work.
Unfortunately I could not find any configuration of the networking / NAT CNI plugins that work with
nerdctl
on Windows.(At least not with either the 'out-of-the-box' experience or without showing errors on container startup).
See my efforts / investigation below.
My questions are:
nerdctl
? (In the sense of sing the out-of-the-box behavior & using the default configurationnerdctl
creates).nerdctl
can be used to run containers with a network attached without showing errors?nerdctl
to manage the HNS networks on Windows by itself, or do we have to create these manually?)Following is my investigation into the issue:
My current setup is:
I verified that the underlying setup works with the following steps:
Create a new HNS network manually:
Configure the
nat
plugin:Use
ctr
to run a base image and verify network interface & connectivity:ipconfig
ping
I then installed the latest version of
nerdctl
and removed the manually created HNS network as well as the CNI plugin configuration (to start from a clean state).When I try to run the same image & command as above I get the follwoing output:
I could not find any
NAT
CNI plugins for windows that support the CNI versions 1.0.0.I also tried to use the same CNI plugin configuration that already worked with the
ctr
command above with no luck:If I again create the correct HNS network manually networking seems to first indicate an error, but then the container starts and has an IP / can reach other hosts:
Using the plugin configurations:
nerdctl-nat.conf
testNet.conf
A manually created HNS network:
The following commands work, but indicate errors:
Beta Was this translation helpful? Give feedback.
All reactions