extracted port configuration to a single place.