0% found this document useful (0 votes)
7 views84 pages

Unit 3

The document discusses various design issues and algorithms related to the transport layer of networking, including routing algorithms such as distance vector and link state routing, as well as congestion control methods. It explains the differences between connection-oriented and connectionless services, detailing how data packets are routed and managed in networks. Additionally, it covers the implementation of routing algorithms, their properties, types, and challenges such as the Count to Infinity problem in distance vector routing.

Uploaded by

sriradhan1802
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views84 pages

Unit 3

The document discusses various design issues and algorithms related to the transport layer of networking, including routing algorithms such as distance vector and link state routing, as well as congestion control methods. It explains the differences between connection-oriented and connectionless services, detailing how data packets are routed and managed in networks. Additionally, it covers the implementation of routing algorithms, their properties, types, and challenges such as the Count to Infinity problem in distance vector routing.

Uploaded by

sriradhan1802
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 84

Unit 3

Design issues:Services provided to


Transport Layer-
Routing Algorithms:Shortest Path Events-
Distance Vector Routing-Link State
Routing-
Congestion control Algorithms-Traffic
aware Routing-Admission control-
Internetworking:Tunneling-Internetwork
Routing-Packet Fragmentation
Services provided to transport layer
• Interface between carrier and customer
• Carrier has control of control
• Job is to deliver packets
Goals
• Service should be independent of subnet
technology
• Transport layer should be shielded from a number,
type and topology of the subnet task
• Network addresses made available to the transport
layer should has a uniform numbering plan,even
Properties

• Before sending data network layer process on sending side


must set up a connection to its peer on receiving side
connection is identified by special identifier until data is send
• When a connection is set up the two process can enter into
the negotiation about the parameter,quality and cost of
service to be provided
• Communication in both direction packets are delivered in
sequence
• Flow control is provided automatically to prevent a fast
sender from dumping into the pipe at higher rate than
receiver can take out this leads to overflow
• Internet is a connectionless oriented service(path is
not reserved data is send independentely and take
to different routes in destination)
• ATM is a connection oriented service(path is
reserved)
• Based on carrier provided subnet internet works on
ATM network
• Source host establishes a ATM network layer
connection to the destination host and send IP
packets over that
• the ATM network is divided into logical IP
subnetworks (LISs). Each LIS is comprised of
some number of ATM stations. LISs are
analogous to traditional LAN segments.
Store and forward packet switching
• the Internet Service Provider (ISP) has six routers (A to F) connected
by transmission lines shown in blue lines.
• There are two hosts, host H1 is connected to router A, while host H2
is connected to router D.
• Suppose that H1 wants to send a data packet to H2. H1 sends the
packet to router A. The packet is stored in router A until it has
arrived fully.
• Router A verifies the checksum using CRC (cyclic redundancy check)
code.
• If there is a CRC error, the packet is discarded, otherwise it is
transmitted to the next hop, here router F. The same process is
followed by router F which then transmits the packet to router D.
• Finally router D delivers the packet to host H2.
Implementation of connectionless service

• When connectionless service is offered, packets are


