0% found this document useful (0 votes)
3 views15 pages

Unit Iii

The document discusses the network layer, focusing on design issues, routing algorithms, and congestion control. It covers the implementation of connection-oriented and connectionless services, compares virtual circuit and datagram networks, and details various routing algorithms like shortest path, flooding, distance vector, and link state routing. Additionally, it addresses congestion control methods, including open and closed loop solutions, admission control, and traffic throttling.

Uploaded by

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

Unit Iii

The document discusses the network layer, focusing on design issues, routing algorithms, and congestion control. It covers the implementation of connection-oriented and connectionless services, compares virtual circuit and datagram networks, and details various routing algorithms like shortest path, flooding, distance vector, and link state routing. Additionally, it addresses congestion control methods, including open and closed loop solutions, admission control, and traffic throttling.

Uploaded by

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

UNIT III

Network Layer

Network layer design issues: Store and forward packet switching- services provided to the
transport layer- Implementation of connection less service-Implementation of connection oriented
service-Comparison of virtual circuit and datagram networks. Routing algorithms: Shortest path
algorithms-flooding-distance vector routing-Links state routing congestion control algorithms:
Approaches to congestion control-Load shedding.

Network layer design issues:

• Network layer routes packets from source to destination.


• Network layer design issues include the following.
▪ Store and forward packet switching
▪ Services provided to transport layer
▪ Implementation of connection oriented
▪ Implementation of connection less services
▪ Comparison of vc and datagram networks

Services provided to transport layer:

• Network layer provides services to the transport layer at the network layer and
transport layer interface.
• The services should be independent of router technology.
• In theory, network layer provides both connection oriented and connection less
services, reliable, unreliable services.
• But practically reliable connection oriented service and unreliable connection less
service is followed.
• Connection oriented service should have following properties before sending data.
1) Establish a connection
2) Use a connection
3) Release a connection
• Communication is in both direction and sequence.
Implementation of connection oriented service (Virtual circuit subnet):

• Before sending a data, circuit setup is needed.


• No need to specify full destination address.
• Each packet contains short virtual circuit number.
• Each virtual circuit requires subnet table.
• Routing decision is made only when a virtual circuit is set.
• All packets follow the same route.
• When router fails, all virtual circuits passed through the failed router are terminated.

B C D

VC no.:

A E

H G F

Implementation of connection less services:

• Before sending data, no circuit setup is needed.


• Need to specify full destination address.
• No virtual circuit number is given.
• Subnet does not contain state information.
• Routing decision made for each packet.
• All packets follow different routes.
• When router get failure, packet passed through the failed router only terminated.

Comparison of virtual circuit and datagram networks:


Issue Virtual circuit Datagram

Circuit Setup Request setup Not needed

Addressing Not required to specify full Required to specify full


address address

State information Have a subnet table Does not have subnet table
and follows no state
information.
Routing Route choosen when virtual Each packet is routed
circuit is setup all packets independently.
follow this route
Router failure All virtual circuit passed Packets passed through fail
through the failed router are router are only terminated.
terminated

Store and forward packet switching:

• A host with a packet to send transmits its to the nearest router, either on LAN, or
point link to the ISP.
• A packet is stored there until it has fully arrived and the output line is free.
• Then it is forwarded to the next router along the until it reaches the destination host.

ISP’s equipment
Routers
B C
Host 1 A
1
A G Host 2
D

F E

Packet
Routing Algorithms:
• The main function of the network layer is routing packets from source to
destination.
• Routing algorithms gives best output line.
Properties of routing algorithms:
• Simplicity - Easy to understand
• Roburstness - For testing
• Stability - Security
• Correctness - Being error free

Two major classes of routing algorithms are,


