Automated IP assigning to switches