For some actions, it may be necessary to bind the IP address to the MAC address of the network card. This may be due to both the desire to achieve maximum security of data stored on the disk space of the machine, and the implementation of specific functions of some applications.
Necessary
Computer with installed network card
Instructions
Step 1
To bind an IP address to the MAC address of a network card, you need to follow a series of simple steps. Start WinBox. Next, select the System item and go to the Sheduler item in the second-level drop-down list.
Step 2
In the new task window that opens, fill in the appropriate text fields. In the Name field, enter a name for the job. Nothing should be changed in the Start Date field, which will indicate the date when the computer started working on the task, and in the Start Time field, which indicates the time when the computer started working on the task. In the Interval text box, which specifies the time interval after which the task will start again, you can specify any interval - for example, one minute, it does not really matter.
Step 3
But the OnEvent field, which describes the algorithm for performing the task itself, should be considered in more detail. A task written in algorithmic language should be entered in this field, which represents the order of actions required to be performed to successfully complete the task. In this particular case, you should enter a script record there, which implements the binding to the MAC address of the network card of the IP address. This entry would be: foreach / i / in [/ip_arpfind_dynamic = yes / interface = VLAN1] _do = {/ ip / arpadd_copyfrom = $ i}. After that, all that remains is to start the task.
Step 4
There is also another way. Create a database file to bind IP to MAC - it might be called, for example, /etc/ethers.local. The lines of the file will contain information about the IP address, the HEX record of the MAC address and the name of the computer in home networks - for example, 192.168.0.10 00: 0c: 5e: 3f: cd: e4 # PC-1, 192.168.0.9 01: 0c: 87: 81: da: a2 # PC-2? Etc.
Step 5
Write a script similar to the following:
arp-ad> 0
I = 2
while [$ I-le254]
do
arp -s 192.168.0.12 {1} 0: 0: 0: 0
I = ex / pr $ I + 1
done
arp ad> null
etc_static.arp
Step 6
The script will allow you to set the correct MAC address by clearing the arp table, binding a zero address, and a set of new addresses from a previously created database file.
Step 7
Make the file you have written executable and add the following line to it: /etc/rc.local/etc/static.arp. Now the server will not broadcast a request for a local IP address, since each of them is rigidly statically bound to the MAC addresses - that is, the task will be completed.