You can use on the source box:
/ip address export file=ipadd
and this on the destination box:
/ip address import file=ipadd
Getting the file from one to the other is the trick. It may require an local net tftp server, or the like, to relay the files. You could probably do the same with a text file like the suggestions above, and use the tftp server to relay that text file, and “import” with a script.
That is why I put the reference to the previous post. It may be better to use a script to generate a text file, then move it to the new machine, and use another script to install it there.
To me, the challenge is not getting or setting the /ip address of the interface. I can do that in my sleep. It is getting it from one machine to the other.
BTW, see my post in the Beta forum. sftp would be nice, along with the RB433V.
mrz,
i need find and export ip adress and acess list from wlan1 for exemple, I do not know how. My version is 2.9.50
I wish it were possible to explain the controls of the export.
I am already waiting for the tftp, so I have been practicing. Here is the script for the source MT box:
EDIT: This is an array - to - CSV file converter.
Move the file ipaddlist.txt from the source MT box to the target MT box
Here is the code on the second MT box:
EDIT: This is a CSV file - to array converter.
Before you have this set your ip addresses, I would test this for a while to insure it does what you want. Let me know if I made any errors or typos. I tested all except assigning the ip addresses to the interface.
Keeping with standards, the ipaddlist.txt file is a CSV list.
ADD: The test was putting 3 sets of ip addresses (10.0.1.1/24, 10.0.2.1/24, and 10.0.3.1/24) on ether3, then running both routines, and
:env pri
ADD: The script no longer aborts if the CSV file does not exist. It will log it.
To move from system to system is as simple as dragging the file you created from the file list in one winbox interface to the file list in the other system’s winbox and then run the import command.
Hope this helps.
Rod
I love drag-n-drop!!!
Then I guess if the script interpreter could use Winbox, that would be great!
MikroTik has made me lazy! I used to log in to every box to see if it is up and running. What a hassle! Now a script does it at 2AM and emails me the results.
I used to log in to check the voltage on my solar powered units. Now a script keeps a record of the voltage every hour, and email me those at 11PM, unless the voltage drops below 12.5 volts, then it emails me every hour.