Rename an interface

Hi,

how can I rename an interface without victimizing the rest of the configuration?

For example:

Before:

/interface ethernet 
set 2 mac-address=00:01:18:C4:05:BD name="lan wifi" 

/ip hotspot
 interface="lan wifi" name=wifi_hotspot_server profile=wifi_server_profile

After rename:

/interface ethernet 
set 2 mac-address=00:01:18:C4:05:BD name="lan2" 

/ip hotspot
 interface="lan wifi" name=wifi_hotspot_server profile=wifi_server_profile

use ‘find-and-replace’ function of your text editor when editing the script

when renaming on the live router, all names are changed automatically

I want to rename the interface in a live router (i need to add a vrrp interface without changing rules, hotspot,..).

v.

so just rename it =)

No.
When I rename an interface:

 /interface set "lan wifi" name="eth wifi"

all reference (for example rules, hotspot,…) change into new name.

So if i do this:

 /interface set "lan1" name="lan2"
 /interface add name="lan1"

the rules (for example) point to old interface not to new.

My target is: add a vrrp interface (i2) to an existing ethernet interface (i1) without change rules, hotspot,… that point to the existing ethernet interface (i1 → i2). Something like this:


 /interface set "lan1" name="eth1"
/ip address add address=192.168.1.1/24 interface=eth1
/interface vrrp add interface=lan1

use VRRP as it is intended. Interface name change should change name of the interface in all places in the configuration where it could be chosen as suggested item.

VRRP is inteded to change IP address on the interface and that feature is working as intended.

Perfect answer. Thanks!

v.