ā01-18-2023 02:28 PM
I am planning to change management IP for an svi and "ip default-gateway" on cisco C9200L from one subnet to the other but am afraid I might lose connection.
currently mgmt svi and ip default-gateway are on 10.117.20.x and wanted to have them changed to 10.120.20.x
any suggestions to make this smooth is much appreciated.
Thank you as I look forward to reading f
ā01-18-2023 02:50 PM
Are you connecting to the same IP address and changing the same IP address, that will break the connection.
Are you able to get the Console connection and change that (is that possible ?)
Another option I can think of is for EEM Script to run a certain Time and change the IP automatically (do not save the Config)
There is another script after an hour or so EEM to reboot the switch (in case you are not able to reach the new IP address) - you can also reload the timer another way.
ā01-18-2023 03:00 PM
unfortunately,it is remote and I don't have console server installed.
will try to look into EEM option
Thanks for your help BB
ā01-23-2023 12:37 PM
no worries let us know how that goes..I have tried before this practice all good and tested.
ā01-18-2023 03:03 PM
I have idea I dont no if it work or not,
you can ssh to next L3 and from there if you have L2 connect to SW then you dont need GW and hence you can access to SW even if GW is change.
check this solution
ā01-18-2023 03:03 PM
I have idea I dont no if it work or not,
you can ssh to next L3 and from there if you have L2 connect to SW then you dont need GW and hence you can access to SW even if GW is change.
check this solution.
ā01-18-2023 03:25 PM
You may want to create a default route for the new subnet and then remove the default gateway. As long the next hop for the default route is valid, you should be able to get back to the switch. In order to add a default route, you would need to enable "ip routing" on the switch.
ip default-gateway 10.117.20.x
ip route 0.0.0.0 0.0.0.0 10.120.20.x
Once this is completed and you can access the device, you can go back and change the default route back to default gateway or leave it as it is.
ip default-gateway 10.120.20.x
no ip route 0.0.0.0 0.0.0.0 10.120.20.x
ā01-18-2023 03:31 PM
Thank you Sharifi,
make sense
I will give it a try and let you know
Much appreciated
ā01-18-2023 03:49 PM
Please proceed with caution, as most likely in the transition you will lose your connection, and you need to re-establish the connection.
Also, since you are completely changing the subnet, make sure the route is valid. It would have been much easier if you were using the same subnet/IP.
HTH
ā01-18-2023 11:34 PM
An alternative would be to put the config commands into a text file and then on the 9200 tftp the file to running config. This should allow all commands to be executed. As @Reza Sharifi reminds us you should proceed with caution so I suggest these steps:
1) put the commands into a text file on a machine that can function as a tftp server.
2) on 9200 use reload in 10 to schedule a reload
3) on 9200 tftp the file to running config
4) if the process was successful you should be able to access the 9200 and then cancel the scheduled reload. If the process was not successful the scheduled reload will revert back to the original working config and you can figure out why it did not work and try again.
ā01-23-2023 09:50 AM
Tried this last night and lost remote connection as soon as I typed: ip routing.
ā01-23-2023 11:14 PM
Sorry to hear that the changes did not go well. I hope that you had used my suggestion about scheduling a reload.
In reading through the discussion and focusing on the suggestion about enabling ip routing the outcome might have been predicted. The switch had been operating as layer 2 and using the default-gateway command for access to remote resources. But as soon as you enter ip routing the switch becomes a layer 3 device and the default-gateway command is ignored. I wonder if you had entered the command for the static default route before the ip routing command if things might have worked.
ā01-27-2023 10:02 AM
Thanks Richard,that's exactly how I did it,started with ip routing and lost connection immediately.
I have a couple of them to be re-iped ,am going to try again starting with default route first and ip routing second.
I will kee you posted.
ā01-27-2023 10:05 AM
I will run lab and check my suggestion.
ā01-28-2023 11:14 PM
You might also try my suggestion of putting the commands into a text file and tftp the file to running config. (and schedule a reload before you tftp. if the changes are successful you connect again and cancel the reload and if there was some problem with the changes the reload reverts to the previous config.)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide