Automate the port assignments