Community discussions

MUM Europe 2020
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

[SOLVED] RB450G dhcp server not oferring leases

Fri Mar 04, 2011 11:50 am

Hi!

While configuring router for static leases only i encountered problems with Windows XP SP3 DHCP clients. Everything works fine while using Win7 and Linux, as they send DHCP Discover with bootp flag unset 0x0000 (unicast). Windows XP sends DHCP Discover with bootp flag set 0x8000 (broadcast) and RB450G doesn't reply at all. The same computer booted with linux works fine. My server has configuration like below:

/ip dhcp-server
add add-arp=yes address-pool=static-only always-broadcast=yes authoritative=yes delay-threshold=10s disabled=no interface=bridge lease-time=30m name=dhcp

Any clues?

Edit:
I'm using RouterOS 4.17, same happened on 5.0rc10, so I downgraded thinking it might help.

Edit2:
The problem was my misunderstanding of field "client-id" in lease properties which I filled with hostname for easy identification of leases. With field cleared everything works fine. Thank you all for your time and help and sorry for the fuss.
Last edited by tiggda on Thu Mar 17, 2011 1:47 pm, edited 1 time in total.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: RB450G dhcp server not oferring leases

Fri Mar 04, 2011 4:16 pm

you set up only dhcp-server, have you set up network?
 
User avatar
savagedavid
Trainer
Trainer
Posts: 310
Joined: Thu Aug 25, 2005 12:58 pm
Location: Cape Town, South Africa
Contact:

Re: RB450G dhcp server not oferring leases

Fri Mar 04, 2011 4:45 pm

Have you enabled logging for DHCP server? e.g.

/system logging add action=memory disabled=no prefix="" topics=dhcp

This will give you much more detailed logs and could provide us with better clues as to the problem.
savagedavid
MTCE+T (MikroTik Certified Everything + Trainer)
MikroTik support and training in South Africa
http://www.mikrotiksa.com
david [at] mikrotiksa dot com
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Fri Mar 04, 2011 5:04 pm

My current configuration is:
ethet1 & ether2 bridged for LAN, dhcp-server running on bridge, LAN ip address on ether1
ether3, 4 & 5 set up for ADSL WAN connectivity, loadbalanced.

DHCP server offers leases for clients like Windows 7 and Linux, outbound connectivity is available. Problem appears when I am connecting Windows XP client, which doesn't receive any reply from DHCP server. I use arp=reply-only on bridge and add-arp=yes on dhcp server.

/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=reply-only auto-mac=yes comment="" disabled=no forward-delay=15s l2mtu=1524 max-message-age=20s mtu=1500 name=bridge priority=0x8000 protocol-mode=none \
transmit-hold-count=6

/interface bridge settings
set use-ip-firewall=no use-ip-firewall-for-pppoe=no use-ip-firewall-for-vlan=no


Logs say:

for Windows XP SP3:
16:00:19 dhcp,debug,packet dhcp received discover with id 1300166428 from 0.0.0.0
16:00:19 dhcp,debug,packet secs = 768
16:00:19 dhcp,debug,packet flags = broadcast
16:00:19 dhcp,debug,packet ciaddr = 0.0.0.0
16:00:19 dhcp,debug,packet chaddr = 00:14:22:BB:DC:37
16:00:19 dhcp,debug,packet Msg-Type = discover
16:00:19 dhcp,debug,packet Unknown(116) = 01
16:00:19 dhcp,debug,packet Client-Id = 01-00-14-22-BB-DC-37
16:00:19 dhcp,debug,packet Address-Request = 169.254.113.112
16:00:19 dhcp,debug,packet Host-Name = "SERWISMOB"
16:00:19 dhcp,debug,packet Class-Id = "MSFT 5.0"
16:00:19 dhcp,debug,packet Parameter-List = Subnet-Mask,Domain-Name,Router,Domain-Server,NETBIOS-Name-Server,Unknown(46),Unknown(47),Unknown(31),Static-Route,Unknown(249),Vendor-Specific
16:00:19 dhcp,debug,packet Vendor-Specific = DC-00
16:00:27 dhcp,debug,packet dhcp received discover with id 1300166428 from 0.0.0.0
16:00:27 dhcp,debug,packet secs = 2816
16:00:27 dhcp,debug,packet flags = broadcast
16:00:27 dhcp,debug,packet ciaddr = 0.0.0.0
16:00:27 dhcp,debug,packet chaddr = 00:14:22:BB:DC:37
16:00:27 dhcp,debug,packet Msg-Type = discover
16:00:27 dhcp,debug,packet Unknown(116) = 01
16:00:27 dhcp,debug,packet Client-Id = 01-00-14-22-BB-DC-37
16:00:27 dhcp,debug,packet Address-Request = 169.254.113.112
16:00:27 dhcp,debug,packet Host-Name = "SERWISMOB"
16:00:27 dhcp,debug,packet Class-Id = "MSFT 5.0"
16:00:27 dhcp,debug,packet Parameter-List = Subnet-Mask,Domain-Name,Router,Domain-Server,NETBIOS-Name-Server,Unknown(46),Unknown(47),Unknown(31),Static-Route,Unknown(249),Vendor-Specific
16:00:27 dhcp,debug,packet Vendor-Specific = DC-00

