modified add_host to generate MACs automatically