Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • A arch-boxes
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Arch Linux
  • arch-boxes
  • Issues
  • #25

Closed
Open
Created Feb 10, 2018 by Sven-Hendrik Haase@svenstaroContributor

DHCP Client ID conflicts when running multiple instances

Created by: davidscaife

Note: I'm using the archlinux/archlinux box with the libvirt provider. In theory this issue should affect other providers, but I have not tested. (It may also be contingent on DHCP server configuration/behaviour which will probably differ between providers.)

When I vagrant up a single box, everything is fine. If I vagrant up a second box while the first is running, I can no longer access the first box, and if I have a live vagrant ssh session, the session closes.

Even though the virtual network devices are getting different MAC addresses, the boxes are nonetheless passing the same client-id to the DHCP service. This is visible by watching the contents of /var/lib/libvirt/dnsmasq/*.status. Because both boxes are exposing the same client-id, the DHCP service gives them both the same IP, causing a conflict.

It seems the archlinux boxes use systemd-networkd for network configuration with DHCP. By default, systemd-networkd will use the machine-id as an assumed unique identifier for the local machine, and use this (hashed) as the DHCP client-id. However, all "archlinux/archlinux" boxes have the same machine-id as it is created during the build process, and the build process does not delete it.

That's the root of the problem, so I would suggest deleting /etc/machine-id as one of the final steps in the build process. This would mean new machines would generate their own unique machine-id upon first boot, which will resolve the above DHCP conflicts.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking