Documente Academic
Documente Profesional
Documente Cultură
fig 5-1
ISP’s equipment
5-4
5.2 Routing Algorithms
• The routing algorithm is that part of the network layer
software responsible for deciding which output line an
incoming packet should be transmitted on.
• If the subnet uses datagrams internally, this decision must
be made anew for every arriving data packet since the
best route may have changed since last time.
• If the subnet uses virtual circuits internally, routing
decisions are made only when a new virtual circuit is
being set up. Thereafter, data packets just follow the
previously-established route.
• The latter case is sometimes called session routing
because a route remains in force for an entire user
session.
5.2 Routing Algorithms (contd.)
• One can think of a router as having two processes inside it.
– One of them handles each packet as it arrives, looking
up the outgoing line to use for it in the routing tables.
This process is forwarding.
– The other process is responsible for filling in and
updating the routing tables. That is where the routing
algorithm comes into play.
• Certain properties are desirable in a routing algorithm:
– correctness,
– simplicity,
– robustness,
– stability,
– fairness, and
– optimality. (delay, throughput, or number of hops)
5.2 Routing Algorithms (contd.)
• Routing algorithms can be grouped into two classes:
nonadaptive and adaptive.
• Nonadaptive algorithms do not base their routing
decisions on measurements or estimates of the current
traffic and topology. Instead, the choice of the route to use
to get from I to J is computed in advance, and downloaded
to the routers when the network is booted. This is
sometimes called static routing.
• Adaptive algorithms, in contrast, change their routing
decisions to reflect changes in the topology, and usually the
traffic as well. Adaptive algorithms differ in where they get
their information (e.g., locally, from adjacent routers, or from
all routers), when they change the routes (e.g., when the
load or topology changes), and what metric is used for
optimization (e.g., distance, number of hops, or estimated
transit time).
5.2.2 Shortest Path Routing
• The idea is to build a graph of the subnet, with each node of
the graph representing a router and each arc of the graph
representing a communication line (link).
• To choose a route between a given pair of routers, the
algorithm just finds the shortest path between them.
– One way of measuring path length is the number of hops. Using
this metric, the paths ABC and ABE in Fig. 5-7 are equally long.
– Another metric is the geographic distance in kilometers.
– A third metric could be the mean queueing and transmission
delay for some standard test packet as determined by hourly
test runs. With this graph labeling, the shortest path is the
fastest path rather than the path with the fewest arcs or
kilometers.
– Generally, labels on the arcs could be computed as a function of
the distance, bandwidth, average traffic, communication cost,
mean queue length, measured delay, and other factors.
Shortest Path Routing
Figure 5.7: The first 5 steps used in computing the shortest path from
A to D. The arrows indicate the working node.
Distance Vector Routing
(a) A subnet (b) Input from A, I, H, K, & the new routing table for J
5.2.5 Link State Routing
• The idea behind link state routing is simple and can be
stated as five parts. Each router must do the following:
Figure 5.11: (a) Nine routers and a LAN. (b) A graph model of (a).
Measuring Line Cost
• The link state routing algorithm requires each router to
know, or at least have a reasonable estimate of, the delay
to each of its neighbors.
• The most direct way to determine this delay is to send over
the line a special ECHO packet that the other side is
required to send back immediately. By measuring the
round-trip time and dividing it by two, the sending router
can get a reasonable estimate of the delay.
• An interesting issue is whether to take the load into account
when measuring the delay.
• To factor the load in, the round-trip timer must be started
when the ECHO packet is queued.
• To ignore the load, the timer should be started when the
ECHO packet reaches the front of the queue.
Building Link State Packets
Figure 5.13: (a) A subnet. (b) The link state packets for this subnet.
Distributing the Link State Packets
Figure 5.14: The packet buffer for router B in the previous slide (Fig. 5.13).
Congestion Control Algorithms
5-30
Token bucket level for shaping with rate 200 Mbps and capacity
(d) 16000 KB, (e) 9600 KB, and (f) 0KB..
Packet Scheduling (1)
Kinds of resources can potentially be
reserved for different flows:
1. Bandwidth.
2. Buffer space.
3. CPU cycles.
Packet Scheduling (2)
5-43
5-54
An IP prefix.
IP Addresses (2)
Aggregation of IP prefixes
IP Addresses (5)
IP address formats
IP Addresses (7)
An autonomous system
OSPF- An Interior Gateway Routing Protocol (2)