fixed public network id selection for undefined ip addresses