Remember that turning airplane mode ON actually effectively turns off all the radios, so no 2G, 3G, 4G, wifi or BT. So you would need to be connected via the usb cable to turn airplane mode OFF again. Though I suppose you could have a tasker app turn it ON then after a delay turn if OFF again. But that doesn't necessarily sort your problem of changing the ip address - unless you have the local dhcp server serve a different address, maybe based on the phone's mac address?
That's my understanding anyway ....
Dave