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

Add support for ClientID to DHCP #17

Closed
eyakubovich opened this issue May 27, 2015 · 4 comments
Closed

Add support for ClientID to DHCP #17

eyakubovich opened this issue May 27, 2015 · 4 comments

Comments

@eyakubovich
Copy link
Contributor

With ipvlan, all interfaces will share the MAC address so the DHCP server will return the same lease. Need to add support for ClientID (DHCP option 61). The value can be ContainerID by default but over-rideable via CNI_ARGS.

@eyakubovich
Copy link
Contributor Author

Ok, this won't work. Adding support for ClientID option is still a good idea but DHCP won't work with ipvlan. DHCPOFFER will come back with some IP but ipvlan machinery won't yet know to which enslaved device to forward it to.

eyakubovich pushed a commit to eyakubovich/cni that referenced this issue Nov 20, 2015
ClientID is "containerid/netname" and can help
with visibility into allocated IPs in DHCP server.
Unforunately it still does not make it possible
to use DHCP with ipvlan as the messages coming
from the DHCP server can't be forwarded to the
correct ipvlan interface since they don't yet
have the IP assigned.

Fixes containernetworking#17
@dcbw
Copy link
Member

dcbw commented Nov 20, 2015

@eyakubovich can you describe a bit more what your problem is? I've had ipvlan + DHCP working with multiple OpenShift containers in the past here: https://github.com/dcbw/openshift-sdn/commits/dcbw/ipvlan

There are at least a couple of caveats:

  1. you need to use the 'broadcast' option with the DHCP client
  2. the client ID must be different between each ipvlan interface
  3. VirtualBox's DHCP server doesn't support client IDs so it'll never work with ipvlan
  4. You obviously need to use L2 ipvlan devices, not L3 ones
  5. you also may need to set rp_filter on the parent interface

I'll bet your issue is (1) and/or (5).

eyakubovich pushed a commit to eyakubovich/cni that referenced this issue Dec 2, 2015
ClientID is "containerid/netname" and can help
with visibility into allocated IPs in DHCP server.
Unforunately it still does not make it possible
to use DHCP with ipvlan as the messages coming
from the DHCP server can't be forwarded to the
correct ipvlan interface since they don't yet
have the IP assigned.

Fixes containernetworking#17
eyakubovich pushed a commit to eyakubovich/cni that referenced this issue Dec 8, 2015
Broadcast is necessary for ipvlan plugin as
kernel will drop unicast replies since the slave
device has not yet been configured with an IP.

ClientID is "containerid/netname" and can help
with visibility into allocated IPs in DHCP server.
It is also important for ipvlan as all h/w addresses
are the same.

Fixes containernetworking#17
fnordahl pushed a commit to fnordahl/cni that referenced this issue May 18, 2016
Broadcast is necessary for ipvlan plugin as
kernel will drop unicast replies since the slave
device has not yet been configured with an IP.

ClientID is "containerid/netname" and can help
with visibility into allocated IPs in DHCP server.
It is also important for ipvlan as all h/w addresses
are the same.

Fixes containernetworking#17
fnordahl pushed a commit to fnordahl/cni that referenced this issue May 18, 2016
Broadcast is necessary for ipvlan plugin as
kernel will drop unicast replies since the slave
device has not yet been configured with an IP.

ClientID is "containerid/netname" and can help
with visibility into allocated IPs in DHCP server.
It is also important for ipvlan as all h/w addresses
are the same.

Fixes containernetworking#17
fnordahl pushed a commit to fnordahl/cni that referenced this issue May 22, 2016
Broadcast is necessary for ipvlan plugin as
kernel will drop unicast replies since the slave
device has not yet been configured with an IP.

ClientID is "containerid/netname" and can help
with visibility into allocated IPs in DHCP server.
It is also important for ipvlan as all h/w addresses
are the same.

Fixes containernetworking#17
@dcbw
Copy link
Member

dcbw commented Nov 13, 2019

@dcbw dcbw closed this as completed Nov 13, 2019
@deliciouslytyped
Copy link

@dcbw thank you for your answer here, it helped me a lot by pointing me in the right direction. Details at NixOS/nixpkgs#48753 (comment)

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

4 participants