To dynamically learn and fill the routing table with a route
to each subnet in the internetwork.
If more than one route to a subnet
is available, to place the best route
in the routing table.
To notice when routes in the table are no longer valid, and to
remove them from the routing table.
If a route is removed from the routing table and another route
through another neighboring router is available, to add the route to
the routing table.
To work quickly when adding new routes or replacing lost
routes. (The time between losing the route and finding a working
replacement route is called convergence time.)
To prevent routing loops.
General steps for learning routes
Step 1. Each router, independent of the routing protocol, adds a route to its
routing table for each subnet directly connected to the router.
Step 2. Each router’s routing protocol tells its neighbors about the
routes in its routing table, including the directly connected routes,
and routes learned from other routers.
Step 3. After learning a new route from a
neighbor, the router’s routing protocol adds
a route to its IP routing table, with the
next-hop router of that route typically being
the neighbor from which the route was
learned.