Community discussions

MikroTik App
 
ingtegration
newbie
Topic Author
Posts: 36
Joined: Fri Sep 11, 2015 6:52 am
Location: Montreal, Quebec , CANADA
Contact:

RouterOS as central DHCP

Wed Dec 02, 2020 4:57 pm

We have many switches doing L3 Routing. I'd like to replace the Microsoft Central DHCP server by our Mikrotik router.
I've done research for this to no avail. Is it even supported by RouterOS?
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: RouterOS as central DHCP

Wed Dec 02, 2020 5:11 pm

I've done research for this to no avail. Is it even supported by RouterOS?
It's because Microsoft people may have a perfect understanding what exactly the Central DHCP Server is doing, but they know nothing about RouterOS, whereas Mikrotik people know the possibilities of the RouterOS DHCP server but have no clue what are the features of the Microsoft Central DHCP server.

So to get any help here, you have to provide the list of required features first. People knowing Mikrotik will then tell you which are supported and which are not.
 
User avatar
jvanhambelgium
Forum Veteran
Forum Veteran
Posts: 989
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: RouterOS as central DHCP

Wed Dec 02, 2020 6:19 pm

Unless you run a smaller shop I would not consider letting a Mikrotik take over DHCP services...
The DHCP-implementation is Windows Server is much more advanced then what you would find on RouterOS.

