rewrite to merge arp and routing tables