Optimization of ip-mac map build