When I restore backup of one MT device to another, interfaces of all IP Addresses will be “unknown” since ethernet devices are different. Then I have to manually edit all of them.
I think this can be done by simple command on terminal, but I am not familiar scripting of MT.
For example, I want to change interfaces of all addresses as “ether1” and I type following command:
/ip address set interface=ether1
Then it asks number.
numbers:
I have 188 IP addresses in the address list. What must I type to the above line to change all of them?
Thank you for your reply but I got following error:
[admin@mikrotik] > /ip address {set [find] interface=ether1 };
input does not match any value of interface
Here my address list, there is 188 entry exists now and will be growing. I want to change all (unknown) interfaces as ether1. I can change it manually but always doing this, taking my time.
[admin@mikrotik] > /ip address print
# ADDRESS NETWORK INTERFACE
0 I ***.***.165.6/30 ***.***.165.4 (unknown)
1 I ***.***.170.1/24 ***.***.170.0 (unknown)
2 I ***.***.160.1/29 ***.***.160.0 (unknown)
3 I ***.***.160.9/29 ***.***.160.8 (unknown)
*
*
*
186 I ***.***.161.1/29 ***.***.161.0 (unknown)
187 I ***.***.160.249/29 ***.***.160.248 (unknown)
188 I ***.***.166.25/29 ***.***.166.24 (unknown)
That means there is no interface called “ether1” to assign the IP addresses to. I had assumed there was since you used that name. Replace that part with an interface name that actually exists.