Simulation of Link state algorithm