I'm trying to let my Raspberry Pi ask for a new IP address everytime an ethernet cable is plugged in. So it doesn't only ask for an IP address when the Pi is booting.
Asked
Active
Viewed 87 times
1
1 Answers
0
This worked for me:
Just go to /etc/network/interfaces
Edit interfaces with sudo nano interfaces
auto eth0 allow-hotplug eth0 iface eth0 inet dhcp
DONE! =)
I'll mark this as the answer in two days, because then it can.
jrust
- 78
- 1
- 2
- 10
-
this look more like a renewal of your IP. did you get a différent IP when on same network ? (if that was your intend) – Archemar Jan 31 '15 at 22:08
-
I also understood the question in the way that a fresh IP address was desired (for some reason). Good that it worked out anyway. – Frepa Feb 01 '15 at 00:05
-
Archemar, that was not the intention. It just needs to ask for an IP, it does not need to have new one. Thanks for all the help guys! – jrust Feb 01 '15 at 09:18
ifplugd, which is installed and run as an init service by default on raspbian, if you want to do this. As joan points out though, this is a little off topic here and would probably fly better on the Unix & Linux Exchange. – goldilocks Jan 31 '15 at 20:34auto eth0allow-hotplug eth0iface eth0 inet dhcp. I am not sure if it will work but try it out unless you aren't connected to pi via SSH. – thekiwi5000 Jan 31 '15 at 21:16