You are not logged in.
Hello.
I am working on a Arch Linux embedded device that I progressively built, and now that I have to duplicate, possibly dozen of times.
So I took a hard drive duplicator, and I created a copy of the working initial installation in order to have a second hard disk that is completely identical to the first one in order to boot a second device.
My problem is that the copy is so much identical that it actually duplicates also the IP address acquired by DHCP on the first device, causing a network conflict.
The network configuration is made under systemd, using the systemd-networkd target.
I tried to temporarily setup a fixed static IP, and then revert to the DHCP allocated one, hoping that the system will forget the previously acquired dynamic IP, but this was not the case: when returning to the DHCP configuration, despite the fact that the MAC address was different, the system returned back to the wrong conflicting IP address.
And worse, if I restart the DHCP server along with my two devices (only two so far), they will effectively acquire a new and different IP address... but both will acquire the same new and different IP address!!!
So my question is:
How to force a DHCP client, driven by systemd-networkd under Arch Linux (currently with kernel 4.0.7-2) to release its IP address and force it to acquire a new one which will be different from the one acquired by other cloned devices?
I need it to do this as simply as possible as I may potentially have to do this many times on many devices, eventually by writing a shell script in order to do it rapidly.
Thank you very much for any answer.
Gingko
Offline
My guess is that the DHCP server is relying on the hostname rather than the MAC to identify clients.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Hello,
Thank you very much for your answer.
But unfortunately this is not the case:
Although I didn't succeed in changing the IP address acquired by DHCP, I did change the hostname without nearly any problem.
So despite my systems have different host names, they are still getting the same IP.
What else could be used by the DHCP server which could let it thinking that my two devices are the same device?
Gingko ..............
Offline
It MAY have to do with systemd.link MacAdressPolicy, check it's manpage .
Check *.link files in /usr/lib/systemd/network , /run/systemd/network and /etc/systemd/network .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
You might also try going in and manually deleting the lease files. Assuming you are using dhcpcd, they are squirreled away in /var/lib/dhcpcd.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
WTF? I never would have expected lease info would be written to persistent storage. I have leases files from Aug 2012...
Last edited by alphaniner (2015-09-01 18:34:20)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline