assign mac address to network based on their order