Text this: Shortest path technique for switching in a mesh network