Professional Documents
Culture Documents
DCN Unit-V
DCN Unit-V
Contents
• Datagram and Virtual-Circuit Networks
• Forwarding and Routing
• Routing Protocols:
– Flooding
– Shortest path routing
– Distance vector routing
– Count to Infinity problem
– Link state routing
– Hierarchical routing
– Multicasting
– Broadcasting
• Internet Control Protocols:
– ICMP
– ARP
– RARP
– DHCP
• Congestion Control in Virtual-circuit and Datagram Subnets
• Traffic Shaping:
– Leaky-Bucket and
– Token-Bucket algorithms
Internetworking
• Internetworking is combined of 2 words, inter and networking
which implies an association between totally different nodes or
segments.
• This interconnection is often among or between public, private,
commercial, industrial, or governmental networks.
• It could be an assortment of individual networks, connected by
intermediate networking devices, that function as one giant
network.
• To enable communication, every individual network node is
designed with a similar protocol or communication logic.
• Once a network communicates with another network having
constant communication procedures, it’s called
Internetworking.
• Internetworking is enforced in Layer three (Network Layer)
of the OSI-ISO model.
• The foremost notable example of internetworking is the
Internet.
• The purpose of interconnecting the networks is to allow users
on any of them to communicate with users on all the other
ones and also to allow users on any of them to access data on
any of them. Accomplishing this goal means sending packets
from one network to another.
• Two styles of internetworking are possible: a connection-
oriented concatenation of virtual-circuit subnets, and a
datagram internet style.
Comparison of Virtual-Circuit and Datagram
Subnets
5-4
Forwarding and Routing
• Routing is the process of moving data from one device to
another device. In most cases, routing is performed by a
networking device called a router (or three-layer switch).
Additionally, a router can forward the packets too.
• Routing is sometimes referred to as forwarding, but it’s
important to note that routing is a different process from
forwarding.
• Forwarding is the process of collecting data from one router
and sending it to another router.
• In routing, a router is responsible for deciding the path. In
forwarding, unlike the routing process, router only performs
some actions and simply forwards the packets which arrive in
intermediate routers to another attached network.
• Both routing and forwarding are performed by the network
layer.
Routing Algorithms
• The main function of the network layer is routing packets from the
source node to the destination node.
• For this, the routers are being used.
• In most networks, packets will require multiple hops to make the
journey.
• The algorithms that choose the routes are a major area of network layer
design.
• 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 network uses datagrams internally, this decision must be made
again for every arriving data packet since the best route may have
changed since last time.
• If the network uses virtual circuits internally, routing decisions are
made only when a new virtual circuit is being set up. Thereafter, data
packets just follow the already established route.
• The routers in internetworking maintain routing tables.
• The routing process is responsible for filling in and updating
the routing tables.
• Certain properties are desirable in a routing algorithm:
correctness, simplicity, robustness, stability, fairness, and
efficiency.
• Routing algorithms can be grouped into two major classes:
nonadaptive (or static) and adaptive (or dynamic).
• Nonadaptive algorithms do not base their routing decisions on
any measurements or estimates of the current topology and
traffic. Instead, the routes are computed in advance, offline,
and downloaded to the routers when the network is booted.
This procedure is called static routing. Because it does not
respond to failures, static routing is mostly useful for situations
in which the routing choice is clear.
• Adaptive algorithms, in contrast, change their routing decisions
to reflect changes in the topology, and sometimes changes in the
traffic as well. These dynamic routing algorithms differ in where
they get their information, when they change the routes, and what
metric is used for optimization.
Flooding
• Flooding is a simple local technique is, in which every
incoming packet is sent out on every outgoing line except the
one it arrived on.
• It generates vast numbers of duplicate packets, in fact, an
infinite number unless some measures are taken to damp the
process.
• One such measure is to have a hop counter contained in the
header of each packet that is decremented at each hop, with the
packet being discarded when the counter reaches zero.
• Ideally, the hop counter should be initialized to the length of the
path from source to destination. If the sender does not know
how long the path is, it can initialize the counter to the worst
case, namely, the full diameter of the network.
• A better technique for damming the flood is to have routers keep
track of which packets have been flooded, to avoid sending them
out a second time.
• This can be achieved through having the source routers put a
sequence number in each packet they send and thereby each
router maintaining a list of them.
• If an incoming packet is on the list, it is not flooded.
• To prevent the list from growing without bound, each list should
be augmented by a counter, k, meaning that all sequence
numbers through k have been seen.
• When a packet comes in, it is easy to check if the packet has
already been flooded, by comparing its sequence number to k; if
so, it is discarded.
• Flooding is not practical in most cases, but it does have some
important uses.
• First, it ensures that a packet is delivered to every node in the
network. This may be wasteful if there is a single destination,
but it is effective for broadcasting.
• Second, it is tremendously robust. Even if large numbers of
routers are blown (e.g., in a military network), flooding will
find a path if one exists, to get a packet to its destination.
• Flooding requires a little setup. The routers only need to know
their neighbours. This means that flooding can be used as a
building block for other routing algorithms.
• Flooding can also be used as a metric against which other
routing algorithms can be compared.
Shortest Path Routing (Dijkstra’s algorithm)
• The target of shortest path routing is to find a route between any
pair of nodes, so the path length is minimum.
• One way of measuring path length is the number of hops. Using
this metric, the paths ABC and ABE in Fig. are equally long.
Another metric is the geographic distance in kilometers, in which
case ABC is clearly much longer than ABE (assuming the figure is
drawn to scale).
• However, many other metrics are also possible. For example, each
node could be labeled with the mean delay of a standard test
packet, as measured by hourly runs. With this, the shortest path is
the fastest path.
• In general, the labels on nodes could be computed as a function of
distance, bandwidth, average traffic, communication cost,
measured delay, and other factors. By changing the weighting
function, the algorithm would then compute the ‘‘shortest’’ path.
• Dijkstra (1959) algorithm - finds the shortest paths between a
source and all destinations in the network.
• Each node is labeled (in parentheses) with its distance from the
source node along the best known path.
• The distances must be non-negative, as they will be if they are
based on real quantities like bandwidth and delay.
• Initially, no paths are known, so all nodes are labeled with
infinity.
• As the algorithm proceeds and paths are found, the labels may
change, reflecting better paths.
• A label may be either tentative or permanent.
• Initially, all labels are tentative. When it is discovered that a
label represents the shortest possible path from the source to that
node, it is made permanent and never changed thereafter.
• To illustrate how algorithm works, look at the weighted,
undirected graph of Fig. (a), where the weights represent, for
example, distance.
Algorithm
•On each node a label is placed (parentheses): first value in label is
distance from the start node while the second one previous node.
•Open two lists: Visited nodes and Unvisited nodes
•Let distance of start node from start node = 0
•Let distance of all other nodes from start node = ∞
Repeat
– Visit the unvisited node with the smallest known distance from the
start node.
– For the current node, examine its unvisited neighbours.
– For the current node, calculate distance of each neighbour from
start node.
– If the calculated distance of a node is less than the known distance,
update the shortest distance.
– Update the previous node for each of the updated distances.
– Add the current node to the list of the visited nodes.
Until all nodes visited.
Distance Vector routing
• A distance vector routing algorithm is a dynamic distributed
algorithm in which the route between any two nodes is the route
with minimum distance.
• In this protocol, as the name implies, each node maintains a
vector (in the table form) of minimum distances to every node.
• The algorithm is sometimes called Bellman-Ford routing
algorithm, after the researchers who developed it.
• It was the original ARPANET routing algorithm and was also
used in the Internet under the name RIP (Routing Information
Protocol). Now, it is not used much.
• In this, each router maintains a routing table, and containing one
entry for each router in the network.
• This entry has two parts: the preferred outgoing line to use for
that destination and an estimate of the distance to that
destination.
• The distance might be measured as the number of hops or using
another metric for computing shortest paths.
• The router is assumed to know the ‘‘distance’’ to each of its
neighbours. If the metric is hops, the distance is just one hop. If
the metric is propagation delay, the router can measure it
directly with special ECHO packets that the receiver just
timestamps and sends back as fast as it can.
• Figure shows a system of five nodes with their corresponding
tables.
• Initialization – Each node can know only the distance between itself
and its neighbors, those directly connected to it. The distance for any
entry that is not a neighbour is marked as infinite (unreachable).
• Sharing – each node shares its routing table with its immediate
neighbors periodically and when there is a change. A node shares
only the first two columns of its table to any neighbour.
Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The
tree built by reverse path forwarding.
• This method makes excellent use of bandwidth, generating the
absolute minimum number of packets necessary to do the job.
• In Fig., for example, when the sink tree of part (b) is used as the
spanning tree, the broadcast packet is sent with the minimum 14
packets.
• The only problem is that each router must have knowledge of
some spanning tree for the method to be applicable.
• Sometimes this information is available (e.g., with link state
routing, all routers know the complete topology, so they can
compute a spanning tree) but sometimes it is not (e.g., with
distance vector routing).
Multicasting
• Some applications, such as a multiplayer game or live video of
a sports event streamed to many viewing locations, send
packets to multiple receivers.
• Unless the group is very small, sending a distinct packet to
each receiver is expensive.
• On the other hand, broadcasting a packet is wasteful if the
group consists of, say, 1000 machines on a million-node
network, so that most receivers are not interested in the
message.
• Thus, we need a way to send messages to well-defined groups
that are numerically large in size but small compared to the
network as a whole.
• Sending a message to such a group is called multicasting, and
the routing algorithm used is called multicast routing.
• All multicasting schemes require some way to create and
destroy groups and to identify which routers are members of a
group.
• Each group is identified by a multicast address and that routers
know the groups to which they belong.
• Multicast routing schemes build on the broadcast routing
schemes – sending packets along spanning trees to deliver the
packets to the members of the group.
• If the group is dense, broadcast is a good start because it
efficiently gets the packet to all parts of the network. But
broadcast will reach some routers that are not members of the
group, which is wasteful.
• The solution is to prune the broadcast spanning tree by
removing links that do not lead to members. The result is an
efficient multicast spanning tree.
Various ways of pruning the spanning tree are possible:
• The simplest one can be used if link state routing is used and
each router is aware of the complete topology, including which
hosts belong to which groups. Each router can then construct
its own pruned spanning tree for each sender to the group in
question by constructing a sink tree for the sender as usual and
then removing all links that do not connect group members to
the sink node.
• Suppose that a network has n groups, each with an average of
m nodes. At each router and for each group, m pruned
spanning trees must be stored, for a total of mn trees.
• MOSPF (Multicast OSPF) is an example of a link state
protocol that works in this way.
• With distance vector routing, a different pruning strategy can
be followed. The basic algorithm is reverse path forwarding.
• However, whenever a router with no hosts interested in a
particular group and no connections to other routers receives a
multicast message for that group, it responds with a PRUNE
message, telling the neighbour (that sent the message) not to
send it any more multicasts from the sender for that group.
When a router with no group members among its own hosts
has received such messages on all the lines to which it sends
the multicast, it, too, can respond with a PRUNE message.
• In this way, the spanning tree is recursively pruned.
• DVMRP (Distance Vector Multicast Routing Protocol) is an
example of a multicast routing protocol that works this way.
• Pruning results in efficient spanning trees that use only the
links that are actually needed to reach members of the group.
• One potential disadvantage is that it is lots of work for routers,
especially for large networks.
An example of Multicast Routing
(a) A network. (b) A spanning tree for the leftmost router. (c) A
multicast tree for group 1. (d) A multicast tree for group 2.
• When many large groups with many senders exist, considerable
storage is needed to store all the trees.
• An alternative design uses core-based trees to compute a single
spanning tree for the group. All of the routers agree on a root
(called the core) and build the tree by sending a packet from
each member to the root.
• Fig. (a) (in next slide) shows a core-based tree for group 1.
• To send to this group, a sender sends a packet to the core. When
the packet reaches the core, it is forwarded down the tree. This
is shown in Fig. (b) for the sender on the right hand side of the
network.
• As a performance optimization, packets destined for the group
do not need to reach the core before they are multicast. As soon
as a packet reaches the tree, it can be forwarded up toward the
root, as well as down all the other branches. This is the case for
the sender at the top of Fig. (b).
• Having a shared tree is not optimal for all sources.
• The inefficiency depends on where the core and senders are
located, but often it is reasonable when the core is in the middle
of the senders.
• Also of note is that shared trees can be a major savings in
storage costs, messages sent, and computation.
• Each router has to keep only one tree per group, instead of m
trees. Further, routers that are not part of the tree do no work at
all to support the group.
• PIM (Protocol Independent Multicast) is the popular shared
tree approach protocol used in the Internet.
Internet Control Protocols
• In addition to IP, used for data transfer, the Internet has several
companion control protocols that are used in the network
layer. They include ICMP, ARP, RARP and DHCP.
• Let’s look at each of these in turn, describing the versions that
correspond to IPv4.
• ICMP and DHCP have similar versions for IPv6; the
equivalent of ARP is called NDP (Neighbor Discovery
Protocol) for IPv6.
Internet Control Message Protocol (ICMP)
• The ICMP has been designed to compensate the two deficiencies
of IP: lack of error control and lack of assistance mechanisms.
• It is a companion protocol to the IP.
• ICMP messages are divided into two broad categories: error-
reporting messages and query messages.
• The error-reporting messages report problems that a router or a
host (destination) may encounter when it processes an IP packet.
ICMP always reports error messages to the original source.
• The query messages, which occur in pairs, help a host or a
network manager get specific information from a router or
another host.
• Each ICMP message is encapsulated in an IP packet.
• About a dozen types of ICMP messages are defined. The most
important ones are listed in Fig.
• The DESTINATION UNREACHABLE message is used
when the router cannot locate the destination or when a packet
with the DF bit cannot be delivered because a ''small-packet''
network stands in the way.
• The TIME EXCEEDED message is sent when a packet is
dropped because its TtL counter has reached zero. This event
is a symptom that packets are looping, that there is enormous
congestion, or that the timer values are being set too low.
• The PARAMETER PROBLEM message indicates that an
illegal value has been detected in a header field. This problem
indicates a bug in the sending host's IP software or possibly in
the software of a router transited.
• The SOURCE QUENCH message was formerly used to
throttle hosts that were sending too many packets. When a host
received this message, it was expected to slow down. It is
rarely used anymore because when congestion occurs, these
packets tend to add more fuel to the fire.
• The REDIRECT message is used when a router notices that a
packet seems to be routed wrong. It is used by the router to tell
the sending host about the probable error.
• The ECHO and ECHO REPLY messages are used to see if a
given destination is reachable and alive. Upon receiving the
ECHO message, the destination is expected to send an ECHO
REPLY message back.
• The TIMESTAMP REQUEST/REPLY messages are
similar, except that the arrival time of the message and the
departure time of the reply are recorded in the reply. This
facility is used to measure network performance.
• The ROUTER ADVERTISEMENT/SOLICITATION
messages are used to let hosts find nearby routers. A host
needs to learn the IP address of at least one router to be able to
send packets off the local network.
Address Resolution Protocol (ARP)
• Although every machine on the Internet has one (or more) IP
addresses, these cannot actually be used for sending packets
because the data link layer NICs (Network Interface Cards)
such as Ethernet cards do not understand Internet addresses.
• The NICs send and receive frames based on 48-bit Ethernet
addresses.
How do IP addresses get mapped onto data link layer
addresses, such as Ethernet?
• To understand how this works, let’s use the example of Fig., in
which a small university with two switched Ethernet /24
networks is illustrated.
• One is in the Computer Science (CS) Dept., with IP address
192.32.65.0/24 and one in Electrical Engineering (EE), with IP
address 192.32.63.0/24.
• The two LANs are connected by an IP router.
• Each machine on an Ethernet and each interface on the router
has a unique Ethernet address, labeled E1 through E6, and a
unique IP address on the CS or EE network.
How a user on host 1 sends a packet to a user on host 2 on the CS
network?
• Let’s assume the sender knows the name of the intended receiver,
possibly something like eagle.cs.uni.edu.
• The first step is to find the IP address for host 2.
• This lookup is performed by the Domain Name System (DNS).
• For the moment, let’s just assume that DNS returns the IP address for host
2 (192.32.65.5).
• The upper layer software on host 1 now builds a packet with 192.32.65.5
in the Destination address field and gives it to the IP software to transmit.
• The IP software can look at the address and see that the destination is on
its own network, but it needs some way to find the destination's Ethernet
address to send the frame.
• One solution is, to have a configuration file somewhere in the system that
maps IP addresses onto Ethernet addresses.
• While this solution is certainly possible, for organizations with thousands
of machines keeping all these files up to date is an error-prone, time-
consuming job.
• A better solution is for host 1 to output a broadcast packet onto
the Ethernet asking who owns IP address 192.32.65.5. The
broadcast will arrive at every machine on the CS Ethernet, and
each one will check its IP address. Host 2 alone will respond
with its Ethernet address (E2). In this way host 1 learns that IP
address 192.32.65.5 is on the host with Ethernet address E2.
The protocol used for asking this question and getting the
reply is called ARP (Address Resolution Protocol).
• The advantage of using ARP over configuration files is the
simplicity. The system manager does not have to do much
except assign each machine an IP address and decide about
subnet masks. ARP does the rest.
• Various optimizations are possible to make ARP work more efficiently.
• To start with, once a machine has run ARP, it caches the result. Next
time it will find the mapping in its own cache, thus eliminating the need
for a second broadcast.
• In many cases, host 2 will need to send back a reply, forcing it, too, to
run ARP to determine the sender’s Ethernet address. This ARP
broadcast can be avoided by having host 1 to include its IP-to-Ethernet
mapping in the ARP packet. When the ARP broadcast arrives at host 2,
the pair (192.32.65.7, E1) is entered into host 2’s ARP cache. In fact, all
machines on the Ethernet can enter this mapping into their ARP caches.
• To allow mappings to change, for example, when a host is configured to
use a new IP address (but keeps its old Ethernet address), every
machine broadcast its mapping when it is configured. This broadcast is
generally done in the form of an ARP looking for its own IP address.
There should not be a response, but a side effect of the broadcast is to
make or update an entry in everyone’s ARP cache. This is known as a
gratuitous ARP.
• Now let’s look at Fig. again, this time assume that host 1
wants to send a packet to host 4 (192.32.63.8) on the EE
network.
• Host 1 will see that the destination IP address is not on the CS
network. It knows to send all such off-network traffic to the
router, which is also known as the default gateway.
• By convention, the default gateway is the lowest address on
the network (198.32.65.1).
• To send a frame to the router, host 1 must still know the
Ethernet address of the router interface on the CS network.
• It discovers this by sending an ARP broadcast for 198.32.65.1,
from which it learns E3. It then sends the frame.
• The same lookup mechanisms are used to send a packet from
one router to the next over a sequence of routers in an Internet
path.
• When the Ethernet NIC of the router gets this frame, it gives
the packet to the IP software. It knows from the network
masks that the packet should be sent onto the EE network
where it will reach host 4.
• If the router does not know the Ethernet address for host 4,
then it will use ARP again.
• The table in Fig. lists the source and destination Ethernet and
IP addresses that are present in the frames as observed on the
CS and EE networks.
• Observe that the Ethernet addresses change with the frame on
each network while the IP addresses remain constant (because
they indicate the endpoints across all of the interconnected
networks).
• It is also possible to send a packet from host 1 to host 4
without host 1 knowing that host 4 is on a different network.
• The solution is to have the router answer ARPs on the CS
network for host 4 and give its Ethernet address, E3, as the
response.
• It is not possible to have host 4 reply directly because it will
not see the ARP request (as routers do not forward Ethernet-
level broadcasts).
• The router will then receive frames sent to 192.32.63.8 and
forward them onto the EE network.
• This solution is called proxy ARP.
• It is used in special cases in which a host wants to appear on a
network even though it actually resides on another network.
Reverse Address Resolution Protocol (RARP)
• It finds the logical address for a machine that knows only its
physical address.
• Each host or router is assigned one or more logical (IP)
addresses, which are unique and independent of the physical
(hardware) address of the machine.
• To create an IP datagram, a host or a router needs to know its
own IP address or addresses.
• The IP address of a machine is usually read from its
configuration file stored on a disk file.
• However, a diskless machine is usually booted from ROM,
which has minimum booting information. The ROM is
installed by the manufacturer. It cannot include the IP address
because the IP addresses on a network are assigned by the
network administrator.
• The machine can get its physical address (by reading its NIC,
for example), which is unique locally. It can then use the
physical address to get the logical address by using the RARP
protocol.
• A RARP request is created and broadcast on the local network.
• Another machine on the local network that knows all the IP
addresses will respond with a RARP reply.
• The requesting machine must be running a RARP client
program; the responding machine must be running a RARP
server program.
• There is a serious problem with RARP: Broadcasting is done at
the data link layer. The physical broadcast address, in the case
of Ethernet, does not pass the boundaries of a network. This
means that if an administrator has several networks or several
subnets, it needs to assign a RARP server for each network or
subnet. This is the reason that RARP is almost obsolete.
Dynamic Host Configuration Protocol (DHCP)
• ARP (as well as other Internet protocols) makes the
assumption that hosts are configured with some basic
information, such as their own IP addresses.
How do hosts get this information?
• It is possible to manually configure each computer, but that is
tedious and error-prone. There is a better way, and it is called
DHCP (Dynamic Host Configuration Protocol).
• The DHCP has been devised to provide static and dynamic
address allocation that can be manual or automatic.
• With DHCP, every network must have a DHCP server that is
responsible for configuration.
• When a computer is started, it has a built-in Ethernet or other
link layer address embedded in the NIC, but no IP address.
• Now, the computer broadcasts a request for an IP address on
its network.
• It does this by using a DHCP DISCOVER packet.
• This packet must reach the DHCP server.
• If that server is not directly attached to the network, the router
will be configured to receive DHCP broadcasts and relay them
to the DHCP server, wherever it is located.
• A DHCP server has a database that statically binds physical
addresses to IP addresses and has a second database with a pool
of available IP addresses.
• When a DHCP client sends a request to a DHCP server, the
server first checks its static database. If an entry with the
requested physical address exists in the static database, the
permanent IP address of the client is returned. On the other
hand, if the entry does not exist in the static database, the server
selects an IP address from the available pool, assigns the address
to the client, and adds the entry to the dynamic database.
• DHCP server sends it to the host in a DHCP OFFER packet (which
again may be relayed via the router).
• To do this work, the server identifies a host using its Ethernet address
(which is carried in the DHCP DISCOVER packet).
• The DHCP server assigns an IP address for a negotiable period of time.
• The DHCP server issues a lease for a specific time. When the lease
expires, the client must either stop using the IP address or renew the
lease. The server has the option to agree or disagree with the renewal.
If the server disagrees, the client stops using the address.
• It is widely used in the Internet to configure all sorts of parameters in
addition to providing hosts with IP addresses.
• In business and home networks, DHCP is used by ISPs to set the
parameters of devices over the Internet access link, so that customers
do not need to phone their ISPs to get this information.
• Common examples of the information that is configured include the
network mask, the IP address of the default gateway, and the IP
addresses of DNS and time servers.
Congestion
• Congestion occurs in packet-switched networks.
• Congestion in a network may occur if the load on the network
(the number of packets sent to the network) is greater than the
capacity of the network (the number of packets a network can
handle).
• Congestion control refers to the mechanisms/techniques to
control the congestion and keep the load below the capacity or
refers to techniques/mechanisms that can either prevent
congestion, before it happens, or remove congestion, after it has
happened.
• Congestion control involves two factors that measure the
performance of a network: delay and throughput.
• The network and transport layers share the responsibility for
handling congestion.
• Figure depicts the onset of congestion.
Goodput: is the rate at which useful packets are
delivered by the network.
• By having routers drop packets before the situation has become
hopeless (hence the ''early'' in the name), the idea is that there is
time for action to be taken before it is too late.
• To determine when to start discarding, routers maintain a running
average of their queue lengths. When the average queue length on
some line exceeds a threshold, the line is said to be congested and
action is taken.
• Since the router probably cannot tell which source is causing
most of the trouble, picking a packet at random from the queue is
probably as good as it can do.
• In some transport protocols (including TCP), the response to lost
packets is for the source to slow down. This fact can be exploited
to help reduce congestion.
• The source will eventually notice the lack of acknowledgement
and will respond by slowing down instead of trying harder, since
it knows that lost packets are generally caused by congestion.
Further:
• A router drowning in packets can just pick packets at random to
drop, but usually it can do better than that.
• For many applications, some packets are more important than
others. For example, in file transfer, an old packet is worth more
than a new one. In contrast, for multimedia, a new packet is more
important than an old one.
• Hence, prioritization can be considered.
Jitter Control
• The variation (i.e., standard deviation) in the packet arrival
times is called jitter.
• Jitter is shown in Fig.
How Jitter is bounded?
• The jitter can be bounded by computing the expected transit
time for each hop along the path.
• When a packet arrives at a router, the router checks to see how
much the packet is behind or ahead of its schedule.
• This information is stored in the packet and updated at each
hop.
• If the packet is ahead of schedule, it is held just long enough to
get it back on schedule.
• If it is behind schedule, the router tries to get it out the door
quickly.
Figure. (a) High jitter (b) Low jitter
• In fact, the algorithm for determining which of several packets
competing for an output line should go next can always choose the
packet furthest behind in its schedule.
• In this way, packets that are ahead of schedule get slowed down
and packets that are behind schedule get speeded up, in both cases
reducing the amount of jitter.
Elimination of Jitter:
• In some applications, such as video on demand, jitter can be
eliminated by buffering at the receiver and then fetching data for
display from the buffer instead of from the network in real time.
• However, for other applications, especially those that require real-
time interaction between people such as Internet telephony and
videoconferencing, the delay inherent in buffering is not
acceptable.
Traffic Shaping
• Before the network can make QoS guarantees, it must know what
traffic is being guaranteed.
• However, traffic in data networks is bursty. It typically arrives at
non-uniform rates as the traffic rate varies (e.g.,
videoconferencing with compression), users interact with
applications (e.g., browsing a new Web page), and computers
switch between tasks.
• Bursts of traffic are more difficult to handle than constant-rate
traffic because they can fill buffers and cause packets to be lost.
• Traffic shaping is a mechanism to control the amount and the rate
of the traffic sent to the network. Two techniques can shape traffic:
leaky bucket and token bucket.
• When a flow is set up, the user and the subnet (i.e., the customer
and the provider) agree on a certain traffic pattern (i.e., shape) for
that flow. Sometimes this is called a service level agreement.
• As long as the customer fulfills her part of the bargain and only
sends packets according to the agreed-on contract, the provider
promises to deliver them all in a timely fashion.
• Traffic shaping reduces congestion and thus helps the network
live up to its promise.
• Monitoring a traffic flow is called traffic policing.
• Agreeing to a traffic shape and policing it afterward are easier
with virtual-circuit subnets than with datagram subnets.
• However, even with datagram subnets, the same ideas can be
applied to transport layer connections.
Leaky Bucket Algorithm
• Try to imagine a bucket with a small hole in the bottom, as
illustrated in Fig.(b).
• No matter the rate at which water enters the bucket, the outflow is
at a constant rate, R, when there is any water in the bucket and zero
when the bucket is empty.
• The input rate can vary, but the output rate remains constant.
• Also, once the bucket is full to capacity B, any additional water
entering it spills over the sides and is lost.
• Conceptually, each host is connected to the network by an interface
containing a leaky 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.
• This technique is called the leaky bucket algorithm.
• A leaky bucket algorithm shapes bursty traffic into fixed-rate traffic
by averaging the data rate.
Leaky Bucket Algorithm