V- Internet Routing
Gateways are devices that switch packets between the different physical
networks. Deciding which gateway to use is called routing. First, let us
consider how routing is done in a host or gateway. The routing algorithm
used by most hosts and gateways is as follows:
1. If the destination host is on the local network, the data is delivered to
the destination host.
2. If the destination host is on a remote network, the data is forwarded to
a local gateway.
Routing is network oriented. That is, IP makes routing decisions based on the
Network portion of the destination address, The IP module determines the
network part of the destination’s IP address by first determining the class of the
network. Note that the class of the network dictates the number of bytes used
for the network part of the address. If the destination network is the local
network, the local subnet mask is applied to the destination.
Once the destination network is determined, the IP module looks up the
network in the Local routing table. Packets are routed toward their destination
as directed by the Routing table. An example of a routing table is given in Figure
5-6.
The Destination column is the destination network or host. The gateway column
The Destination column is the destination network or host. The Gateway column
indicates the gateway to be used in order to reach the destination. The Flags
column describes certain characteristics of this route. Possible values for Flags are:
U- the route is up and operational
H- route to a specific host
G- route uses a gateway
D- route was added because of an ICMP redirect
The ref column shows the number of this times the route has been referenced to
establish a connection. The Use column shows the number of packets
transmitted via this route. Finally, the Interface column is the name of the
network interface used by this route.
The first entry in the table is a special entry that indicates a loopback route for
the local host. Notice that this is a reserved IP address. This entry is used by the
system to send datagrams to itself. Another unique entry in the table is the
default entry. The gateway specified in this row is the default gateway; it is used
whenever there is no specific route in the table for the destination network
address. Those rows with Flags entry U without a G indicate that the host which
owns the routing table above is directly connected to the network specified in
the destination column. While those with UG are networks directly connected to
the local system.
What we have discussed is how an individual gateway or host routes data. To
facilitate routing, the Internet uses a routing model that is based on co-equal
collections of autonomous system is called routing domains Routing domains
exchange routing information with other domains using Border Gateway
protocol (BGP). Each routing domain processes the information it receives from
other domains. BGP is an exterior routing protocol and as such is concerned with
routing between networks rather than within them.
BGP routing involves two basic activities: determination of optimal routing paths
and the transport of data (typically called packets) through the network. The
transport of packets through the network is relatively straightforward. Path
determination, on the other hand, can be very complex. BGP performs routing
and reachability information with information with other BGP systems.
BGP performs three types of routing inter-autonomous system routing, intraautonomous
system routing, and pass-through autonomous system routing.
Inter-autonomous system routing occurs between two or more BGP routers in
different autonomous systems. Peer routers in these systems use BGP to
maintain a consistent view of the network topology. BGP neighbors
communicating between autonomous systems must reside in the same physical
network. The Internet serves as an example of an entity that uses this type of
routing because it is comprised of autonomous systems or administrative
domains. Many of these domains represent the various institutions, corporations,
and entities that make up the Internet. BGP is frequently used to provide path
determination for optional routing within the internet
Intra-autonomous system routing occurs between two or more BGP routers
located within the same autonomous system. Peer routers within the same
autonomous system use BGP to maintain a consistent view of the system
topology. BGP is also used to determine which router will serve as the connection
point for specific external autonomous systems. Once again, the Internet
provides an example of intra-autonomous systems. Once again, the Internet
provides an example of intra-autonomous systems routing. An organization, such
as a university, could make use of BGP to provide optimal routing within its own
administrative domain or autonomous system routing services.
Pass-through autonomous system routing occurs between two or more BGP peer
routers that exchange traffic across an autonomous system environment, does
not run BGP. In a pass-through autonomous system that environment, the BGP
traffic did not originate within the autonomous system in question and is not
destined for a node in the autonomous system. BGP must interact with whatever
intra-autonomous system routing protocol is being used to successfully transport
BGP traffic through autonomous system.
As with any routing protocol, BGP maintains routing tables, transmits routing
updates, and bases routing decisions on routing metrics. The primary function of
a BGP system is to exchange network- reachability information, including
information about the list of autonomous system paths, with other BGP systems.
This information can be used to construct a graph of autonomous system
connectivity from which routing loops can be pruned and with which autonomous
system-level policy decisions can be enforced.
Each BGP router maintains a routing table that lists all feasible paths to a
particular network. The router does not refresh the routing table, however.
Instead, routing information received from peer routers is retained until an
incremental update is received.
BGP devices exchange routing information upon initial data exchange and after
incremental updates. When a router first connects to the network, BGP routers
exchange their entire BGP routing tables. Similarly, when the routing table
changes, routers send the portion of their routing table that has changed. BGP
routers do not send regularly scheduled routing updates, and BGP routing
updates advertise only the optimal path to a network.
BGP uses a single routing metric to determine the best path to a given network.
This metric consists of an arbitrary unit number that specifies the degree of
preference of a particular link. The BGP metric typically is assigned to each link
by the network administrator. The value assigned to a link can be based on any
number of criteria, including the number of autonomous systems through which
the path passes, stability, speed, delay, or cost.
An example of a snapshot of an actual BGP routing table raw data is given below. The
table where it came from contains several hundreds of thousands of entries.



