Optimizing weights of Open Shortest Path First (OSPF)