Community discussions

MikroTik App
 
User avatar
NAB
Trainer
Trainer
Topic Author
Posts: 542
Joined: Tue Feb 10, 2009 4:08 pm
Location: UK
Contact:

DHCP problem - sanity check before I e-mail support please

Sun Feb 21, 2010 8:08 pm

Hi all,

I've had a problem for a while, but because it's on my home network, it's been slipping to the bottom of my list for too long. However, now my wife has nagged me one too many times and so I need to sort it out.

I have a Slim Devices Squeezebox (http://wiki.slimdevices.com/index.php/Squeezebox) which connects over WiFi to my RB493 running ROS 4.5 (though this problem has existed for quite some time and for a lot of versions of ROS).

After some investigation, the problem appears to be that if the Squeezebox doesn't receive a DHCP ack reply to its renewal request, at the end of the lease period, the Squeezebox assumes it can't have an address and just drops off the network.

The strange thing is that the first renewal request is acknowledged (although ROS doesn't update the lease expiration time). Subsequent lease renewal requests are received by ROS (they show in the DHCP log output), but are not actioned - i.e. ROS does not send an ack and the lease table is not updated.

The Squeezebox attempts to renew its lease when it is half way through its current one (e.g. it will attempt to renew a four day lease after two days). The following tables show what happens and what I think should happen. They assume a lease time of 20 seconds, but the problem occurs whether the lease time is 10 seconds or 7 days. SQB=Squeezebox, ROS=ROS

What actually happens:
00:00:00 - SQB - discover
00:00:00 - ROS - offer 192.168.44.4
00:00:00 - SQB - request 192.168.44.4
00:00:00 - ROS - ack 192.168.44.4
00:00:10 - SQB - request 192.168.44.4
00:00:10 - ROS - ack 192.168.44.4
00:00:20 - ROS - deassign 192.168.44.4
00:00:20 - SQB - request 192.168.44.4
00:00:23 - SQB - request 192.168.44.4
What I think should happen
00:00:00 - SQB - discover
00:00:00 - ROS - offer 192.168.44.4
00:00:00 - SQB - request 192.168.44.4
00:00:00 - ROS - ack 192.168.44.4
00:00:10 - SQB - request 192.168.44.4
00:00:10 - ROS - ack 192.168.44.4
00:00:10 - ROS - update lease expiration time to 00:00:20
00:00:20 - SQB - request 192.168.44.4
00:00:20 - ROS - ack 192.168.44.4
00:00:20 - ROS - update lease expiration time to 00:00:20
00:00:30 - SQB - request 192.168.44.4
00:00:30 - ROS - ack 192.168.44.4
00:00:30 - ROS - update lease expiration time to 00:00:20
00:00:40 - SQB - request 192.168.44.4
etc. etc.
The DHCP debug logging information attached confirms that what I say is happening is actually happening!

I also have packet captures which show this happening too. There are no firewall rules which could drop packets and I am at a complete loss as to why this is happening.

Am I missing something? Is the behaviour I am seeing correct? If so, where does the fault lie?

Comments?
You do not have the required permissions to view the files attached to this post.
 
User avatar
NAB
Trainer
Trainer
Topic Author
Posts: 542
Joined: Tue Feb 10, 2009 4:08 pm
Location: UK
Contact:

Re: DHCP problem - sanity check before I e-mail support please

Sun Feb 21, 2010 8:26 pm

Update:

I have found some devices in the house which have exactly the same problem and others which work properly - that is they renew leases and have the lease expiration time updated by ROS.

Renewal request from a 'broken' device:
Milliways received request with id 3028524073 from 192.168.44.4
flags = broadcast
ciaddr = 192.168.44.4
chaddr = 00:04:20:05:5C:B9
Msg-Type = request
Server-Id = 192.168.44.254
Address-Request = 192.168.44.4
Parameter-List = Subnet-Mask,Router
Renewal request from a 'working' device:
Milliways received request with id 3754062152 from 192.168.44.7
ciaddr = 192.168.44.7
chaddr = 00:22:68:68:6C:57
Msg-Type = request
Client-Id = 01-00-22-68-68-6C-57
Host-Name = "winpc"
Unknown(81) = 00-00-00-69-63-6B-6C-65-5F-62-6F-79-2E
Class-Id = "MSFT 5.0"
Parameter-List = Subnet-Mask,Domain-Name,Router,Domain-Server,NETBIOS-Name-Server,Unknown(46),Unknown(47),Unknown(31),Static-Route,Unknown(249),Vendor-Specific
Vendor-Specific = DC-01-00
So it looks like ROS can't cope with a renewal request when either one (or more) of the following fields is missing:
Host-Name,
Client-Id,
Vendor-Specific,
Unknown(81) or
Class-Id
or if one or more of the following fields are in the request:
flags,
Server-Id or
Address-Request
Strange, very strange. I suppose I'd better read the RFC and see what is acceptable and what isn't.

However, this doesn't stop it being a bug with ROS - after all, it's responding with an 'ack' when either it shouldn't be or it's not correctly updating its own lease tables for some reason.
 
User avatar
nz_monkey
Forum Guru
Forum Guru
Posts: 2103
Joined: Mon Jan 14, 2008 1:53 pm
Location: Over the Rainbow
Contact:

Re: DHCP problem - sanity check before I e-mail support please

Mon Feb 22, 2010 12:33 am

I have a Squeezebox Boom connected via wifi to an RB600 at home, it also receives it's DHCP lease from the RB600 as does the PC that is running the Squeezebox server software. It has been running for about a year now with 0 issues and I have run every single RouterOS release on it since early 3.x. That RB600 is my production test box that I load new versions on to see if they are stable enough for production.

I am doing nothing out of the ordinary, it all just worked.


Maybe it is something specific to your environment, e.g. dodgy switches, or something specific to that model of RouterBoard.

I can get dumps from my environment if you need ?
 
User avatar
NAB
Trainer
Trainer
Topic Author
Posts: 542
Joined: Tue Feb 10, 2009 4:08 pm
Location: UK
Contact:

Re: DHCP problem - sanity check before I e-mail support please

Mon Feb 22, 2010 11:38 am

It's not the DHCP client that's the problem - it's definitely a bug in ROS.

The fact that ROS sends an 'ack' when a renewal request is received, but then doesn't update the lease expiration time is enough to show that it's ROS that has the problem. The fact that it then ignores subsequent requests just reinforces this.
 
User avatar
nickshore
Long time Member
Long time Member
Posts: 521
Joined: Thu Mar 03, 2005 4:14 pm
Location: Suffolk, UK.
Contact:

Re: DHCP problem - sanity check before I e-mail support please

Mon Feb 22, 2010 12:07 pm

I have seen the same problem with a box disappearing, which only started when I started using an RB750 as my DHCP server.
 
gr0mit
newbie
Posts: 37
Joined: Wed Feb 25, 2009 5:07 pm

Re: DHCP problem - sanity check before I e-mail support please

Mon Feb 22, 2010 12:20 pm

Now this is interesting.
I have an HP printer to which I assign a fixed IP based on MAC address using DHCP and RB750
On a couple of occasions I have seen it fall off the network, i.e. it is assigned an IP from the pool rather than its static address. I had to reboot the RB and printer and it got its correct IP back again.

There is definitely something up with DHCP.
No traces, can't recall which s/w was on the RB - sorry!
 
johnnyd
just joined
Posts: 2
Joined: Mon Feb 22, 2010 12:41 pm

Re: DHCP problem - sanity check before I e-mail support please

Mon Feb 22, 2010 12:54 pm

This is very interesting.....I have had DHCP issues since first configuring my RB450G and 433AH, all works well for a while, then for no obvious reason, some of my devices end up with a 168.x.x.x. when trying to renew/refresh the lease. I have deleted the config numerous times but always the problem returns. There is no issue with the network as previously the W2K3 server offering DHCP worked fine.

JD

Who is online

Users browsing this forum: Ahrefs [Bot] and 135 guests