8

I am able to ssh into my new RPi. One of the things I like to do to my infrastructure devices is to go ahead and convert their DHCP assignment to a reservation. My router is a CradlePoint

Firmware Version : 2.0.0, 2012/04/16
WiMAX Version : 4.1.645

I added a reservation, revoked it on the router and did a sudo dhclient -r then sudo dhclient and it picked up yet another IP address instead of the one I had reserved - a full reboot seems to have little effect.

I don't have any other trouble with this router and other devices.

tlhIngan
  • 3,342
  • 5
  • 18
  • 33
Cade Roux
  • 1,987
  • 5
  • 22
  • 27
  • Why not just configure a static address on the RPi? – Kibbee Jul 08 '12 at 02:52
  • 7
    @Kibbee Because I can manage the DHCP in one place separate from whatever images I may fool around with on the device, and I also have a number of routers and a static IP would lock it to that subnet until it's edited. – Cade Roux Jul 08 '12 at 03:00
  • Install `avahi-daemon` on the Pi and Bonjour support on your regular computer - then connect to "raspberrypi.local." – Thorbjørn Ravn Andersen Aug 07 '12 at 17:20

2 Answers2

2

I also had this problem and I found it was because the MAC address of the Pi was changing whenever it rebooted. Although difficult to pin down a solution, my recommendation would be to upgrade the Pi firmware.

Here is an answer I wrote on how to upgrade the firmware:

How do I update software and firmware?

A lot of issues such as this tend to be firmware related.

Jivings
  • 22,208
  • 11
  • 88
  • 138
  • 4
    That didn't seem to help - my MAC address appears to be the same on each reboot. I'm going to try putting it on another router and setting up the reservation before it has ever seen that network. – Cade Roux Jul 08 '12 at 13:51
  • 1
    @CadeRoux Sounds to me like a router issue...? – Jivings Jul 08 '12 at 15:40
  • I reserved an address before plugging it into another router (a Netgear WPN864) and it picked up that address. Then I moved it back to the original router and it picked up the reservation on that one! I moved it back and forth a few times and it appears to be working. It somehow developed an affinity to not pick up a reservation from the original router, but it's somehow gotten over it. Mystery no longer reproducible... – Cade Roux Jul 08 '12 at 17:13
  • @CadeRoux Nice work. – Jivings Jul 08 '12 at 17:15
0

When I ran into a similar problem today (reserved address on the router, but the client would not pick it up) I temporarily changed the DHCP lease time on my router to 30 seconds, waited 30 seconds, then ran the dhclient commands (see original post)

After confirming the client now had the desired IP, I set the router's DHCP lease time back to its previous value (86400 seconds in my case).

RCross
  • 111
  • 2
  • You should also be able to shut down `dhclient`, clear the leases out of `/var/lib/dhcp`, and start it again. It will ask for a new lease and the router will give it the reserved IP. – goldilocks Apr 05 '22 at 13:53