Professional Documents
Culture Documents
CN 5 PDF
CN 5 PDF
com
JNTUWORLD
Internetworking Styles:
(Connection-Oriented)
Datagram Model
(Connection-Less)
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
Once data packets begin following along the path, each gateway relays incoming packets,
converting between packet formats and virtual circuit numbers as needed. Clearly, all data
packets must traverse the same sequence of gateways, and thus arrive in order.
The essential feature of this approach is that a sequence of virtual circuits is set up from
the source through one or more gateways to the destination. Each gateway maintains tables
telling which virtual circuits pass through it, where they are to be routed, and what the new
virtual circuit number is.
Datagram Model:
In this model, the only service the n/w layer offers to the transport layer is the ability to inject
datagrams into the subnet and hope for the best. Datagrams from one host to another host travel
through different routes through the inter network. A routing decision is made separately for
each packet, possibly depending on the traffic at the moment the packet is sent. This strategy can
use multiple routes and thus achieve a higher band width than the concatenated virtual circuit
model.
Error!
A major disadvantage of datagram model to internet working is that it can be used over the
subnets that do not use virtual circuits inside.
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
Issue
1.
Circuit setup
Not required
Required
2.
Addressing
3.
State
information
Routing
4.
5.
Congestion
control
Difficult
Easy, if enough buffers
can be allocated in
advance for each virtual
circuit
Routing algorithms:
A routing algorithm is that part of the network layer software responsible for deciding
which output line an incoming packet should be transmitted on. Each routing algorithm possess
certain properties like
Correctness
Simplicity
Stability
Optimality
Fairness
Robustness
Non-adaptive routing algorithms are those that do not base their routing decisions on
measurements or estimates of the current traffic and topology. The choice of the root to use to
get from I to J is computed in advance, off-line and downloaded to routers when N/W is booted .
3
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
Adaptive routing algorithms are those that base their routing decisions on measurements, or
estimates of the current traffic and topology.
Non-Adaptive Routing Algorithms:
Flooding
(a). Shortest Path Routing: It is used to build a graph of the subnet, with each node of graph
representing a router and each arc of the graph representing a communication line. To choose a
route between a given pair of routers, the algorithm just finds the shortest path between them on
the graph. Different ways of measuring the path length is the number of Hops, Geographical
distance in kmts, Mean Queuing delay, Transmission delay, Functions of distance, Bandwidth,
Average traffic, communication cost etc.,
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
H(8,F)
F(6,E)
E(4,B)
B(2,A)
(C). Flooding: If every incoming packet is sent out on every outgoing line except the one it
arrived on, it is called Flooding.
Flooding obviously generates vast numbers of duplicate packets. To damp this process, several
techniques can be employed:
1. To have a hop counter contained in the header of each packet, which is decremented at
each hop, with the packet being discarded when the counter reaches zero. Initially, the
hop counter should be initialized to the length of the path from source to destination.
2. To keep track of which packets have been flooded so that they can be avoided sending
second time. This is achieved by having the source router put a sequence number in each
packet it arrives from its hosts. Each router then needs a list per source router telling
which sequence numbers originating at that source have already been seen. If an
incoming packet is on the list, it is not flooded.
Selective Flooding:
The algorithm in which the routers do not send every incoming packet out on every
line but only on those lines that are going approximately in the right direction
Uses of Flooding:
1. In military, where large number of routers may be blown to bits at any instant.
2. In distributed database applications, it is sometimes necessary to update all the databases
concurrently.
3. As a metric against which other routing algorithms can be compared.
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
An estimate of time or distance (no of hops, or time delay or queue length) for that
destination
Eg: Consider an example in which delay is used as a metric. Compute a Routing table J from
the given subnet.
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
New routing table for J can be computed from its neighbors as follows:
From J
8
20
28
20
17
30
18
12
10
0
6
15
Line to be followed
A
A
I
H
I
I
H
H
I
K
K
Draw backs:
It reacts Rapidly to Good News
Leisurely to Bad News
Good news propagation
Suppose A is down initially, and all other routers know this. When A comes up, other routers
learn about it via the vector changes.The Good news spreads at the rate of one hop per exchange.
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
Suppose initially, all the lines and routers are up. Suddenly A goes down.
From the above, it is clear that the bad news travels slowly.
Initially, if CD goes down. This bad news is propagated at a rate of one hop per exchange using
split-horizon hack.
Both A and B tell C that they cannot get to D. Thus C immediately concludes that D
is unreachable and reports this to both A and B. unfortunately, A hears that B has a path of
length 2 to D, so it assumes it can get to D via B in 3 hops. Similarly B concludes it can get
to D via A in 3 hops. On the next exchange, they each set their distance to 4.
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
Level 1
Routers
Level 2
Regions
Level 3
Clusters
Level 4
Zones
Level 5
Zonal regions
E.g:
With 2-level hierarchy, Hierarchical routing has reduced the table form 17to 7 entries
Region-1 is considered along with its local routers .
Regions-2, 3,4,5 are considered as other routers.
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
E.g: Consider a subnet with 720 routers ( Routing table entries can be reduced using higher
levels in Hierarchical Routing)
10
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
Sender maintains multiple destinations address and sends packets to each of them,
simultaneously.
Flooding.
Multi Destination Routing i.e., each packet contains either a list of destinations or a
bitmap indicating the desired destinations, and when a packet arrives at a router, the
router checks all the destinations to determine the set of opposite lines that will be
needed. The router generates a new copy of the packet for each packet only those
destinations those are to use the line.
Working:
On the first hop, I sends packets to F, H, J and N as indicated by the second row of the tree.
Each of these packets arrives on preferred path to I and is so indicated by a circle around the
letter.
11
www.jntuworld.com
www.jntuworld.com
JNTUWORLD
On the second hop, eight packets are generated, 2 by each of the routers that received a
packet on the first hop.
As it turns out, all 8 of these arrive at previously unvisited routers and 5 of these along the
preferred line.
Of the six packets generated on the third hop, only 3 arrive on the preferred path. The others
are duplicates.
After 5 hops and 23 packets the broadcasting terminates, compared with 4 hops and 14
packets had the sink tree been followed exactly.
To do multicasting, each router computes a spanning tree covering all other routers in the
subnet.
Eg:-
A subnet
When a process sends a multicast packet to a group, the first router examines its spanning
tree and prunes it, removing all lines that do not lead to hosts that are members of the group.
Pruning can be done using link state routing or distance vector routing.
12
www.jntuworld.com