frequently called Datagrams (just like telegrams)
because individual packets are injected to the subnet
and are routed individually.
• No advance setup is required. Subnets are called
Datagram subnets.
• When Connection oriented service is provided, then
before any packet is sent a path from source router to
destination router is established. This connection is
called Virtual Circuit and the subnet is called Virtual
Circuit subnet
• Step 1:Suppose there is a process P1 on host H1 and is having a message to
deliver to P2 on host H2. P1 hands the message to the transport layer
along with instructions to be delivered to P2 on H2.
• Step 2 − Transport Layer code is running on H1 and within the operating
system. It prepends a transport header to the message and the end result
is given to the network layer
• Step 3 − Let us assume for this example a packet which is four times
heavier than the maximum size of the packet, then the packet is broken to
four different packets (1,2,3,4)and each of the packet is sent to the router
A using point to point protocol and from this point career takes over.
• Step 4 − Each router will have an internal table saying where packets to be
sent. Every table entry is a pair consisting of a destination and outgoing
line to use for that destination. Only directly connected lines can be used.
• Step 5 − For example , therefore every incoming packet must be
sent to one of these routers, even if the ultimate destination will be
some other router.
• Step 6 − As the packets arrived at A, packet 1,2,3 and 4 were stored
in brief. Then every packet is moved to C as per A’s table. Packet 1 is
forwarded to E and then moved to F. When packet 1 is moved to F,
then it will be encapsulated in a data link layer and sent to H2 over
to LAN. Packet 2 and 3 will also follow the same route.
• Step 7 − When packet 4 reaches A, then it was sent to router B, even
if the destination was F. For some purpose A decided to send packet
4 through a different route. It was because of the traffic jam in ACE
path and the routing table was updated. Routing Algorithm decides
routes, makes routing decisions and manages routing tables.
Connection oriented service
• Need a virtual-circuit subnet for connection-oriented
service
• Virtual circuits were designed to avoid having to choose
a new route for every packet sent.
• Instead, a route from the source machine to the
destination machine is chosen as part of the connection
setup and stored in tables inside the routers,
• when a connection is established. That route is utilised
for all traffic flowing over the connection, and exactly
the same manner even telephone works.
• The virtual circuit is also terminated, when the
connection is released.
• In connection-oriented service, every packet
will have an identifier which tells to which
virtual circuit it belongs to
• Step 1 − Host H1 has established connection 1 with host H2,
which is remembered as the first entry in every routing table.
• Step 2 − The first line of A’s infers when packet is having
connection identifier 1 is coming from host H1 and has to be
sent to router W and given connection identifier as 1.
• Step 3 − Similarly, the first entry at W routes the packet to Y,
also with connection identifier 1.
• Step 4 − If H3 also wants to establish a connection to H2 then
it chooses connection identifier 1 and tells the subnet to
establish the virtual circuit. This will be appearing in the
second row in the table.
• Step 5 − Note that we have a conflict here because
although we can easily distinguish connection 1
packets from H1 from connection 1 packet from H3,
W cannot do this.
• Step 6 − For this reason, we assign a different
connection identifier to the outgoing traffic for the
second connection. Avoiding conflicts of this kind is
why routers need the ability to replace connection
identifiers in outgoing packets. In some contexts,
this is called label switching.
Comparision of VC and DC
• Virtual Circuits are computer networks that offer connection-oriented
services,
• Datagram networks offer connection-less services.
Virtual circuit:
• Connection-oriented switching is another name for virtual circuits.
Before messages are sent, a virtual circuit switching sets a
predetermined routing.
• This route is referred to as a virtual circuit since it gives the user the
impression that a passionate physical circuit exists.
• The call request and call accept packets are used to establish the
connection between the sender and the recipient
• The term "virtual circuit" refers to a logical link between two network
nodes, typically in a communications network
The sender and receiver are linked together using the call request
and call accept packets. Once a path has been established, data will
be transferred.
Datagram circuit
• The switch uses the destination information contained in each
packet to direct it to the intended location.
• Since no specific channel is classified for a connection session, there
is no need to reserve resources.
• As a result, packets have a header with all of the information about
the destination.
• A packet's header is examined by the intermediate nodes, which
then select an appropriate link to another node that is closer to the
destination.
• Datagram networks assign resources according to the First-Come-
First-Serve (FCFS) principle. Regardless of its source or destination, if
another packet is being processed when a packet arrives at a router,
it must wait.
Connectionless and connection oriented
Routing algorithms
• A routing algorithm is a procedure that lays down the route
or path to transfer data packets from source to the
destination.
• They help in directing Internet traffic efficiently. After a data
packet leaves its source, it can choose among the many
different paths to reach its destination.
• Routing algorithm mathematically computes the best path,
i.e. “least – cost path” that the packet can be routed
through.
• Datapackets flows only in a established route so it called
session routing because it keep same route for entire session
Once packet arrived it looks for outgoing line to use it by refer the routing
table this process is called forwarding
Properties:
simplicity
Correctness
Robustness
Stability
Fairness
Efficiency
First 3 properties is common in networks routing
Stability is the major goal in routing algorithms
By using fixed path packets are transfer in network
Last 2 is common in network routing
Two types

Routing algorithms can be broadly categorized