Eh. Server 2016/2019 has "high available" (not using the old fashioned way of splitting scopes) setup with some clicks, either active/failover of load-sharing scopes.
AD-integrated updating of DNS-records is all there with Microsoft DHCP.
Advanced filtering & policies (provide certain pieces of hardware different scopes based on MAC OUI's for example) which cannot be found on RouterOS

So you clearly need to make the analysis what you need in terms of DHCP-features and then you can check what you can cover with RouterOS.
 
ingtegration
newbie
Topic Author
Posts: 36
Joined: Fri Sep 11, 2015 6:52 am
Location: Montreal, Quebec , CANADA
Contact:

Re: RouterOS as central DHCP

Wed Dec 02, 2020 9:11 pm

I was asking if RouterOS DHCP is able to respond for DHCP resquest from other VLANS / Interfaces which it is not member of. For majority of little shops, it would be perfect.

On larger sites, i want to get rid of the MS DHCP server which i HATE a lot... For these sites, the DHCP service is provided with redundant Linux ISC DHCP.

As for DHCP itself, nothing fancy, just plain old IPv4 adresses along with DNS and default route for little sites.
 
ingtegration
newbie
Topic Author
Posts: 36
Joined: Fri Sep 11, 2015 6:52 am
Location: Montreal, Quebec , CANADA
Contact:

Re: RouterOS as central DHCP

Wed Dec 02, 2020 9:27 pm

Unless you run a smaller shop I would not consider letting a Mikrotik take over DHCP services...
The DHCP-implementation is Windows Server is much more advanced then what you would find on RouterOS.

I know all that.

Eh. Server 2016/2019 has "high available" (not using the old fashioned way of splitting scopes) setup with some clicks, either active/failover of load-sharing scopes.

We hate "clicks" and GUIs over here... But that's just us, no judgement about others liking it.

AD-integrated updating of DNS-records is all there with Microsoft DHCP.
Advanced filtering & policies (provide certain pieces of hardware different scopes based on MAC OUI's for example) which cannot be found on RouterOS
So you clearly need to make the analysis what you need in terms of DHCP-features and then you can check what you can cover with RouterOS.

Analysis done, that was not the point of my question! ;-)

More advanced usage is handled by redundant ISC DHCP servers.
Simple setup with basic DHCP on RouterOS would be perfect for little shops. We have many little shops without M$ servers (Linux / Samba).

Thanks for your answer.
 
ingtegration
newbie
Topic Author
Posts: 36
Joined: Fri Sep 11, 2015 6:52 am
Location: Montreal, Quebec , CANADA
Contact:

Re: RouterOS as central DHCP

Wed Dec 02, 2020 9:42 pm

It's because Microsoft people may have a perfect understanding what exactly the Central DHCP Server is doing, but they know nothing about RouterOS, whereas Mikrotik people know the possibilities of the RouterOS DHCP server but have no clue what are the features of the Microsoft Central DHCP server.

So to get any help here, you have to provide the list of required features first. People knowing Mikrotik will then tell you which are supported and which are not.

I never talked about "features", just plain old DHCP with IPv4 address, DNS and Default Gateway (which is indeed supported by ROS). Switches handle the L3 Routing and forward the DHCP resquests (ip-helper) to a "central" DHCP server.

I know both M$ and RouterOS very well. Only thing is, i checked RouterOS documentation and it isn't clear if it is supported for the use case i describe.

I found:
https://robert.penz.name/615/howto-conf ... cp-relays/

I know it's an old post but it seems at least it worked back then. I tested it, it doesn't work. It's a simple task and RouterOS covers it sufficiently good for basic setups so it shouldn't be too complicated to support queries from another subnet / segment.

Thanks for your answer.
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: RouterOS as central DHCP

Wed Dec 02, 2020 10:12 pm

What's written in that post is how I would do it, so the question is whether the requests from the relays reach the Mikrotik acting as a server and whether the source addresses of those requests are the ones you expect. /tool sniffer and /system logging add topics=dhcp followed by /log print follow-only where topics~"dhcp" are your best friends here.

I remember I had some issues when the requests from the relay were coming via an IPsec tunnel, as the DHCP server was sending the responses from the interface to which it was attached and the IPsec policy did not match those responses. So make sure the DHCP server is attached to the interface through which the relayed requests arrive, and it must be an L2 interface (no GRE, IPIP and alike).
 
ingtegration
newbie
Topic Author
Posts: 36
Joined: Fri Sep 11, 2015 6:52 am
Location: Montreal, Quebec , CANADA
Contact:

Re: RouterOS as central DHCP

Wed Dec 02, 2020 10:33 pm

What's written in that post is how I would do it, so the question is whether the requests from the relays reach the Mikrotik acting as a server and whether the source addresses of those requests are the ones you expect. /tool sniffer and /system logging add topics=dhcp followed by /log print follow-only where topics~"dhcp" are your best friends here.

I remember I had some issues when the requests from the relay were coming via an IPsec tunnel, as the DHCP server was sending the responses from the interface to which it was attached and the IPsec policy did not match those responses. So make sure the DHCP server is attached to the interface through which the relayed requests arrive, and it must be an L2 interface (no GRE, IPIP and alike).


The ROS interface is indeed L2 (VLAN). I'll do packet sniffing and see what the router is receiving.

Thanks.
 
ingtegration
newbie
Topic Author
Posts: 36
Joined: Fri Sep 11, 2015 6:52 am
Location: Montreal, Quebec , CANADA
Contact:

Re: RouterOS as central DHCP

Thu Dec 03, 2020 12:01 am

At the end, confirmed to work.
CCR1009 ether2 - 10.3.10.1 <==> 10.3.10.2 - ether 1/24 EdgeCore ECS2100-28PP switch

Config CCR1009:
/system ntp client
set enabled=yes primary-ntp=199.182.204.197 secondary-ntp=205.206.70.2

/system ntp server
set enabled=yes
 
/ip pool
add name=POOL-10-3-6 ranges=10.3.6.96-10.3.6.250

/ip dhcp-server
add address-pool=POOL-10-3-6 disabled=no interface=ether2 name=DHCP-VLAN6 relay=10.3.6.1

/ip dhcp-server network
add address=10.3.6.0/24 caps-manager=10.3.10.1 dns-server=10.3.10.1 gateway=10.3.6.1 ntp-server=10.3.10.1

Config switch:
interface vlan 6
 ip address 10.3.6.1 255.255.255.0
 ip dhcp relay server 10.3.10.1
 

Thanks for your help guys!

Who is online

Users browsing this forum: ArcTour, haung05, raiser, robertkjonesjr and 97 guests