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

Swarm ipv6 to ipv4 containers #40299

Open
ghost opened this issue Dec 9, 2019 · 0 comments
Open

Swarm ipv6 to ipv4 containers #40299

ghost opened this issue Dec 9, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 9, 2019

Hi ,

We have a Swarm cluster whare all Hosts are IPv6 only. Swarm was created using ,
docker swarm init --advertise-addr [2001:db8:1:100::20]:2377 --listen-addr [2001:db8:1:100::20]:2377

our containers are IPv4 Only.
we need some mechanism that will allow incoming IPv6 traffic to services 'converted' and pushed to the containers as IPv4 . [converting our containers to IPv6 is not feasible at the moment since is will require major code changes :( ]

tried several configuration for docker service and docker_gwbridge , but none works .
currently trying to check it wilh simple nginx web.

My docker_bridge inspect:

    {
        "Name": "docker_gwbridge",
        "Id": "33b561a887b41324823e82ac8d99df2d73a9a7846749880dce2531bc6583a09e",
        "Created": "2019-12-05T17:47:00.947690828+02:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": true,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                },
                {
                    "Subnet": "2001:db8:18::/64",
                    "Gateway": "2001:db8:18::1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "6063b0e7360a9476c5217a7780092e3000e2a8dac8e84e4f010ad153e8daaa3b": {
                "Name": "gateway_aba9e8a4ac32",
                "EndpointID": "1202c8e936221b71a8aadd6018e0b96b095679ef70fbcc32c6e6cd0de4ef8846",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": "2001:db8:18::3/64"
            },
            "ingress-sbox": {
                "Name": "gateway_ingress-sbox",
                "EndpointID": "f06663de793a651e328ab773b16143f21cad37f83e08eafe235d4c2f70e270eb",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": "2001:db8:18::2/64"
            }
        },
        "Options": {
            "com.docker.network.bridge.enable_icc": "false",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.name": "docker_gwbridge"
        },
        "Labels": {}
    }
]

My /etc/docker/daemon.json :

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

My container inspect:

 },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "aba9e8a4ac325750e30dc9a52de80f874a92641a71e3926bb84bb6727d562fed",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "80/tcp": null
            },
            "SandboxKey": "/var/run/docker/netns/aba9e8a4ac32",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "ingress": {
                    "IPAMConfig": {
                        "IPv4Address": "10.0.0.4"
                    },
                    "Links": null,
                    "Aliases": [
                        "6063b0e7360a"
                    ],
                    "NetworkID": "vg8sxhfwn673soqya849ho33m",
                    "EndpointID": "46ef4c31312dc2092cb762ed56b7d33feea1872ae7ab4e0f371ce794bcfe7b1b",
                    "Gateway": "",
                    "IPAddress": "10.0.0.4",
                    "IPPrefixLen": 24,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:0a:00:00:04",
                    "DriverOpts": null
                }

Any help is welcomed and appriciated.

Thanks
Avi.

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

No branches or pull requests

1 participant