into two types
• Adaptive(dynamic)
• Nonadaptive(static)
Adaptive
Adaptive routing algorithms, also known as
dynamic routing algorithms, makes routing
decisions dynamically depending on the
network conditions.
It constructs the routing table depending upon
the network traffic and topology.
• Centralized algorithm(routing table) − It finds the least-
cost path between source and destination nodes by
using global knowledge about the network. So, it is also
known as global routing algorithm.
• Isolated algorithm − This algorithm procures the routing
information by using local information instead of
gathering information from other nodes.
• Distributed algorithm − This is a decentralized
algorithm that computes the least-cost path between
source and destination iteratively in a distributed
manner.
Non-adaptive Routing algorithms
• This is also known as static routing
algorithms, construct a static routing table to
determine the path through which packets are
to be sent.
• The static routing table is constructed based
upon the routing information stored in the
routers when the network is booted up.
• Flooding − In flooding, when a data packet
arrives at a router, it is sent to all the outgoing
links except the one it has arrived on. Flooding
may be uncontrolled, controlled or selective
flooding.
• Random walks − This is a probabilistic
algorithm where a data packet is sent by the
router to any one of its neighbours randomly.
Optimality principle
• The purpose of a routing algorithm at a router is to decide
which output line an incoming packet should go. The optimal
path from a particular router to another may be the least cost
path, the least distance path, the least time path, the least
hops path or a combination of any of the above
• If a better route could be found between router J and router
K, the path from router I to router K via J would be updated via
this route. Thus, the optimal path from J to K will again lie on
the optimal path from I to K.
• Loop should not be formed
• identify the possible path,then path to be chosen the tree
comes from general structure called DAG
• Consider a network of routers, {G, H, I, J, K, L,
M, N} as shown in the figure.
• Let the optimal route from I to K be as shown
via the green path, i.e. via the route I-G-J-L-K.
According to the optimality principle, the
optimal path from J to K with be along the
same route, i.e. J-L-K.
Green line –optimal path
Orange line-optimal path
• Now, suppose we find a better route from J to
K is found, say along J-M-N-K. Consequently,
we will also need to update the optimal route
from I to K as I-G-J- M-N-K, since the previous
route ceases to be optimal in this situation.
This new optimal path is shown line orange
lines in the following figure
Shortest path algorithm
• In shortest path routing, the topology
communication network is defined using a directed
weighted graph.
• The nodes in the graph define switching
components and the directed arcs in the graph
define communication connection between
switching components.
• Each arc has a weight that defines the cost of
sharing a packet between two nodes in a specific
direction
• Consider that a network comprises of N vertices (nodes or
network devices) that are connected by M edges
(transmission lines).
• Each edge is associated with a weight, representing the
physical distance or the transmission delay of the transmission
line.
• The target of shortest path algorithms is to find a route
between any pair of vertices along the edges, so the sum of
weights of edges is minimum.
• If the edges are of equal weights, the shortest path algorithm
aims to find a route having minimum number of hops.
Example
Flooding(no forwarding 0r backtracking)

• Flooding is a non-adaptive routing technique


following this simple method: when a data
packet arrives at a router, it is sent to all the
outgoing links except the one it has arrived on.
Using flooding technique −
• An incoming packet to A, will be sent to B, C
and D.
• B will send the packet to C and E.
• C will send the packet to B, D and F.
• D will send the packet to C and F.
• E will send the packet to F.
• F will send the packet to C and E
Types of Flooding

• Uncontrolled flooding − Here, each router unconditionally


transmits the incoming data packets to all its neighbours.
• Controlled flooding − They use some methods to control
the transmission of packets to the neighbouring nodes.
The two popular algorithms for controlled flooding are
Sequence Number Controlled Flooding (SNCF) and
Reverse Path Forwarding (RPF).
• Selective flooding − Here, the routers don't transmit the
incoming packets only along those paths which are
heading towards approximately in the right direction,
instead of every available paths.
Distance vector routing
• distance-vector routing protocol in data networks
determines the best route for data packets based
on distance.
• Distance-vector routing protocols measure the
distance by the number of routers a packet has to
pass.
• It maintains a table specifies the exchange of
information with the neighbours
• Every route knows the best link to reach destination
• It is also called bellman ford algorithm
Routing Table
• Two process occurs:
• Creating the Table
• Updating the Table
Creating the Table
• Initially, the routing table is created for each router that contains
atleast three types of information such as Network ID, the cost and
the next hop.
• NET ID: The Network ID defines the final destination of the packet.
• Cost: The cost is the number of hops that packet must take to get
there.
• Next hop: It is the router to which the packet must be delivered.
• A sends its routing table to B, F & E.
• B sends its routing table to A & C.
• C sends its routing table to B & D.
• D sends its routing table to E & C.
• E sends its routing table to A & D.
• F sends its routing table to A.
Count to infinity problem

the Bellman-Ford algorithm will work such that for each router, they will have
entries for each other. Router A will infer that it can reach B at a cost of 2
units, and B will infer that it can reach C at a cost of 1 unit.
• where the connection between B and C gets disconnected. In
this case, B will know that it cannot get to C at a cost of 1
anymore and update its table accordingly.
• it can be possible that A sends some information to B that it is
possible to reach C from A at a cost of 2.
• Then, since B can reach A at a cost of 1, B will erroneously
update its table that it can reach C via A at a cost of 1 + 2 = 3
units. A will then receive updates from B and update its costs
to 4, and so on
• Thus, the process enters into a loop of bad feedback and the
cost shoots towards infinity. This entire situation is called the
Count to Infinity problem.
Link state routing
• ARPANET (transfer the data at a long distance
without using mobile such media) distance
vector routing is identified in 1970
• Link state routing replace this how means it
(count to infinity) is a task that attain in
topology
• If any failure occurs means transmission takes
long time to reach the data
5 rules
• Discover the neighbours and learn the network
address
• Set the distance or cost metric to each of its
neighbours
• Construct a packet telling all it learned
• Send this packet to and receive packets from all
other routers
• Compute the shortest path to every other
router
Learning about the neighbours
• Identify the nearest neighbours initially
through LAN it will be connected. Later
through artificial network N is created through
A,C,F is are connected
• now only one node N plays a role in
connecting all nodes
Selecting Link cost
• It need cost metric to identify the shortest
path
• Cost is set automatically by network
configuration
• Based on bandwidth it is calculated
• If any delay at that time ECHO packet is used
to retransmit the data
Building link state packets
• Based on the cost given in network the table is created
with source and destination address with cost
parameter
• When Information needed for exchange is collected, a
router then builds a packet containing all the data.
• The packet starts with the identity of the sender,
followed by a sequence number( A sequence number is
a consecutive number in a sequence of numbers,
usually of real integers)and age, and a list of neighbors.
For each neighbor, the delay to that neighbor is given
Congestion control
• Too many packets lies in the same network cause
packet delay and loss of packets that shows in
worst performance
• This situation is congestion
• Network layer and transport layer is responsible
for handling congestion
• Congestion usually occurs within network
network layer directly experinece this
• And it decide what to do with this excess packets
• Control the congestion to reduce the load that the
transport layer is placing on network
• To reduce this both transport layer and network layer
work together
• When number of packets host send in the network is well
within its carrying capacity then the number of delivery is
proportional to number sent
• If twice as many as are sent then twice is to be delivered
• Here there is no of packets means the router maintains a
buffer inside before getting acknowledgement it wont
removed
• Goodput-the rate at which useful packets are
delivered
• Congestion collapse- when send data packets is
beyond the capacity is identifies and recovered
• Capacity of network is always ideal in nature
• Onset of congestion-identify the congestion
• Desirable response- predicts the congestion and
removes its with the help of router buffer then
move to ideal state
Congestion Control and Avoidance
• Congestion Control is concerned with
efficiently using a network at high load.
• Several techniques can be employed.
These include:
• The first 2 deals with congestion deduction
and last two deals with congestion avoidence
Principles of Congestion Control

Congestion:
• • informally: “too many sources sending too
much data too fast for network to handle”
• •different from flow control!
• this is = to end-to-end issue!
• lost packets (buffer overflow at routers)
• long delays (queue-ing in router buffers)
Causes of Congestion

• Two senders, Two receivers


• •One router, Infinite buffers
• •No retransmission
Approaches towards congestion control
Congestion Detection and Control

The following 3 Methods are used to Detect &


Control the Congestions :
• Warning bit
• Choke packets
• Load shedding
Warning Bit

– A special bit in the packet header is set by the


router to warn the source when congestion is
detected.
– The bit is copied and piggy-backed on the ACK and
sent to the sender.
– The sender monitors the number of ACK packets it
receives with the warning bit set and adjusts its
transmission rate accordingly.
Choke Packets

– A more direct way of telling the source to slow


down.
– A choke packet is a control packet generated at a
congested node and transmitted to restrict traffic
flow.
– The source, on receiving the choke packet must
reduce its transmission rate by a certain
percentage.
Load Shedding(discard the old packet
data)
– When buffers become full, routers simply discard
packets.
– Which packet is chosen to be the victim depends on the
application and on the error strategy used in the data
link layer.
– For a file transfer, for, e.g. cannot discard older packets
since this will cause a gap in the received data.
– For real-time voice or video it is probably better to
throw away old data and keep new packets.
– Get the application to mark packets with discard
priority.
Congestion Avoidance

• The following 2 Methods are used to Avoid


the Congestions :
• Random Early Discard
• Traffic Shaping
Random Early Discard (RED)

– This is a proactive approach in which the router


