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

Support dual stack? #20

Closed
penaivanalejandro opened this issue Mar 14, 2019 · 5 comments
Closed

Support dual stack? #20

penaivanalejandro opened this issue Mar 14, 2019 · 5 comments

Comments

@penaivanalejandro
Copy link

Hi, i want to know if the container support dual stack?? I mean ipv4 and ipv6 in the same container?

@robinsmidsrod
Copy link
Contributor

Not with the single network interface invocation mode, it does not. In fact, the entrypoint script in the container explicitly sets the -4 parameter to dhcpd. See

$run /usr/sbin/dhcpd -4 -f -d --no-pid -cf "$data_dir/dhcpd.conf" -lf "$data_dir/dhcpd.leases" $IFACE
for the exact details.

You can of course run the container with custom arguments, but then you lose out on some of the benefits that the entrypoint script gives you.

I seem to recall that there are some issues surrounding running both IPv4 and IPv6 from the same configuration, but I don't have my notes in front of me now, so I'm not sure.

In terms of extending the entrypoint script to support IPv4, IPv6 or both then we could introduce e.g. an environment variable that defines which mode you want, and potentially a variable that lets to specify additional command-line arguments to pass to dhcpd. If you're able to create a pull request that adds these features, but maintains backwards compatibility, then I'd be inclined to accept it.

@robinsmidsrod
Copy link
Contributor

Solved via #27 with DHCPD_PROTOCOL=6 environment variable on the docker run command.

@liyihuang
Copy link

I dont think this is the correct way to support the dual stack. I can only choose to run either in ipv4 and ipv6. I think we need to run 2 different processes and config file to support the dual stack

@robinsmidsrod
Copy link
Contributor

@liyihuang That (one process = one protocol) is the intent of the above. What do you propose as an alternative? This container is built on the concept of the single-responsibility-principle (Unix philosophy). Do one thing, and do it well.

@liyihuang
Copy link

I just realized that I can just spin up another one for the ipv6 so it should be fine...

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

3 participants