1) Non adaptive
2) Adaptive
Non Adaptive Algorithms:
• It is some time called static routing.
• Routing decision do not based on traffic and topology.
• Routers are computed in advance.
Adaptive Algorithms:
• It is some times called dynamic algorithms.
• Routing decision based on traffic and topology
• Routing Algorithms are,
1) Shortest path routing
2) Flooding routing
3) Distance vector routing
4) Link state routing
Shortest Path Routing:
• It is non-adaptive algorithm.
• This algorithm is simple and it is easy to understand.
• It is consider only load non-traffic.
• Build a graph of the subnet with router as node and communication lines as arc of
the graph.
• Then find the shortest path from graph.
• Initially all node labeled as(α,-).
• When shortest path is discovered, that node is marked as permanent node.
• Each permanent node is labeled as distance, previous permanent node.
Example:
Find the shortest path from A to D

B 7 C
2 2 3 3

A E F D
4
6 G 4 4 H 2

The possible paths are,

A-B, B-C, C-D = 2+7+3=12

A-G, G-H, H-D = 6+4+2=12

A-B, B-E, E-F, F-C, C-D = 2+2+2+3+3=12

A-G, G-E, E-F, F-H, H-D = 6+1+2+4+2=15

A-G, G-E, E-F, F-C, C-D = 6+1+2+3+3=15

A-B, B-E, E-F, F-H, H-D = 2+2+2+4+2=12


A-B, B-E, E-G, G-H, H-D = 2+2+1+4+2=11
The shortest distance is 11. So choose the path as follows,

A-B, B-E, E-G, G-H, H-D.

Travelling of packets:

Initial stage:

B(α,-) C(α,-)

2 2 3 3

A(α,-) E(α,-) 2 F(α,-) D(α,-)

6 1 4 2

G(α,-) 4 H(α,-)

First stage A-B:

B (2,A) 7 C(α,-)

2 2 3 3

A(α,-) E(α,-) F(α,-) D(α,-)

6 1 4 2

G(α,-) 4 H(α,-)

B-E:

B(2,A) 7 C(α,-)

2 2 3 3

A(α,-) E(4,B) 2 F(α,-) D(α,-)


4
6 1 2

G(α,-) 4 H(α,-)

E-G:
B(2,A) 7 C(α,-)

2 2 3 3

A(α,-) E(4,B) 2 F(α,-) D(α,-)


4
6 1 2

G(5,E) 4 H(α,-)

G-H:

B(2,A) 7 C(α,-)

2 2 3 2

A(α,-) E(4,B) F(α,-) D(α,-)


4
6 1 2

G(5,E) 4 H(9,G)

H-D:

B(2,A) 7 C(α,-)

2 2 3 2

A(α,-) E(4,B) 2 F(α,-) D(11,H)


4
6 1 2

G(5,E) 4 H(9,G)

All the packets are follow this route.

Flooding Algorithms:

• It considers only topology.

• Every incoming packet is send out on every outgoing line except the one it arrived
on.

• It gurantees more number of duplicate packets .

• To avoid duplicate packets, use hop counter.

• Hop counter is the distance from source to destination.


• For every jump, decrease hop counter by 1.

• With the packet discarded when the counter reaches 0.

• Alternative technique to avoid duplicate packet using sequence number.

0
A
1
A 2 0 0 0
A
0 0 0

0
A
0 0

Distance Vector Routing:

• In this algorithm each router maintains a vector table.

• This vector table contains distance and destination.

• These tables are updated by exchanging information with the neighbours.

• This algorithm is sometimes known as Bellman-ford routing/ Ford’s Fulkerson


routing.

• By sending echo packets each router compute the delay to reach its neighbours.

A D
B C
E H
F G
I L
J K
K H I A
24 0
21 20 A

28 36 12 B
31
18
36 25 C
19
27
24 8 D
40
7 14 E
22 30

40 20 23 F
19 31
31 G
18
6 20
19 H
0 17
2 0
4 21
10 11 I
7 9
0 J
22 22 24
33 K
9
9 29
L

For example:

To compute route from J to G.

Possible Path are:

J H G 7+6=13 MSec

J A G 9+18=27 MSec

J K G 10+31=41 MSec

J I G 11+31=42 MSec

• To reach J G through A is 27MSec

• To reach J G through H is 13 MSec

• To reach J G through K is 41 MSec


