Routing Algorithms
Routing Algorithms
Routing Algorithms
Layer
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Congestion
Control
Muhammad Adil Raja Algorithms
References
Muhammad Adil
Raja
Introduction
Routing
Algorithms
N ETWORK L AYER D ESIGN I SSUES Congestion
Control
Algorithms
References
ROUTING A LGORITHMS
R EFERENCES
The Network
O UTLINE Layer
Muhammad Adil
Raja
Introduction
Routing
Algorithms
N ETWORK L AYER D ESIGN I SSUES Congestion
Control
Algorithms
References
ROUTING A LGORITHMS
R EFERENCES
The Network
O UTLINE Layer
Muhammad Adil
Raja
Introduction
Routing
Algorithms
N ETWORK L AYER D ESIGN I SSUES Congestion
Control
Algorithms
References
ROUTING A LGORITHMS
R EFERENCES
The Network
O UTLINE Layer
Muhammad Adil
Raja
Introduction
Routing
Algorithms
N ETWORK L AYER D ESIGN I SSUES Congestion
Control
Algorithms
References
ROUTING A LGORITHMS
R EFERENCES
The Network
O UTLINE Layer
Muhammad Adil
Raja
Introduction
Routing
Algorithms
N ETWORK L AYER D ESIGN I SSUES Congestion
Control
Algorithms
References
ROUTING A LGORITHMS
R EFERENCES
The Network
I NTRODUCTION I Layer
Muhammad Adil
Raja
I The network layer is concerned with getting packets
from the source all the way to the destination. Introduction
Network Layer
I Getting to the destination may require making many Design Issues
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
References
I These issues include the service provided to the
transport layer and the internal design of the network.
Before starting to explain the details of the network layer, it is worth restating The Network
StheTORE
context- AND -FtheORWARD
in which network layer P
protocols
ACKET S WITCHING
operate. This context canIbe Layer
seen in Fig. 5-1. The major components of the network are the ISP’s equipment Muhammad Adil
Components
(routers connected of
by a computer
transmission network:
lines), shown inside the shaded oval, and the Raja
customers’ equipment, shown outside the oval. Host H1 is directly connected to
one ofHosts (computers, handheld deveices etc.)
I
the ISP’s routers, A, perhaps as a home computer that is plugged into a Introduction
DSL modem.
I Switches. In contrast, H2 is on a LAN, which might be an office Ethernet, Network Layer
with a router, F, owned and operated by the customer. This router has a leased Design Issues
lineIto Routers.
the ISP’s equipment. We have shown F as being outside the oval because Routing
it does not belong to the ISP. For the purposes of this chapter, however, routers Algorithms
on I Wireless
customer access
premises points.
are considered part of the ISP network because they run the Congestion
same algorithms as the ISP’s routers (and our main concern here is algorithms). Control
Algorithms
Router ISP’s equipment
Process P1 P2 References
B
D
A E F
Host H1 LAN H2
C
Packet
Muhammad Adil
L AYER I Raja
Introduction
Network Layer
I Network layer provides its services to the transport Design Issues
Muhammad Adil
L AYER II Raja
Routing
I Conflicts of opinions arise among various factions of Algorithms
designers. Congestion
Control
Algorithms
I The debate centers on whether the network layer
References
should provide conection oriented or connectionless
service.
I Internet community argues that the routers’ job is
moving packets around and nothing else.
I In this view the network is inherently unreliable.
I So the hosts should accept this fact and do error
control themselves.
I It leads to the conclusion that the network service
should be connectionless.
The Network
S ERVICES P ROVIDED TO THE T RANSPORT Layer
Muhammad Adil
L AYER III Raja
I No packet ordering and flow control should be done,
Introduction
as the hosts are going to do that anyway.
Network Layer
Design Issues
I This reasoning is an example of the end-to-end
Routing
argument. Algorithms
Muhammad Adil
S ERVICE I Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
I Packets are injected into the network individually and Congestion
Control
routed independently of each other. Algorithms
A’s table (initially) A’s table (later) C’s table E’s table
A – A – A A A C
B B B B B A B D
C C C C C – C C
D B D B D E D D
E C E B E E E –
F C F B F E F F
Dest. Line
Muhammad Adil
S ERVICE I Raja
Introduction
I We require a virtual-circuit (VC) network.
Network Layer
I The idea behind VCs is to avoid having to choose a Design Issues
Routing
new route for every packet sent. Algorithms
also with
S ERVICE IIconnection identifier 1. Muhammad Adil
Raja
P3 Introduction
Network Layer
Design Issues
Router ISP’s equipment
P2 Routing
Algorithms
B
H3 D Congestion
Control
Process P1 1 Algorithms
A 4 E F
2 References
3 LAN H2
C
Packet
Host H1
A’s table C’s table E’s table
H1 1 C 1 A 1 E 1 C 1 F 1
H3 1 C 2 A 2 E 2 C 2 F 2
In Out
Muhammad Adil
S ERVICE III Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
Congestion
Control
I This is also called label switching. Algorithms
(MPLS).
5.1.5 Comparison of Virtual-Circuit and Datagram Networks
The Network
C OMPARISON
Both virtual circuitsOF V IRTUAL
and datagrams -Csupporters
have their IRCUIT andAND
their detractors. Layer
We will now attempt to summarize both sets of arguments. The major issues are Muhammad Adil
Dlisted
ATAGRAM N ETWORK I
in Fig. 5-4, although purists could probably find a counterexample for Raja
everything in the figure.
Introduction
Effect of router failures None, except for packets All VCs that passed
lost during the crash through the failed
router are terminated
Quality of service Difficult Easy if enough resources
can be allocated in
advance for each VC
Congestion control Difficult Easy if enough resources
can be allocated in
advance for each VC
Muhammad Adil
DATAGRAM N ETWORK II Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
Tradeoffs: Congestion
Control
I Setup time versus address parsing time. Algorithms
References
I Longer destination addresses in datagram networks
(overhead for smaller packets).
I Table space required in router memory.
The Network
ROUTING A LGORITHMS I Layer
Muhammad Adil
Raja
I Routing packets from source to destination is the
main function of the network layer. Introduction
Network Layer
I A routing algorithm decides which output line an Design Issues
Muhammad Adil
Raja
Introduction
Network Layer
2. Simplicity. Design Issues
3. Robustness. Routing
Algorithms
4. Robustness. Congestion
5. Stability. Control
Algorithms
6. Fairness.
References
7. Efficiency.
I Classification of Routing algorithms
1. Adaptive algorithms – State routing.
2. Nonadaptive algorithms – Dynamic routing.
The Network
ROUTING A LGORITHMS III Layer
Muhammad Adil
364 THE NETWORK LAYER CHAP. 5 Raja
Introduction
A B C
Network Layer
Design Issues
Routing
Algorithms
X X′ Congestion
Control
Algorithms
References
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
Congestion
I A statement about optimal routes without regard to Control
Algorithms
network topology.
References
I Directed Acyclic Graphs (DAG) – have no loops.
The Network
S HORTEST PATH A LGORITHM I Layer
Muhammad Adil
Raja
Introduction
Network Layer
Criteria: Design Issues
Routing
I Minimum number of hops. Algorithms
in kilometers, in which case ABC is clearly much longer than ABE (assuming the Muhammad Adil
Dijkstra’s algorithm.
figure is drawn to scale). Raja
E (4, B) E (4, B)
A F (6, E) D (∞,−) A F (6,E) D (∞,−)
Figure 5-7. The first six steps used in computing the shortest path from A to D.
F IGURE : TheThefirst six steps used in computing the shortest path
arrows indicate the working node.
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
I In flooding every incoming packet is sent out on Congestion
every outgoing line except the one it arrived on. Control
Algorithms
I Generate vast number of duplicates packets. References
Muhammad Adil
Raja
I Each router maintains a table (i.e., a vector).
Introduction
I It gives the best known distance to each destination Network Layer
and which link to use to get there. Design Issues
Routing
I The tables are updated by exchanging information Algorithms
References
destination.
I Each router maintains a routing table indexed by, and
containing one entry for each router in the network.
I The entry has two parts:
1. The preferred outgoing line to use for that
destination.
2. An estimate of the distance to that destination.
I The distance might be measured as the number of
hops or using another metric.
The Network
D ISTANCE V ECTOR ROUTING II Layer
Muhammad Adil
Raja
Introduction
Network Layer
I The router is assumed to know the “distance” to each Design Issues
of its neighbors. Routing
Algorithms
I If the metric is hops, the distance is just one hop. Congestion
Control
I If the metric is propagation delay, the router can Algorithms
Figure 5-9. (a) A network. (b) Input from A, I, H, K, and the new routing table for J.
F IGURE : (a) A network. (b) Input from A, I, H, K, and new
routing table for
Consider J.J computes its new route to router G. It knows that it can get to
how
A in 8 msec, and furthermore A claims to be able to get to G in 18 msec, so J
knows it can count on a delay of 26 msec to G if it forwards packets bound for G
The Network
D ISTANCE V ECTOR ROUTING IV Layer
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
The Count-to-Infinity Problem: Routing
Algorithms
I The settling of routes to the best paths across the
Congestion
network is called convergence. Control
Algorithms
I Distance vector routing is useful as a simple References
work of Fig. 5-10, where the delay metric is the number of hops. Suppose A is Muhammad Adil
down initially and all the other routers know this. In other words, they have all Raja
Muhammad Adil
I Each router must do the following things to make it Raja
work:
Introduction
1. Discover its neighbors and learn their network
Network Layer
addresses. Design Issues
2. Set the distance or cost metric to each of its Routing
neighbors. Algorithms
Muhammad Adil
Raja
(1) Learning About the Neighbors
Introduction
I When a router is booted, its first task is to learn who
Network Layer
its neighbors are. Design Issues
Routing
I It accomplishes this goal by sending special HELLO Algorithms
packet on each point-to-point line. Congestion
Control
I The router on the other end is expected to send back Algorithms
nected. Each of these routers is connected to one or more additional routers, as Muhammad Adil
Raja
shown.
Introduction
H Router
Network Layer
Design Issues
B D E
Routing
D E G I G H Algorithms
B
Congestion
A C F C Control
Algorithms
A
F I
References
LAN N
(a) (b)
F IGUREFigure
: (a)5-11.
Nine (a) Nine routers and a broadcast LAN. (b) A graph model of (a).
routers and a broadcast LAN. (b) A graph
model of (a).
The broadcast LAN provides connectivity between each pair of attached rout-
ers. However, modeling the LAN as many point-to-point links increases the size
The Network
L INK S TATE ROUTING IV Layer
Muhammad Adil
Raja
(2) Setting Link Costs
Introduction
I The link state routing algorithm requires each link to
Network Layer
have a distance or cost metric for finding shortest Design Issues
paths. Routing
Algorithms
I The cost to reach neighbors can be set Congestion
Control
automatically, or configured by the network operator. Algorithms
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
I The most direct way to determine this delay is to Algorithms
send over the line a special ECHO packet that the Congestion
Control
other side is required to send back immediately. Algorithms
References
I By measuring the round-trip time and dividing it by
two, the sending router can get a reasonable
estimate of the delay.
The Network
L INK S TATE ROUTING VI Layer
Routing
I The packet starts with the identity of the sender, Algorithms
References
I The cost to each neighbor is also given.
I Building the link state packets is easy.
I The hard part is determining when to build them.
I One possibility is to build them periodically, that is, at
regular intervals.
I Another possibility is to build them when some
significant event occurs, such as a line or neighbor
going down or coming back up again or changing its
properties appreciably.
step is for each router to build a packet containing all the data. The packet starts The Network
L INK
with theSidentity
TATEof RtheOUTING VII
sender, followed by a sequence number and age (to be de- Layer
scribed later) and a list of neighbors. The cost to each neighbor is also given. An
Muhammad Adil
example network is presented in Fig. 5-12(a) with costs shown as labels on the Raja
lines. The corresponding link state packets for all six routers are shown in Fig. 5-
12(b). Introduction
Figure 5-12. (a) A network. (b) The link state packets for this network.
F IGURE : ((a) A network. (b) The link state packets for this
network.
The Network
L INK S TATE ROUTING VIII Layer
Congestion
I If different routers are using different versions of the Control
Algorithms
topology, the routes they compute can have
References
inconsistencies such as loops, unreachable
machines, and other problems.
I The fundamental idea is to use flooding to distribute
the link state packets to all routers.
I To keep the flood in check, each packet contains a
sequence number that is incremented for each new
packet sent.
I Routers keep track of all the (source router,
sequence) pairs they see.
The Network
L INK S TATE ROUTING IX Layer
Muhammad Adil
Raja
Introduction
Network Layer
I When a new link state packet comes in, it is checked Design Issues
References
I If it is a duplicate, it is discarded.
I If a packet with a sequence number lower than the
highest one seen so far ever arrives, it is rejected as
being obsolete as the router has more recent data.
The data structure used by router B for the network shown in Fig. 5-12(a) is
depicted in Fig. 5-13. Each row here corresponds to a recently arrived, but as yet The Network
L
not
INK S
fully processed, R
TATE linkOUTING X
state packet. The table records where the packet ori- Layer
ginated, its sequence number and age, and the data. In addition, there are send
Muhammad Adil
and acknowledgement flags for each of B’s three links (to A, C, and F, re- Raja
spectively). The send flags mean that the packet must be sent on the indicated
link. The acknowledgement flags mean that it must be acknowledged there. Introduction
Send flags ACK flags Network Layer
Design Issues
Source Seq. Age A C F A C F Data
Routing
A 21 60 0 1 1 1 0 0 Algorithms
F 21 60 1 1 0 0 0 1 Congestion
Control
E 21 59 0 1 0 1 0 1 Algorithms
C 20 60 1 0 1 0 1 0 References
D 21 59 1 0 0 0 1 1
Muhammad Adil
Computing the New Routes Raja
Congestion
direction. Control
Algorithms
I The different directions may even have different
References
costs.
I The shortest-path computations may then find
different paths from router A to B than from router B
to A.
I Now DijkstraÕs algorithm can be run locally to
construct the shortest paths to all possible
destinations.
I The results of this algorithm tell the router which link
to use to reach each destination.
The Network
L INK S TATE ROUTING XII Layer
Muhammad Adil
I This information is installed in the routing tables, and Raja
Muhammad Adil
I Many ISPs use the IS-IS (Intermediate Raja
System-Intermediate System) link state protocol.
Introduction
I OSPF (Open Shortest Path First) is the other main Network Layer
Design Issues
link state protocol.
Routing
I It was designed by IETF several years after IS-IS and Algorithms
Muhammad Adil
Raja
I OSPF does not have this feature, and it is an
Introduction
advantage in large multi-protocol environments.
Network Layer
I Link state, distance vector, and other algorithms rely Design Issues
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Muhammad Adil
Raja
Introduction
I As networks grow in size, the router routing tables
Network Layer
grow proportionally. Design Issues
Muhammad Adil
I Each router knows all the details about how to route Raja
Routing
I When different networks are interconnected, it is Algorithms
Muhammad Adil
Raja
I The Berkeley router would know the detailed
topology within California but would send all Introduction
Muhammad Adil
Raja
Introduction
I If there is no hierarchy, each router needs 720
Network Layer
routing table entries. Design Issues
Routing
I If the network is partitioned into 24 regions of 30 Algorithms
References
I If a three-level hierarchy is chosen, with 8 clusters
each containing 9 regions of 10 routers.
I Each router needs 10 entries for local routers, 8
entries for routing to other regions within its own
cluster, and 7 entries for distant clusters, for a total of
25 entries.
380 THE NETWORK LAYER CHAP. 5
The Network
H IERARCHICAL ROUTING V Layer
Figure 5-15. Reverse path forwarding. (a) A network. (b) A sink tree. (c) The
: Reverse
F IGUREtree built by reversepath forwarding. (a) A network. (b) A sink
path forwarding.
tree. (c) The tree built by reverse path forwarding.
An example of reverse path forwarding is shown in Fig. 5-15. Part (a) shows
a network, part (b) shows a sink tree for router I of that network, and part (c)
shows how the reverse path algorithm works. On the first hop, I sends packets to
The Network
M ULTICAST ROUTING I Layer
Muhammad Adil
I Sending messages to a selected group of hosts. Raja
1
1
1
1
(a) (b)
1 2
1 2 2 2
1
1
(c) (d)
The Network
M ULTICAST ROUTING II Layer
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
F IGURE : (a) A network. (b) A spanning tree for the leftmost Congestion
router. (c) A multicast tree for group 1. (d) A multicast tree for Control
Algorithms
group 2. References
want to anycast to the members of group 1. They will all be given the address
’’ instead of different addresses. Distance vector routing will distribute vectors
The Network
A NYCAST
usual, ROUTING
and nodes will I
choose the shortest path to destination 1. This will result Layer
nodes sending to the nearest instance of destination 1. The routes are shownMuhammad
in Raja Adil
. 5-18(a).
I AThis procedure works because the routing protocol
packet is delivered to the nearest member of a does not realize
t there are multiple instances of destination 1. That is, it believes that allIntroduction
group. the
tances of node 1 are the same node, as in the topology shown in Fig. 5-18(b). Network Layer
Design Issues
1 Routing
Algorithms
Congestion
Control
1 1 Algorithms
1 References
1
1
(a) (b)
FFigure 5-18. (a) Anycast routes to group 1. (b) Topology seen by the routing protocol.
IGURE : (a) Anycast routes to group 1. (b) Topology seen by
the routing protocol.
This procedure works for link state routing as well, although there is the
ded consideration that the routing protocol must not find seemingly short paths
t pass through node 1. This would result in jumps through hyperspace, since
The Network
ROUTING FOR M OBILE H OSTS I Layer
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
I The basic idea used for mobile routing in the Internet Routing
Algorithms
and cellular networks is for the mobile host to tell a
Congestion
host at the home location where it is now. Control
Algorithms
I This host, which acts on behalf of the mobile host, is References
called the home agent.
I Once it knows where the mobile host is currently
located, it can forward packets so that they are
delivered.
The Network
ROUTING FOR M OBILE H OSTS II Layer
Introduction
Network Layer
Design Issues
2: Sen
d to ho
me ad Routing
Sender dress
Algorithms
4: Reply
5: Tunnel to sender Congestion
to care of f add ress Control
address ister care o Algorithms
1: Reg
ddress Home agent at
re of a
References
n el to ca home address
3: Tun
Mobile host at
care of address
A B A B A B A B
C C C C
D D D D
E E E E
F F F F
G G G G
H I H I H I H I
(a) (b) (c) (d)
Figure 5-20. (a) Range of A’s broadcast. (b) After B and D receive it. (c) After
F IGURE ((a)G Range
C, F,: and receive it.of
(d)AÕs broadcast.
After E, (b)it.After
H, and I receive B and
The shaded D are
nodes
new it.
receive recipients. The dashed
(c) After C, F, lines
andshow possible reverse
G receive it. (d)routes.
AfterTheE,solid lines I
H, and
show the discovered route.
The Network
ROUTING IN A D H OC N ETWORKS II Layer
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
receive it. The shaded nodes are new recipients. The dashed Congestion
Control
lines show possible reverse routes. The solid lines show the Algorithms
discovered route. References
The Network
C ONGESTION C ONTROL A LGORITHMS I Layer
Muhammad Adil
Raja
I Too many packets present in (a part of) the network
Introduction
causes packet delay and loss that degrades
Network Layer
performance. Design Issues
References
I Since congestion occurs within the network, it is the
network layer that directly experiences it and must
ultimately determine what to do with the excess
packets.
I However, the most effective way to control
congestion is to reduce the load that the transport
layer is placing on the network.
I This requires the network and transport layers to
work together.
The Network
C ONGESTION C ONTROL A LGORITHMS II Layer
Muhammad Adil
I This chapter looks at the network aspects of Raja
congestion.
Introduction
I When the number of packets hosts send into the Network Layer
network is well within its carrying capacity, the Design Issues
Routing
number delivered is proportional to the number sent. Algorithms
References
I However, as the offered load approaches the
carrying capacity, bursts of traffic occasionally fill up
the buffers inside routers and some packets are lost.
I These lost packets consume some of the capacity,
so the number of delivered packets falls below the
ideal curve.
I The network is now congested.
I Unless the network is well designed, it may
experience a congestion collapse.
The Network
C ONGESTION C ONTROL A LGORITHMS III Layer
Muhammad Adil
Raja
I In this situation performance plummets as the offered
load increases beyond the capacity. Introduction
Muhammad Adil
Raja
I This is because by the time packets get to the front
of the queue, they have already timed out Introduction
Muhammad Adil
Raja
Network Layer
congestion control and flow control, as the Design Issues
relationship is a very subtle one. Routing
Algorithms
I Congestion control has to do with making sure the Congestion
network is able to carry the offered traffic. Control
Algorithms
I It is a global issue, involving the behavior of all the References
Muhammad Adil
Raja
I To see the difference between these two concepts,
consider a network made up of 100-Gbps fiber optic Introduction
Congestion
I Although there is no congestion (the network itself is Control
Algorithms
not in trouble), flow control is needed to force the References
supercomputer to stop frequently to give the
personal computer a chance to breathe.
I At the other extreme, consider a network with 1-Mbps
lines and 1000 large computers, half of which are
trying to transfer files at 100 kbps to the other half.
I Here, the problem is not that of fast senders
overpowering slow receivers, but that the total
offered traffic exceeds what the network can handle.
The Network
C ONGESTION C ONTROL A LGORITHMS VII Layer
Muhammad Adil
I The reason congestion control and flow control are Raja
Congestion
because the network cannot handle it. Control
Algorithms
I Congestion Collapse: Performance plummets as References
the offered load increases beyond the capacity.
I If routers have an infinite amount of memory,
congestion gets worse not better.
I This is because by the time packets get to the front
of the queue, they have already timed out
(repeatedly) and duplicates have been sent.
I This makes matters worse, not better – it leads to
congestion collapse.
The Network
C ONGESTION C ONTROL A LGORITHMS VIII Layer
Muhammad Adil
Raja
Introduction
I It is important to differentiate between congestion
Network Layer
control and flow control. Design Issues
Routing
I Congestion control has to do with making sure the Algorithms
network is able to carry the offered traffic. Congestion
Control
I It is a global issue, involving the behavior of all the Algorithms
Muhammad Adil
Raja
Ideal
Introduction
Capacity of
Goodput (packets/sec)
Network Layer
the network Design Issues
Desirable Routing
Algorithms
response Congestion
Control
Algorithms
Congestion
Onset of collapse
References
congestion
Figure 5-21.
F IGURE With
: With tootoo much
much traffic,
traffic, performance
performance dropsdrops sharply.
sharply.
Slower Faster
(Preventative) (Reactive)
Muhammad Adil
I The most basic way to avoid congestion is to build a Raja
References
turning on spare routers or enabling lines that are
normally used only as backups (to make the system
fault tolerant) or purchasing bandwidth on the open
market.
I More often, links and routers that are regularly
heavily utilized are upgraded at the earliest
opportunity.
I This is called provisioning and happens on a time
scale of months, driven by long-term traffic trends.
The Network
A PPROACHES TO C ONGESTION C ONTROL III Layer
Muhammad Adil
I To make the most of the existing network capacity, Raja
Congestion
away from heavily used paths by changing the Control
Algorithms
shortest path weights.
References
I Some local radio stations have helicopters flying
around their cities to report on road congestion to
make it possible for their mobile listeners to route
their packets (cars) around hotspots.
I This is called traffic-aware routing.
I Splitting traffic across multiple paths is also helpful.
I However, sometimes it is not possible to increase
capacity.
The Network
A PPROACHES TO C ONGESTION C ONTROL IV Layer
Muhammad Adil
I The only way then to beat back the congestion is to Raja
decrease the load.
Introduction
I In a virtual-circuit network, new connections can be Network Layer
refused if they would cause the network to become Design Issues
Routing
congested. Algorithms
Muhammad Adil
I In all cases, rising numbers indicate growing Raja
congestion.
Introduction
I To tackle the second issue, routers must participate Network Layer
in a feedback loop with the sources. Design Issues
Routing
I For a scheme to work correctly, the time scale must Algorithms
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
I Finally, when all else fails, the network is forced to Algorithms
Muhammad Adil
Raja
Congestion
Remote login Low Medium Medium Medium Control
Algorithms
Audio on demand Low Low High Low
References
Video on demand High Low High Low
Telephony Low High High Low
Videoconferencing High High High Low
is empty. Also, once the bucket is full to capacity B, any additional water enter- Muhammad Adil
Raja
ing it spills over the sides and is lost.
Introduction
Check B Congestion
Take out
bucket Control
water/tokens B Algorithms
here
Rate References
R
Network
(a) (b) (c)
Figure 5-28. (a) Shaping packets. (b) A leaky bucket. (c) A token bucket.
F IGURE : (a) Shaping packets (b) A leaky bucket (c) A token
bucket.
This bucket can be used to shape or police packets entering the network, as
shown in Fig. 5-28(a). Conceptually, each host is connected to the network by an
interface containing a leaky bucket. To send a packet into the network, it must be
possible to put more water into the bucket. If a packet arrives when the bucket is
full, the packet must either be queued until enough water leaks out to hold it or be
discarded. The former might happen at a host shaping its traffic for the network
as part of the operating system. The latter might happen in hardware at a provider
The Network
I NTERNETWORKING I Layer
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
I Interoperability of heterogenous networks.
Congestion
I How networks can be connected. Control
Algorithms
I Tunneling. References
I Internetwork routing.
I Packet fragmentation.
The Network
T HE N ETWORK L AYER IN THE I NTERNET I Layer
Muhammad Adil
Raja
A few design principles:
Introduction
1. Make sure it works. Network Layer
Design Issues
2. Keep it simple.
Routing
3. Make clear choices. Algorithms
Congestion
4. Exploit modularity. Control
Algorithms
5. Expect heterogeneity. References
Muhammad Adil
32 Bits Raja
D M Fragment offset
Network Layer
Identification F F Design Issues
Time to live Protocol Header checksum Routing
Algorithms
Source address
Congestion
Destination address Control
Algorithms
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
I Label Switching and MPLS. Algorithms
Muhammad Adil
Raja
Introduction
Network Layer
Design Issues
Routing
Algorithms
Congestion
The inspiration and figures for these slides have been Control
Algorithms
taken from, Computer Networks, Andrew S. Tanenbaum, References
5th Edition.