Conclusion
This article described how Internet routing works, focusing on the distance-vector and link-state routing approaches used in the RIP and OSPF protocols. It showed how the routing problem is really a graph problemin particular, a single-source shortest-path problem. The RIP and OSPF protocols use two classical graph algorithms, BellmanFord and Dijkstra, respectively, to compute the best paths on which to forward a message; this information is stored in routing tables. Then you learned how to implement the core of the OSPF protocol using the BGL. You handled the graph file I/O using the Graphviz dot file parser, and you used the dijkstra_shortest_paths function to compute the shortest-path tree. This tree was recorded in a map from each vertex to its parent, which you then used to create the routing table.
Hopefully you have enjoyed this example of using the Boost Graph Library and go on to learn more about the BGL in my Boost Graph Library book (Addison Wesley Longman, 2001).