Community discussions

 
dragon2611
Member Candidate
Member Candidate
Topic Author
Posts: 152
Joined: Fri Sep 25, 2009 12:06 am

DHCP woes

Tue Sep 29, 2009 11:14 pm

I recently bought a routerboard 750 to try routerOS.

I was previously loadbalancing 2 lines with pfSense but wanted to try MLPPP bonding, i replaced my pfsense box with the RB750 and the problem i'm having is my PC upstairs refuses to get a DHCP lease yet works fine if i manually set an IP on the interface.


I've defined the DHCP pool as 192.168.2.100 - 192.168.2.150 with a gateway and dns of 192.168.2.1, the RB750 has had it's IP set to this.

My pc upstairs is connected to a Linksys WRT160N (DD-WRT) which is in client bridge mode to another (WRT160N w DD-WRT in AP mode)
The 160N's have DHCP and routing disabled, so they're just acting as AP/Switches.

This configuration worked fine with pfSense and pretty much any other router ive used, however with the RB750 the pc connected to the 160N upstairs wont get an Ip, the IP phone connected to the same AP does,

Also Laptops and devices that are connecting directly to the AP downstairs seem to be able to DHCP an IP just fine :shock:
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: DHCP woes

Wed Sep 30, 2009 9:50 am

what is your OS that tries to get the ip address? Basically, if something is able to get IP, there is no reason why other devices could not do the same. Check your firewall, maybe it has something to do with it.
 
dragon2611
Member Candidate
Member Candidate
Topic Author
Posts: 152
Joined: Fri Sep 25, 2009 12:06 am

Re: DHCP woes

Wed Sep 30, 2009 10:21 am

what is your OS that tries to get the ip address? Basically, if something is able to get IP, there is no reason why other devices could not do the same. Check your firewall, maybe it has something to do with it.

I figured out what it is (with the help of some people in irc) it's the computers on the wireless bridge are sending a giaddr of 192.168.1.253 (the wireless bridge's ip) and the dhcp server isn't giving them an address.

If i set relay in the DHCP server options to 192.168.2.253 then it works for the devices that connect via the bridge but not for the devices that are connected directly to the downstairs AP or it's switch (which as i cannot run cables everywhere is most of my network)

For now i've disabled the DHCP totally and used the one in the AP thats connected to the the routerboard (I've set it so it knows the RB is the default gateway) Although the AP does hand it out it's own ip as the gateway to the clients but then forwards the traffic onto the RB , this works although it introdues an extra hop.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: DHCP woes

Wed Sep 30, 2009 4:19 pm

giaddr field is set if you have dhcp-relay set up (or something equal is other vendor) in that case, dhcp server sees the request with giaddr set and ignores that because it has nothing to do with something that is not configured to work with.

you can just set another dhcp-server to give addresses out to relay. You can do so from same address pool you are using for first. Just split pool, so each of servers have own pool, that is still in same broadcast network.
 
dragon2611
Member Candidate
Member Candidate
Topic Author
Posts: 152
Joined: Fri Sep 25, 2009 12:06 am

Re: DHCP woes

Wed Sep 30, 2009 4:24 pm

giaddr field is set if you have dhcp-relay set up (or something equal is other vendor) in that case, dhcp server sees the request with giaddr set and ignores that because it has nothing to do with something that is not configured to work with.

you can just set another dhcp-server to give addresses out to relay. You can do so from same address pool you are using for first. Just split pool, so each of servers have own pool, that is still in same broadcast network.

I tried setting up another DHCP server with another pool however if I do that it just breaks DHCP for the entire network

The wired > wireless bridge is not setup to relay DHCP so I was a bit surprised when the giaddr was changed to the bridge.

What's more interesting is every other DHCP server i've used doesn't care about about the giADDR it seems.

I've used Netgear, Linksys, DD-WRT and PFsense in the past, all of those would work with this network configuration.

Is there anyway to tell the DHCP to unilaterally answer any DHCP request that hits it regardless of the GIaddr field contains?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: DHCP woes

Thu Oct 01, 2009 10:35 am

i more wonder why giaddr field is changed by your bridge.

RouterOS dhcp-server will ignore requests that comes with giaddr set, as that means it has to have relay configured, if it is not, then request is addressed to another dhcp-server.

adding second dhcp-server with relay ip address set should not change anything how your current server works. As there are strict rules when dhcp-server should and should not answer to requests.

Alsom as i mentioned before - two dhcp-servers cannot share one address pool, because of that you have to divide pool in to, for example if you have network 192.168.0.0/24, then make 2 pools with addresses 192.168.0.2-192.168.0.127 and second one 192.168.0.128-192.168.0.254 assuming that your router address on that interface is 192.168.0.1
 
dragon2611
Member Candidate
Member Candidate
Topic Author
Posts: 152
Joined: Fri Sep 25, 2009 12:06 am

Re: DHCP woes

Thu Oct 01, 2009 11:15 am

i more wonder why giaddr field is changed by your bridge.

RouterOS dhcp-server will ignore requests that comes with giaddr set, as that means it has to have relay configured, if it is not, then request is addressed to another dhcp-server.

adding second dhcp-server with relay ip address set should not change anything how your current server works. As there are strict rules when dhcp-server should and should not answer to requests.

Alsom as i mentioned before - two dhcp-servers cannot share one address pool, because of that you have to divide pool in to, for example if you have network 192.168.0.0/24, then make 2 pools with addresses 192.168.0.2-192.168.0.127 and second one 192.168.0.128-192.168.0.254 assuming that your router address on that interface is 192.168.0.1
I did that, although i'll do it again just to make sure I didn't mess it up the first time.

I'm not sure why the bridge is changing the giaddr, perhaps a bug in DD-WRT? Or just the idiot who set it up :lol:
It's not really designed to be used as a bridge it's a cable/dsl router but thanks to the 3rd party firmware it can be changed to a "client bridge"
 
dragon2611
Member Candidate
Member Candidate
Topic Author
Posts: 152
Joined: Fri Sep 25, 2009 12:06 am

Re: DHCP woes

Thu Oct 01, 2009 10:04 pm

i more wonder why giaddr field is changed by your bridge.

RouterOS dhcp-server will ignore requests that comes with giaddr set, as that means it has to have relay configured, if it is not, then request is addressed to another dhcp-server.

adding second dhcp-server with relay ip address set should not change anything how your current server works. As there are strict rules when dhcp-server should and should not answer to requests.

Alsom as i mentioned before - two dhcp-servers cannot share one address pool, because of that you have to divide pool in to, for example if you have network 192.168.0.0/24, then make 2 pools with addresses 192.168.0.2-192.168.0.127 and second one 192.168.0.128-192.168.0.254 assuming that your router address on that interface is 192.168.0.1
I did that, although i'll do it again just to make sure I didn't mess it up the first time.

I'm not sure why the bridge is changing the giaddr, perhaps a bug in DD-WRT? Or just the idiot who set it up :lol:
It's not really designed to be used as a bridge it's a cable/dsl router but thanks to the 3rd party firmware it can be changed to a "client bridge"

Turns out it was the idiot who set it up (me), Having 2 pools does indeed work, I must have done something wrong the first time I tried.

Still not sure why that bridge is changing the GIaddr but at least dhcp is working now.
 
rpress
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Thu May 07, 2009 5:13 am

Re: DHCP woes

Fri Oct 02, 2009 1:41 am

Yes DD-WRT relays the DHCP for some weird reason. I've had this same issue, and adding that relay to the same pool solves the problem.

Who is online

Users browsing this forum: Bing [Bot] and 52 guests