Networks Lecture 16

Internet Routing

The generalized routing algorithms described in Lecture 15 are point-to-point routing algorithms. They solve the problem of routing between individual nodes in the network.

However, the internet has too many nodes for routers to maintain separate routing information for each one. CIDR and hierarchical addressing (described in Lecture 13) aggregate the addresses for many nodes into common address prefixes. Routers can maintain a route for every address matching a single prefix using a single routing table entry.

Autonomous Systems

An autonomous system is a collection of nodes and routers administered by a single organization. Point-to-point routing is used to route datagrams between nodes within the A.S: this is the problem of intra-A.S. routing.

Gateway routers connect one A.S. to another. The problem of routing datagrams between A.S.'s is referred to as inter-A.S. routing.

Example of 3 interconnected autonomous systems. The red lines indicate links to subnets attached to a router within the A.S.

The gateway routers exchange routing information with their "peer" router in the other A.S., and also with the other routers within the A.S. The internal routers exchange routing information only with other routers within the A.S.

Task of an internal router: route datagrams to a gateway router through which the destination can be reached, or an internal router which connects the subnet through which the destination is reachable.

Task of a gateway router: forward incoming datagrams to another gateway router (via internal routers) through which the destination is reachable, or to an internal router connecting a subnet through which the destination is reachable.

Intra-A.S. routing


RIP is a distance vector protocol where distance is based on hop count. Thus, all links cost 1. Routers exhange RIP advertisements every 30 seconds with their neighbors. RIP messages are encoded in UDP datagrams and handled by an application process which has authorization to modify the in-kernel routing/forwarding table.


OSPF is a link-state routing protocol. Link weights (costs) are configured by the network administator. Routers broadcast any change in link cost, and also broadcast link costs every 30 minutes. OSPF messages are encapsulated directly in IP datagrams.

In OSPF, the A.S. can be divided into "backbone" and "areas". Areas move datagrams towards the backbone, which then routes them to the appropriate area. This allows the routers in an A.S. to be organized into a hierarchy.