use ports attribute only when naming is conflict