Hello there!
New Mikrotik user here, almost networking newbie, decent with following instructions and extrapolating from there.
I got and RB5009 (reset to default) and a cAP ax. The cAP ax is a DHCP client. Planning to have 6 network ranges for various purposes: 10.10.0.x through 10.10.40.x - static DHCP and 10.10.50.x dynamic for guests.
Changed the DHCP server’s network to 10.10.0.0/16
Created a new IP pool with 10.10.50.2-10.10.50.50.
Added that pool to the “defconf” DHCP server.
Added all my static DHCP addresses via the terminal “/ip dhcp-server lease add address=10.10.0.2 mac-address=xx:xx… client-id=ap1 server=defconf lease-time=30m”
Execute a “release-renew” on the cAP ax → got an IP in the .50. range instead of the set 10.10.0.2
Added a static lease for my Android phone → it doesn’t get the right address and complains about lack of internet.
I’m not sure what am I doing wrong here, but I feel I am skipping some important step. Any help would be greatly appreciated.
Thanks!
PS: At times, some of the devices on the network pick up the right addresses (a couple of google home, ESPhome, shelly’s etc)
PS2: I hope I have put all the relevant details. I’m tired after a weekend of fighting this thing and it’s quite late in this part of te world.
You’ve mistaken the meaning of client-id. You should either leave that field empty (cleared) in the static leases, or the value of the field must exactly match the client identifier that the DHCP clients send with Option 61. For most devices, MACID will be used so they will send the client Id in the form of 1:mac-address-lowercase-without-leading-zeros but it depends on devices and operating system (some Linux distros might use DUID-LLT).
You should only set client-id if you know the exact value that the devices will send with the request. Most of the time you have that field set when you convert a dynamic lease to a static lease using the “Make Static” function. Otherwise leave that field empty!
If you set a value for client-id in your static lease entry, then that lease entry will only be used if the value exactly matches the value sent by the client with the DHCP Option 61.
Yep. What @CGGXANNX said, don’t fill out the client-id. It’s useful in only very specific cases.
You haven’t put all the relevant info in your post, for properly reviewing your actual setting, a configuration export is usually useful additional to your description. This can be creates with the
“/export file=whetever.txt” command. If posted, please use code blocks for easier reading, its three reverse apostrophes.
That you don’t have network access and your description suggests that your network(s) are setup in a nonsensical way.
If you are really trying to have 6 separate networks, then do that. That means 6 gateway addresses, 6 networks with netmasks, 6 dhcp server, stc.
What you’re currently doing is setting up a single network and assigning addresses to devices from separate address ranges. This is usually not what people want.
Thank you for your answers! Sometime between 3 and 4 AM last night (woke up because of the heat) I actually managed to figure out that it was because of the client-ID. Removed them and now everything works. I added the client names to the comments so that I can easily track which device is which.
After using Asus-Merlin for almost a decade, I assumed that cliend-ID is a sort of identifier or host field. I was wrong. @lurker888 I am setting up 6 networks (might reduce that to 4-5) because I am planning to implement VLANs sometime in the future. I am not 100% sure that what I am doing is correct, but I am learning as I go.
After I finish migrating the whole network to the new infrastructure, I will start digging for VLAN tutorials.
Thank you again!
If I was in your shoes, I’d start building VLAN-enabled network with the new infrastructure devices and then migrate devices from the old network(s) … less possibility to break anything while learning the right way of doing it.
IMO it’s a PITA to convert existing LAN to VLAN-enabled network without too many disturbances.
Well… I guess there is no virtual playground where to try setting up the VLANS and then apply the knowledge on the actual infrastructure.
Right now I am mostly migrated. I only have the wired part on the old router. But I’ll save the Mikrotik config and start over with VLANs. At least now I learned the basics and realized things are not so complicated as others make them look like. I still have a few days until the fiber is installed (one of the reasons I got the RB5009 was to avoid an extra ISP provided modem and its monthly costs).
Thank you!