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. Currently .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

 ! create router IP address on router VLAN on old GFW bond2 address
 interface vlan 4010
 ip address xxx.xxx.xxx.166

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?

1 Answer 1


I was able to solve this as the host I was connected to was also connected to a second port on the switch via a different subnet. I used a backgrounded screen session to keep the connection open and keep delivering commands even when my own connection disappeared. It also allowed me to script a reboot command in case the update failed and I couldn't get in.

  • You should accept your answer so that he question doesn't keep popping up forever, looking for a answer.
    – Ron Maupin
    Nov 17, 2016 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.