for Windows 7:
16:01:02 dhcp,debug,packet dhcp received discover with id 577005845 from 0.0.0.0
16:01:02 dhcp,debug,packet secs = 1280
16:01:02 dhcp,debug,packet ciaddr = 0.0.0.0
16:01:02 dhcp,debug,packet chaddr = F0:4D:A2:48:3F:AB
16:01:02 dhcp,debug,packet Msg-Type = discover
16:01:02 dhcp,debug,packet Client-Id = 01-F0-4D-A2-48-3F-AB
16:01:02 dhcp,debug,packet Host-Name = "taygeta"
16:01:02 dhcp,debug,packet Class-Id = "MSFT 5.0"
16:01:02 dhcp,debug,packet Parameter-List = Subnet-Mask,Domain-Name,Router,Domain-Server,NETBIOS-Name-Server,Unknown(46),Unknown(47),Unknown(31),Static-Route,Classless-Route,Unknown(249),Vendor-Specific
16:01:02 dhcp,debug,packet dhcp sending offer with id 577005845 to 255.255.255.255
16:01:02 dhcp,debug,packet ciaddr = 0.0.0.0
16:01:02 dhcp,debug,packet yiaddr = 192.168.1.233
16:01:02 dhcp,debug,packet siaddr = 192.168.1.1
16:01:02 dhcp,debug,packet chaddr = F0:4D:A2:48:3F:AB
16:01:02 dhcp,debug,packet Msg-Type = offer
16:01:02 dhcp,debug,packet Server-Id = 192.168.1.1
16:01:02 dhcp,debug,packet Address-Time = 1800
16:01:02 dhcp,debug,packet Subnet-Mask = 255.255.255.0
16:01:02 dhcp,debug,packet Router = 192.168.1.1
16:01:02 dhcp,debug,packet Domain-Server = 192.168.1.1
 
User avatar
savagedavid
Trainer
Trainer
Posts: 310
Joined: Thu Aug 25, 2005 12:58 pm
Location: Cape Town, South Africa
Contact:

Re: RB450G dhcp server not oferring leases

Fri Mar 04, 2011 5:59 pm

it looks like the XP machine is trying to renew an IP given to itself via Automatic Private IP address. Can you disable that setting and see if anything happens?
savagedavid
MTCE+T (MikroTik Certified Everything + Trainer)
MikroTik support and training in South Africa
http://www.mikrotiksa.com
david [at] mikrotiksa dot com
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Fri Mar 04, 2011 10:20 pm

it looks like the XP machine is trying to renew an IP given to itself via Automatic Private IP address. Can you disable that setting and see if anything happens?
It doesn't matter whether the XP client already has Automatic Private Address or not Discover doesn't work. In case of Win7 it works both ways - with address already set and without. Same with Linux. So my guess is that this BOOTP "Broadcast" flag messes it up. The question "Why and how to fix it?" remains...
 
User avatar
savagedavid
Trainer
Trainer
Posts: 310
Joined: Thu Aug 25, 2005 12:58 pm
Location: Cape Town, South Africa
Contact:

Re: RB450G dhcp server not oferring leases

Sat Mar 05, 2011 10:17 pm

I admit I am also taking a few shots in the dark here. What happens if you uncheck "Always Broadcast"? This essentially stops the DHCP server from sending a broadcast check to see if an address is currently in use. Long shot, but worth a try.
savagedavid
MTCE+T (MikroTik Certified Everything + Trainer)
MikroTik support and training in South Africa
http://www.mikrotiksa.com
david [at] mikrotiksa dot com
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Mon Mar 07, 2011 11:12 am

I admit I am also taking a few shots in the dark here. What happens if you uncheck "Always Broadcast"? This essentially stops the DHCP server from sending a broadcast check to see if an address is currently in use. Long shot, but worth a try.
Nothing changes. There's no difference with "always-broadcast" set or unset for DHCP server or for particular lease. :-(
 
User avatar
savagedavid
Trainer
Trainer
Posts: 310
Joined: Thu Aug 25, 2005 12:58 pm
Location: Cape Town, South Africa
Contact:

