PDA

View Full Version : squeezebox2 DHCP wierdness.



Simon Kelley
2005-08-26, 04:48
[ This is strictly OT for the slimserver list, I guess, but I couldn't
find a "tech" list for the SB2, and I sure the relevant people will hang
out here. ]

I've seen circumstances where the squeezebox2 fails to renew a limited
duration DHCP lease, but continues to use the IP address anyway.

This seems to happen after a power-cycle. When the SB is configured to
use DHCP at power up, it gets a lease OK, and renews it at the correct
interval. If, in this state, the SB is power-cycled, and the "press
right for setup" prompt is allowed to time-out, then it will go back to
using the IP address it had (from DHCP) before the power cycle, but
never again emits a DHCP request. This can lead to the SB using an IP
address whose lease has expired, and which the DHCP server therefore
thinks is available from re-allocation - not a good scenario.

Is this by design, a known problem, or a missing call to
resume_old_dhcp_lease()?

Cheers,

Simon.

MrC
2005-08-26, 10:07
So you've noticed with a packet trace that the DCHPDISCOVER and DHCPREQUEST are not present? And an ICMP isn't sent to double check for IP-in-use?

That would be ugly.

Simon Kelley
2005-08-26, 11:37
MrC wrote:
> So you've noticed with a packet trace that the DCHPDISCOVER and
> DHCPREQUEST are not present? And an ICMP isn't sent to double check for
> IP-in-use?
>
> That would be ugly.
>
>

Power cycling the SB gets all the way to up-and-running without
generating a single DHCP message or ICMP echo request - I just double
checked. DHCP leases here are 6 hours, so it should renew within the
next three hours - I'll double check that too, but the behaviour I was
seeing yesterday was that after a power cycle, no further DHCP messages
are seen.

Note that I'd not necessarily expect to see DISCOVER messages when
power-cycling - it would make sense for a SB which previously had a
lease to restart in INIT-REBOOT state and send a REQUEST first.

[ Ref: RFC 2131 ]

Cheers,

Simon.

MrC
2005-08-26, 12:05
Good stuff - thanks for the info. I suppose as long as the box held the lease, and renewed in sufficient time, it could retain the lease for short power cycles. Given the the Power button on the remote doesn't really power down the device (methinks), SB2 can still keep track internally of the lease. But I'm speculating - i'm sure the firmware boys could give accurate info.

Simon Kelley
2005-08-26, 12:19
MrC wrote:
> Good stuff - thanks for the info. I suppose as long as the box held the
> lease, and renewed in sufficient time, it could retain the lease for
> short power cycles. Given the the Power button on the remote doesn't
> really power down the device (methinks), SB2 can still keep track
> internally of the lease. But I'm speculating - i'm sure the firmware
> boys could give accurate info.
>
>

By "power cycle" I mean "pull the power lead out and then push it back".

Unless the SB has a battery-backed real-time-clock, when the firmware
reboots, it will have no idea how long the power loss has been, and
therefore if a pre-existing lease is still live. I'd therefore expect it
to contact the DHCP server to make sure that the lease is still OK, or
create a new one.

Does the SB have a RTC? I doubt it.

Cheers,

Simon.

dean
2005-08-27, 08:20
On Aug 26, 2005, at 12:19 PM, Simon Kelley wrote:
> Does the SB have a RTC? I doubt it.
It doesn't.

I'd love a bug filed at http://bugs.slimdevices.com with the details.

Thanks!

-dean

Simon Kelley
2005-08-27, 11:29
dean blackketter wrote:
>
> On Aug 26, 2005, at 12:19 PM, Simon Kelley wrote:
>
>> Does the SB have a RTC? I doubt it.
>
> It doesn't.
>
> I'd love a bug filed at http://bugs.slimdevices.com with the details.
>

Done. Bug 2029.

I'll confess to being a DHCP nerd, so feel free to get back to me if you
need input on how it should behave.

On a different subject, three days after aquiring my SB (great product!)
I've now aquired responsibility for the Debian package of Slimserver.

I'm aware that the current package is _very_ out of date and neglected,
so expect to hear from me again as a I struggle to knock it into shape.

Any and all advice and help gratefully accepted.

Cheers,

Simon.

dean
2005-08-27, 14:20
On Aug 27, 2005, at 11:29 AM, Simon Kelley wrote:

> dean blackketter wrote:
>
>> On Aug 26, 2005, at 12:19 PM, Simon Kelley wrote:
>>
>>> Does the SB have a RTC? I doubt it.
>>>
>> It doesn't.
>> I'd love a bug filed at http://bugs.slimdevices.com with the details.
>>
>
> Done. Bug 2029.
>
> I'll confess to being a DHCP nerd, so feel free to get back to me
> if you need input on how it should behave.
Thanks, will do.

> On a different subject, three days after aquiring my SB (great
> product!) I've now aquired responsibility for the Debian package of
> Slimserver.
>
> I'm aware that the current package is _very_ out of date and
> neglected, so expect to hear from me again as a I struggle to knock
> it into shape.
That's great news. A solid deb has been sorely lacking for a while.