Reordered ip and port setup