• To reach J G through I is 42 MSec

Therefore, to reach J G through H is the best line. Since it takes only 13 MSec.

Disadvantage:

Take too long time to make decision.

Link State Routing:

• It uses link state routers to exchange messages that allow each router to learn the
entire network topology.

• It has been replaced for distance vector algorithm.

• It is simple and has five parts

▪ Learn about its neighbours

▪ Measure the delay to its neighbours

▪ Construct a packet(Link state packet)

▪ Send this packet to all router

▪ Compute shortest path

Construct a packet:

• Once the information needed has been collected, next step is to build a packet
containing all the data.

• This packet is called Link state packet.

• The link state packet contains 1) Sender Identity

2) Sequence number

3)Age

4)List of neighbours and distance to reach

those neighbours.

Example:
B
A
13
12
59
B 2 C

4 6 1 3

A 7 D

5 E 8 F

C D
E
F
14 15
16
17
58 57
56
55
D 3 C 3
A 5
B 6
E 1 F 7
C 1
E 8
B 2
F 8
D 7

Distributing link state packet:

• The fundamental idea is to use flooding algorithm to distribute link state packets.

• To avoid duplicate while flooding sequence number is used.

• But if router crashes, it lost its sequence number the solution to this problem is to
include age of each packet.

• Decreasing packet age once per second.

• The following table has send flag and acknowledgement flag.

• The send flag means that the packet must be send on the indicated line.

• The acknowledgement flag means that it must be acknowledge the sender.

send flag Acknowledge flag


Sender Seq.no Age A C F A C F

A 12 59 0 1 1 1 0 0

C 21 59 1 0 1 0 1 0

F 20 58 1 1 0 0 0 1

• In table, the link state packet from A arrive directly so it must be send to C and F
and acknowledge to A.

• Repeat same for all entries if a duplicate arrives it would be discarded.

Compute shortest path:

Now construct shortest path to all possible destinations.

Congestion control algorithm:

Congestion:

• When two many packets are present in the subnet performance degrades.

• This situation is called as congestion.

Why congestion occurs:

• More input line only one output line.

• Slow processor.

• Insufficient memory

• ‘Low bandwidth

General principle of congestion control:

• Once congestion occurs that can be control by some solutions.

• Congestion control solutions are classified into two groups. They are,

▪ Open loop solution


▪ Closed loop solution

Open loop solution:

• To solve the problem by good design.

• Simply it is a prevention method.

Closed loop solution:

• To solve a problem after congestion occur. It is based on feedback loop.

• This approaches has three parts.

▪ Monitor the system to detect when and where congestion occurs.

▪ Pass this information to places where the action can be taken.

▪ Adjust system operation to correct the problems.

Approaches of congestion control:

Network provisioning Admission control Load shedding

Traffic aware routing Traffic throttling

Admission control:

• Once a congestion has been signal, no more virtual circuit are setup until the
problem solved.

Traffic Throttling:

• When congestion is occurred, it must tell the senders to throttle back there
transmission and slow down.

Choke packets:

• This approach can be used in both virtual circuit and datagram subnet.

• Choke packet is a special packet that is send from congested area to sender host.

• This packet request the sender to reduce its transmission rates.


• Thus it tries to reduce the congestion.

Host 1 Router 1 Router 2 Host 2

Choke packets Congested area

Hop by Hop choke packets:

• Over long distances, sending a choke packet to the source host does not work well
because the reactions is slow.

• Hence to reduce transmission rate immediately over long distances use hop by hop
choke packets.

• These packets reduce transmission rate on every hop.

• When none of the above methods make the congestion disappear, routers follow
load shedding method.

Host 1 R R Host 2
R R
1 2 3 4

Congested area

Choke packets

Load shedding:

Load shedding method means simply through the packets from congested area when they
cannot handle.

Discarding old packets is known as milk policy.

Discarding new packets is known as wine policy.

Another discarding policy is discard packets by priority.


According to this, router first discard packets from lowest priority, next lowest and so
on.

You might also like