cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2057
Views
25
Helpful
17
Replies

Changing managment Vlan, maintaning IP

eyazhuk
Level 1
Level 1

Hi, colleagues.

 

I have a task of changing managment Vlan for all devices in the network.

It's rather simple with L3 devices, but some kind of puzzle with access switches, which are 2960 in my company.

Catch is: i have to maitain the IPs, but move it to another interface remotely (via ssh).

So, I can't just do something like

Interface Vlan1
no ip-address
Interface Vlan2
ip address ***

 cause I will loose connectivity on removing address from Vlan1.

Only possibility I see is - making some temprorary interface with temrorary address, than connect to it, move main address, and remove all temp stuff. But it'll take a bunch of time in case of 100+ devices.

It there another way to solve this? Some delayed config load, which will make it possible to load several commands at once, or some "move ip" possibilty?

17 Replies 17

Thanks for sharing the scrypt.
I'll try to modify it for my needs and use later, though it's a bit hard to be right now for me.
Pitty, I can't give two "solutions" in one topic, so just thanks again!

Hello
If you don't have any central management application like prime/lms etc.. You can still make these necessary changes however it will be more administrative

If the switches support it ,One option would be to make the changes from a L2 perspective via clustering so any changes to the L3 addressing wont affect your session on change, but for this to work switches need to be physical connected to the cluster masters ( these masters can be any interconnected switch or just the core switch if they all connect to that)


Example1:
Core switch
cluster enable STAN
show cluster candidates
cluster member 5 mac-address (mac address of switch to change) password (password of switch)
cluster member 6 mac-address (mac address of switch to change) password (password of switch)
cluster member 7 mac-address (mac address of switch to change) password (password of switch)
etc....

show cluster members

Log into switch to make your config changes
rcommand x
(cluster member)

The other option would to install a preconfigured text file into the flash of the switch and append that file to the startup-config of the switch and upon a scheduled reload the new changes would be applied

Example2:
copy flash:stan.txt startup-config
reload in
(hh:mm)


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

mlund
Level 7
Level 7

Hi

From Seb:s example that we can use it but without reload.

Do the tftp of the running config to the tftpserver.

Edit the file, don't touch anything else but the example,

vlan 3
interface g1/0/1
 switchport trunk allowed vlan add 3
interface vlan 2
 no ip address
interface vlan 3
 ip address 1.2.3.4 255.255.255.0
 no shut

 

Now upload the file with tftp to the startup

Now you can do this trick, configure the router, but not with conf term, instead use 

configure mem

then the router starts to configure using the startup config, and it reads the file from the start down to the end, executing every command int the startup, and if everything is as it was before all commands will just be the same, except for the changes You have done from the example. Beware of the fact that you have to have the "no ip address" on the old interface before adding th the address in the new interface.

/Mikael

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco