Community discussions

MikroTik App
 
User avatar
senseivita
newbie
Topic Author
Posts: 35
Joined: Fri Jan 01, 2021 4:20 am

How to create multiple DHCP servers in the same interface

Mon May 10, 2021 8:25 pm

I failed for the fouth or fifth time to migrate to CHR again, but the good thing is that I just used another firewall at the edge and this I'm I have no firewall rules to recreate. I want to keep the DHCP server though, make it the master, I liked it that like Windows Server's DHCP it can be edited in a huge script and reload the whole thing at once but it seems zippier and doesn't need special PowerShell remoting or RDP/RDS to edit it. It's also an excuse to keep trying to migrate to CHR without the pressure of offline servers.

From the docu I sort of get that I need to specify the relay IN THE SERVER, it's the first time I've seed this requirement so I'm a hundred. I tried just changing the interface of my existing DHCP servers but it refused to do so because it was already a server in there, I'm paraphrasing.

It doesn't seem so hard except there's a typo, and since this earlier requirement was introduced I'm not not sure which is it, then I remembered about the whole circuit ID and option eighty-something and got me a little more apprehensive about clicking on stuff and break again the network. This is what says in the docs:
/ip pool add name=Local1-Pool ranges=192.168.1.11-192.168.1.100
/ip pool add name=Local1-Pool ranges=192.168.2.11-192.168.2.100
[admin@DHCP-Server] ip pool> print
# NAME RANGES
0 Local1-Pool 192.168.1.11-192.168.1.100
1 Local2-Pool 192.168.2.11-192.168.2.100
[admin@DHCP-Server] ip pool>
I think it's in the second line. In the meantime I removed my ultra-permissive allow all firewall rules and just added a single allow rule input chain, so if I got it right it should allow for CHR-hosted services (like DHCP) but won't actually route. The router has an active interface on every VLAN as the new main router, an regular L3 switch, so far it's there haven't been any issues, but IPv6 is handled by another set of devices this devices have to ton of tools to prevent routing loops so it might already be working harder than it needs to.needed, the counter in the input chain is a little too high for local services:
mikrotik-dhcp.PNG
Could you confirm if I'm the right place?? That is, all I need it to add relay addresses on each DHCP server so they can all share a single interface to be relayed. Just smash the keyboard and I'll take it as a yes. :) Thanks!
You do not have the required permissions to view the files attached to this post.
 
User avatar
senseivita
newbie
Topic Author
Posts: 35
Joined: Fri Jan 01, 2021 4:20 am

Re: How to create multiple DHCP servers in the same interface

Tue May 11, 2021 8:03 am

I found my answer! :D

On article Manual:IP/DHCP Server I had missed:
relay (IP; Default: 0.0.0.0) The IP address of the relay this DHCP server should process requests from: 0.0.0.0 - the DHCP server will be used only for direct requests from clients (no DHCP relay allowed)
255.255.255.255 - the DHCP server should be used for any incoming request from a DHCP relay except for those, which are processed by another DHCP server that exists in the /ip dhcp-server submenu.
Funny enough though, the article says that 255.255.255.255 would accept any relay, hinting at a wildcard of sorts, but, the value itself can only be put once. You can only not know the address of one of your relays, not very practical but in my OCPD head that's not an issue; DHCP is more like an emergency fallback tool rather then basic networking.

Thanks anyway, happy mothers'! :)

Who is online

Users browsing this forum: NimbuS, SMARTNETTT and 37 guests