Two networks and DHCP server

Hello everyone!

Maybe somebody could suggest me..
I have 2 networks 192.168.1.0/24 and 192.168.2.0/24
Network 192.168.1.0/24 only for static IP.
Network 192.168.2.0/24 for other devices.. like mobile phones, ipad.. etc.

I made 2 DHCP servers (one for first network(static), one for second network(dynamic, with pool 192.168.2.2-192.168.2.254))
Problem: I can’t connect to second network(192.168.2.0) dynamically. Only if I write static for mobile(example: 192.168.2.10 for mobile phone)

OS: Routeros, 6.0RC8

Thanks for reading! and sorry for my speech.. English is not my native language.

Make sure that you have an IP Pool assigned to the relevant DHCP server. Post output from /ip dhcp-server for comment.

0 name=“Primary DHCP Server” interface=ether1 lease-time=2h address-pool=primary_pool bootp-support=static authoritative=after-2sec-delay lease-script=“”

1 name=“Secondary DHCP server” interface=ether1 relay=255.255.255.255 lease-time=2h address-pool=secondary_pool bootp-support=static authoritative=after-2sec-delay


and my pools:
0 primary_pool 192.168.1.100-192.168.1.254
1 secondary_pool 192.168.2.2-192.168.2.254

in primary DHCP Server address-pool was static. (now changed to primary_pool because with static it’s doesn’t work)

Are these on the same router? Both DHCP servers show Ether1.

Yes, it’s same router.

I made two networks by ‘alias’

/ip addresses print
0 ;;; primary net only for static ip
192.168.1.1/24 192.168.1.0 ether1
1 ;;; additional net for dynamic ip
192.168.2.1/24 192.168.2.0 ether1

Don’t try to use two DHCP servers. One server can do both the dynamic and static clients even in the different subnets on that one interface. Make sure that you also have the relevant Networks entries for both subnets under /IP DHCP Server.

I have resolved it. Thanks for helping.

I’ve added in /ip/dhcp server/networks new subnet (192.168.2.0/24)
and set to Address Pool (pool for second subnet.. 192.168.2.2-192.168.2.254)
Static address assigned automatically.

Maybe it will useful for somebody.

I have a challenge to setup such network, where there are some systems that required to only access their software but will be on static with different ip range like the server/software, then other on hotspot.

How will I achieve such setup where some systems will have a static only on the range of 192.68.0.x while the hotspot on a different ip range, but all must pass thru the same interface.

Thanks

you can separate them by VLAN’s, or use networks in DHCP options to assign static IP’s to specific MAC’s.,

the only problem I see is you’ll need to add static subnet to Walled Garden on Hotspot so they won’t be asked for authorization