I didn't figure out the script, but was able to accomplish the end state by adding a mgmt vlan IP, the logging into that IP to change the CLIP/loopback. Then login to the new CLIP/loopback and remove the temporary mgmt vlan.
vlan create 699 name "MGMT-TEMP" type port 0
vlan i-sid 699 10699
#Create temporary mgmt vlan and a static route. I only added a route for the subnet I was accessing the VSP from.
mgmt vlan 699
ip address 10.99.99.250 255.255.255.0
ip route 192.168.10.0/24 next-hop 10.99.99.251
enable
exit
#NOW SSH TO THE NEW, TEMP MGMT IP AND CHANGE THE CLIP/LOOPBACK IP
mgmt clip
no ip address 10.1.1.28
ip address 172.31.1.36/32
exit
#NOW SSH TO THE NEW MGMT CLIP/LOOPBACK IP
no mgmt vlan
Original Message:
Sent: 12-13-2021 10:58
From: bfaltys
Subject: Script to change management IP
I am working on upgrading a bunch of devices from 8.1.5.0. to 8.4.2.1. Currently they are using a CLIP/loopback as the management IP. I am setting the migrate-to-mgmt flag to maintain access to the devices. I would like to figure out if there is a way to run a few commands from a script like you can with the ERS switches so that I can remotely change the management addresses to our new IP scheme without cutting myself off since I must delete the old IP before I can configure the new one.