How to allocate the interface specified by DHCP to fixed IP
Have you seen this:
https://help.mikrotik.com/docs/display/ROS/DHCP
…

Upstairs, it is the binding MAC address. If the online notebook is often changed, the binding MAC must not work
Upstairs, fixed IP is assigned to the specified MAC address, not interfaces. For example, my router has 24 interfaces. I think the IP address assigned to the network cable of interface 10 is 192.168.1.10, and the IP address assigned to the network cable of interface 11 is 192.168.1.11, and so on. How to set this way, because the online client is a laptop, which is always changing, and there is no way to assign IP address according to Mac
My apologies, I do not understand your situation or the requirements.
perhaps draw a network diagram??
and there is no way to assign IP address according to Mac
Why ?
The “port” of the router/switch is irrelevant, ultimately it is the CLIENT MAC-address that determines which IP it will receive.
Using the Mikrotik-DHCP service, you cannot “force” (to my knowledge) a device to receive 192.168.1.10 when plugged in Port10 or 192.168.1.17 when plugged in Port17 because I think this is what you are looking for?
“the online client is laptop, which is always changing” => Is this a MAC-book or Android device ? Check if there is a setting “Privacy” on the network-setting that makes RANDOM MAC-ADDRESSES making it indeed impossible to provide a specific IP to certain MAC.
Android phone on their Wifi have the same setting, iOS devices also.
To be honest, this is a wild guess from my part as your question/requirement is almost not understandable!
Because the laptop changes at any time, of course, the MAC changes at any time, and the IP changes at any time, so it can’t be fixed
ok, i see…
As far as i know you can’t bind the port number with a specific IP…
There might be hundreds of different solutions but i am missing the reason why you want to bind the port with a specific IP… what is the benefit ?
Requirements: the PC connected to port 10 of the router can obtain a fixed IP address each time.
Demand analysis:
Turn on the DHCP function on the router. The addresses obtained each time are different. Although DHCP binding can be done, only the specified PC can be bound (IP is allocated according to the MAC of the PC). If the PC changes the network card (the MAC of the PC changes), the binding configuration needs to be changed, which is more troublesome
If there are dozens of computers in the office and someone secretly mines, there is no way to trace them. If they are assigned a fixed IP, they know which IP used by the office is easier to trace
If you don’t mind having a separate VLAN (and, therefore, subnet) at each port, you could do it that way, having a separate DHCP server for each VLAN (or for the ethernet port directly). But the lease time would have to be short, so that the lease could expire between disconnection of one PC and connection of the other one.
Use VLANs ( for the clients ) for network segmentation and Firewall rules to protect your Local network then…
vlan does not work, because of the special requirements of the network, all computers must be in the layer 2 network
I guess the only other possible solution would be to use RADIUS as backend for DHCP server … if switches support remote-circuit-id property …
mac based VLAN then.. all unknown MAC addresses can be added to a specific VLAN that has no access to resources that it shouldn’t…
So if an unknown MAC connects to the network, it won’t be able to access any of the local network resources… If on the other hand, that MAC should be able to access the local network, then you will manually add it to the allowed VLAN…
Yep, perhaps with a 802.1X NAC / Separate DHCP setup there might also be some option here, but this is getting really complex for a “problem” that should not be fixed at NETWORK layer.
Does the official switch have the function of assigning fixed addresses according to the port of the switch? Which God knows
IP assignment according to the Port ID as far as i know no… but i think that has already been answered…