switch the node pairs in one direction link table