Page 1 of 1

Rename network interface ?

Posted: 07 Jun 2024 09:55
by infraerik
General AOS6/8 question as I'm inheriting a brownfield environment where everything was done manually and I'm trying to normalize things. Specifically I have a wide variety of interface names being used like :

Code: Select all

ip interface "Administration" address x.y.z.a mask 255.255.255.0 vlan 1 ifindex 1
ip interface "administration" address x.y.z.a mask 255.255.255.0 vlan 1 ifindex 1
ip interface "admin" address x.y.z.a mask 255.255.255.0 vlan 1 ifindex 1
ip interface "management" address x.y.z.a mask 255.255.255.0 vlan 1 ifindex 1
ip interface "MGMT" address x.y.z.a mask 255.255.255.0 vlan 1 ifindex 1
(not to mention all of the misspellings - sigh)

I can't seem to find any methods for renaming the interfaces. If I use the same IP with a different name I'll get a conflict. The two options I've thought of so far are :
  • Manually modifying the configuration file and rebooting (hard to find maintenance windows for reboots)
  • Adding a new IP address, connecting via the new address, doing a no ip on old conf and then replacing, reconnecting and deleting the new IP (tedious but looks fairly safe)
Comments or recommendations?

Re: Rename network interface ?

Posted: 10 Jun 2024 03:50
by ruemelin
Hi,

I already had the same thing for renaming interfaces and as far as I remember I did it in one line like
no ip interface "admin" && ip interface "Administration" address x.y.z.a mask 255.255.255.0 vlan 1 ifindex 1
as the console is a linux it will also run the second command after the first one was successfull, even if you loose the connection by the first one.
If this is to risky I would suggest your point in fist adding a temp IP, delete the old and recreate with new name and delete the temp interface.

best Regards

Re: Rename network interface ?

Posted: 14 Jun 2024 01:22
by Sean79
Hi there,

I see what you mean, and your one-line method is indeed handy for saving time. However, for those of us who like to have everything synchronized to the millimeter, like our calendar, I find that adding a temporary IP address and proceeding in stages guarantees a smoother transition and less stress if something goes wrong.