discards one or more packets before the buffer
becomes completely full.
– Each time a packet arrives, the RED algorithm
computes the average queue length, avg.
– If avg is lower than some lower threshold,
congestion is assumed to be minimal or non-
existent and the packet is queued.
cont…
– If avg is greater than some upper threshold,
congestion is assumed to be serious and the
packet is discarded.
• If avg is between the two thresholds, this
might indicate the onset of congestion. The
probability of congestion is then calculated
Traffic Shaping

– Another method of congestion Avoidance is to


“shape” the traffic before it enters the network.
– Traffic shaping controls the rate at which packets
are sent (not just how many). Used in ATM and
Integrated Services networks.
– At connection set-up time, the sender and carrier
negotiate a traffic pattern (shape).
– Two traffic shaping algorithms are:
• Leaky Bucket
• Token Bucket
Traffic aware routing
• Traffic awareness is one of the approaches for
congestion control over the network.
• The basic way to avoid congestion is to build a network
that is well matched to the traffic that it carries.
• If more traffic is directed but a low-bandwidth link is
available, congestion occurs.
• The main goal of traffic aware routing is to identify the
best routes by considering the load, set the link weight
to be a function of fixed link bandwidth and propagation
delay and the variable measured load or average
queuing delay.
• Least-weight paths will then favour paths that
are more lightly loaded, remaining all are
equal.
• Step 1 − Consider a network which is divided
into two parts, East and West both are
connected by links CF and EI.
• Step 2 − Suppose most of the traffic in
between East and West is using link CF, and as
a result CF link is heavily loaded with long
delays. Including queueing delay in the weight
which is used for shortest path calculation will
make EI more attractive.
• Step 3 − After installing the new routing tables,
most of East-West traffic will now go over the EI
link. As a result in the next update CF link will
appear to be the shortest path.
• Step 4 − As a result the routing tables may oscillate
widely, leading to erratic routing and many
potential problems.
• Step 5 − If we consider only bandwidth and
propagation delay by ignoring the load, this
problem does not occur.
• Step 6 − Two techniques can contribute for
successful solution, which are as follows −
Multipath routing
• Creating a multiple path from source to
destination
The routing scheme to shift traffic across routes
adjusting the routing table according to the
network and load this adjustment is called traffic
engineering
Admission control
• The presence of congestion means the load is
greater than the resources available over a network
to handle.
• To reduce the congestion by trying to increase the
resources or decrease the load, but it is not that
much of a good idea.
• There are some approaches for congestion control
over a network which are usually applied on
different time scales to either prevent congestion or
react to it once it has occurred.
• It is one of techniques that is widely used in
virtual-circuit networks to keep congestion at bay.
• The idea is do not set up a new virtual circuit
unless the network can carry the added traffic
without becoming congested
• Admission control can also be combined with
traffic aware routing by considering routes
around traffic hotspots as part of the setup
procedure.
• Take two networks
(a) A congestion network and
(b) The portion of the network that is not
congested. A virtual circuit A to B is also shown
below
• Step 1 − Suppose a host attached to router A wants
to set up a connection to a host attached to router
B. Normally this connection passes through one of
the congested routers.
• Step 2 − To avoid this situation, we can redraw the
network as shown in figure (b), removing the
congested routers and all of their lines.
• Step 3 − The dashed line indicates a possible route
for the virtual circuit that avoids the congested
routers.
TRAFFIC THROTTLING
• Traffic throttling is one of the approaches for
congestion control. In the internet and other
computer networks, senders trying to adjust
the transmission need to send as much traffic
as the network can readily deliver.
• In this setting the network aim is to operate
just before the onset of congestion.
• There are some approaches to throttling traffic that can
be used in both datagram and virtual-circuit networks.
EACH SOLVES TWO PROBLEMS
1)Firs
• Routers have to determine when congestion is
approaching ideally before it has arrived. Each router
can continuously monitor the resources it is using.
• Utilisation of output links.
• Buffering of queued packets inside the router.
• Numbers of packets are lost due to insufficient buffering
• Explicit Congestion Notification (ECN)
• Step 1 − Instead of generating additional packets to warn
of congestion, a router can tag any packet it forwards by
setting a bit in the packet header to signal that it is
experiencing congestion.
• Step 2 − When the network delivers the packet, the
destination can note that there is congestion and inform
the sender when it sends a reply packet.
• Step 3 − The sender can then throttle its transmissions as
before.
• Step 4 − This design is called explicit congestion
notification and is mostly used on the Internet.
Assured routing

You might also like