Rename network interface ?

Post Reply
infraerik
Member
Posts: 1
Joined: 07 Jun 2024 09:04

Rename network interface ?

Post 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?
ruemelin
Member
Posts: 14
Joined: 13 Oct 2021 05:44

Re: Rename network interface ?

Post 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
Sean79
Member
Posts: 1
Joined: 14 Jun 2024 01:20
Location: https://syncthemcalendars.com/

Re: Rename network interface ?

Post 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.
Post Reply

Return to “Misc”