Re: RB450G dhcp server not oferring leases

Mon Mar 07, 2011 12:51 pm

Sorry out of ideas then. I have never had any issues with XP myself.
savagedavid
MTCE+T (MikroTik Certified Everything + Trainer)
MikroTik support and training in South Africa
http://www.mikrotiksa.com
david [at] mikrotiksa dot com
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Mon Mar 07, 2011 1:02 pm

I just checked the default configuration and it works well with XP. This is very sad, as i will have to compare configs side by side. Thanks anyway. :-(
 
mikko
newbie
Posts: 37
Joined: Tue Jan 11, 2011 5:18 pm
Location: Finland

Re: RB450G dhcp server not oferring leases

Mon Mar 07, 2011 2:53 pm

Just add address-pool to your dhcp server.

http://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server
Mikko, MTCNA, CCNA
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Mon Mar 07, 2011 3:42 pm

Just add address-pool to your dhcp server.

http://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server
What for? I want to use static-only leases. AFAIK there's no need for pool for that, I only need static leases set up in "/ip dhcp-server leases".
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Mon Mar 07, 2011 3:52 pm

OK, so i just checked whether dynamic pool works and unfortunately it does. Meanwhile static-only works just for Windows 7 and *nix clients. Why is that?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: RB450G dhcp server not oferring leases

Mon Mar 07, 2011 4:04 pm

IMHO windows XP does not use RFC compliant shcp client. And onl y lately they started to care about "those" documents on the internet.
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Mon Mar 07, 2011 4:10 pm

IMHO windows XP does not use RFC compliant shcp client. And onl y lately they started to care about "those" documents on the internet.
Alright, but i need to run a static-only DHCP server in a mixed Win7/XP/Linux environment. Any suggestions how to solve this problem? Upgrading WinXP to Win7 is out of the equation.

Edit:
I upgraded my 450G to 5.0rc11, no change.
It happens only with static-only address pool, works fine with dynamic DHCP.
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Tue Mar 08, 2011 11:15 am

So I diff'ed my and default configuration and I found nothing that would bring me near the solution. Any ideas why dynamic dhcp works fine for WinXP client and static does not?
 
mikko
newbie
Posts: 37
Joined: Tue Jan 11, 2011 5:18 pm
Location: Finland

Re: RB450G dhcp server not oferring leases

Tue Mar 08, 2011 9:51 pm

Just tried with static only addresses and windows xp gets address without problems. And don't get address if there is no entry in leases table. I see that it is working as it should. I am using RB750G and 5.0RC11. Windows XP was home edition with SP3.
Mikko, MTCNA, CCNA
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Sat Mar 12, 2011 4:36 pm

Have you added it manually (/ip dhcp-server lease add...) or have you used make static from dynamic lease? Also I'm testing with Win XP SP3 Professional, but i don't think it would make any difference.

Come on guys, am I the only one with such problem? :-(
 
mikko
newbie
Posts: 37
Joined: Tue Jan 11, 2011 5:18 pm
Location: Finland

Re: RB450G dhcp server not oferring leases

Tue Mar 15, 2011 11:53 pm

By my testing it just do not respond if there is no address to give.

If client tries to renew some old address and server has some new address to give it should first send NAK response to client to tell that old address is not valid anynome. And then client should request new address and server reply with offer and so on.

So in your case, when your XP tries to renew that address, server should send NAK response if it has something to give. And when your setup is working with win7 and linux, and with dynamic address pool, this highly points to that there is some problem with lease entry for xp computer. Have you triple checked static entry?

I have no ideas since tested with XP Pro SP3 too and working. That was from vmWare with bridged adapter, but that should not make difference. Noticed that you have software bridged eth1 and eth2, I think you should have ip set in bridge, but that made no difference in my test results.

If you have converted from static you have those client-id fields set in leases. I think that different dhcp clients could send different client-ids, that could be the problem too.

My setup was default config modified to similar you have and static-only dhcp-server. I tried manually entered leases only.

/ip dhcp-server lease
add address=192.168.88.123 disabled=no mac-address=00:0C:29:45:5C:F5
Mikko, MTCNA, CCNA
 
tiggda
newbie
Topic Author
Posts: 29
Joined: Fri Mar 04, 2011 11:07 am

Re: RB450G dhcp server not oferring leases

Thu Mar 17, 2011 1:29 pm

Now, that is actually strange. I switched to dynamic IP pool, the problematic XP machine got the lease, i added it by 'lease make-static', changed 'address' to one i want, switched dhcp to 'static-only' and now it works :shock:

Who is online

Users browsing this forum: mustafan, Redeire1997, valnuke and 123 guests