We have a Dell N2024 switch stack on the other side of the planet. Our ISP has assigned us a /30 routing network where they have
.165 and we have
.166 is assigned to a server, attached to the switch. I want to move the
.166 IP address to the switch itself by assigning it to a vlan, and changing the server's IP to something else from a different subnet.
The problem of course is that the script is run via a console into the switch which passes through the
.166 machine whose IP I want to swap out! I have a script which works great on a staging system, if I were attached by the serial port there would be no issue. But I tried running the script via ssh in the hope that it would continue to run regardless of whether the console was still attached or not, but sadly it doesn't, and the script aborted at the point where I shut down the ports to the current
.166 machine. A manual reset by staff at the other end took care of that, but I am now back to square one.
The part of the script that is creating the problem is:
! disable GFW bond 2 ports to avoid IP address clash interface range Gi1/0/03, Gi2/0/03 shutdown exit ! create router IP address on router VLAN on old GFW bond2 address interface vlan 4010 ip address xxx.xxx.xxx.166 255.255.255.252 exit
Does anyone know of a way to execute
script apply in some way independent of the console, e.g. an equivalent to
script apply > /dev/null or by creating a timer or some other one-shot mechanism that can execute the script outside of the console context?