Community discussions

MikroTik App
 
lotnybartek
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 97
Joined: Wed Apr 16, 2014 3:22 pm

How does the client choose which DHCP server to get an address from?

Tue Jun 30, 2015 5:02 pm

Router: 2011UiAS-2HnD

I have one DHCP server serving 192.168.1.1-192.168.1.252. "Internet" is on eth1.
Router acts as PPPoE Client to VDSL2 modem.

There is also TP-LINK 1043ND - it gets it's IP from 2011UiAS-2HnD. It's mainly for serving WiFi for restaurant clients and TP-LINK has it's own DHCP server.

I don't want TP-LINK to act as DHCP server - I wan't mikrotik to give out all IPs.

So, I want to create VLAN (for my restaurant clients) on eth1, lets say with second DHCP server - 192.168.10.1-192.168.10.100. VLAN must be separated network.

How does my clients laptops choose which DHCP server to get an address from - the right one?

To clarify:

Client connects to WiFi which is beeing served by TP-LINK. TP-LINK don't have DHCP server (acts as switch?) so it asks Mikrotik for IP. IP must be from VLAN DHCP server.

How to?
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: How does the client choose which DHCP server to get an address from?

Tue Jun 30, 2015 6:30 pm

The clients typically will "choose" the DHCP server that responds the fastest, so there is no real way of controlling that client side, you really only want one DHCP server running on any layer2 segment of a network.

If you want the TPLink to act more like an access point, turn off the DHCP server on it, and connect one of the LAN ports into the rest of the network. The wireless interface is usually bridged with the Ethernet ports on home routers. The better solution though would be to get a device that is designed to be a stand alone access point. I have run into many situations with cheap routers factory defaulting themselves and all of the sudden getting 2 DHCP servers on the network.
 
lotnybartek
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 97
Joined: Wed Apr 16, 2014 3:22 pm

Re: How does the client choose which DHCP server to get an address from?

Tue Jun 30, 2015 7:32 pm

ok this is clear to me.

It's not the problem for me to set up TP-LINK as access point. I just want Mikrotik to give out IPs and separate restaurant clients from office employees - that's all actually. I wanted to do that with VLAN. So it's even doable?
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: How does the client choose which DHCP server to get an address from?

Tue Jun 30, 2015 7:59 pm

It depends on the hardware you have really. The TP-Link likely does not support VLANs and multiple SSIDs, and the switches (if any) between the MikroTik and the TP-Link would also need to support them.
 
ebreyit
Member Candidate
Member Candidate
Posts: 119
Joined: Tue Apr 30, 2013 11:44 am
Location: Shropshire, United Kingdom

Re: How does the client choose which DHCP server to get an address from?

Wed Jul 01, 2015 1:00 am

Easiest way is to connect TP-Link to a different port on the RB2011.

Create a separate lan on that port with it's own IP subnet and DHCP server, set relevant NAT/masqarading rules etc to allow internet access.

The finally either set a blackhole rule in routing or use the firewall to prevent the 2nd Lan from accessing the first.

Who is online

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