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

Some guest OS don't get IP address #13

Closed
methadata opened this issue Oct 9, 2016 · 2 comments
Closed

Some guest OS don't get IP address #13

methadata opened this issue Oct 9, 2016 · 2 comments
Assignees
Labels

Comments

@methadata
Copy link
Collaborator

methadata commented Oct 9, 2016

Some guest OS are not getting the IP address offered by dnsmasq in container service.
If IP address is configured manually, network connectivity works properly.

Guest OS tested:

@methadata methadata changed the title Some guest OS doesn't get IP address Some guest OS don't get IP address Oct 9, 2016
@methadata
Copy link
Collaborator Author

Good news and bad news:

According to this bug report from Debian, and this other from Centos it seems that:

This is due to dhclient checking the checksum of udp packets it receives, but checksums are not computed if the packets don't leave through a physical interface.

Adding this to the Centos KVM container before launching the startvm script:

iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM 
--checksum-fill

makes that guest VM gets the IP address served by dhclient in the KVM container. (Hurray!)

Also, in a Vagrant bug report regarding the same issue, someone cites a Xen Networking Wiki with another solution:

ethtool -K <IFACE> tx off

But this doesn't seem to work with this KVM Centos container. I have run the command with all the ethX interfaces, with no success within a Debian guest. It doesn't work with macvlan/macvtap devices either.

The problem here is that with Alpine container there is no iptables, so the solution is not possible. Adding this package to Alpine is an option, but seems very ugly to me.

Any ideas? cc/ @panchoh @rodrigofuente ?

Meanwhile I will do more test with several guest OSes.

@methadata methadata added the bug label Oct 9, 2016
@methadata methadata self-assigned this Oct 9, 2016
@methadata methadata modified the milestone: Alpine release Oct 9, 2016
@methadata
Copy link
Collaborator Author

Fix tested with:

  • CentOS 6.8 (Nuage VSD)
    • kvm:latest (centos) ✅
    • kvm:alpine ❌
  • CentOS-7-x86_64-GenericCloud-1608.qcow2c
    • kvm:latest (centos) ✅
    • kvm:alpine ❌
  • Cirros-0.3.4-x86_64-disk.img
    • kvm:latest (centos): ✅ (qcow doesn't work, img does)
    • kvm:alpine: :x:
  • Debian Wheezy (qcow2)
    • kvm:latest (centos): ✅
    • kvm:alpine: :x: getting debian-amd64 dhclient: No DHCPOFFERS received.

This was referenced Oct 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant