Changing the VLAN-ID of an interface in a bridge with minimal downtime

Our upstream-provider needed to change the VLAN-ID of our uplink to be in line with their policies. We wanted to do this with minimal downtime. Check out the script we ran on the gateway machines, the VLAN-IDs were changed almost instantly, total unavailability was less than a second.
More...