Anda di halaman 1dari 74

NETWORK LAYER DESIGN ISSUES

Network Layer
The network layer is concerned with getting packets from the source to the destination The Network layer is the lowest layer that deals with end to end transmission

Design Issues

These issues include the service provided to the transport layer Routing of the packets through the subnet Congestion control Connection of multiple networks together

Chapter 5 : Network Layer

Services to transport layer


Network layer runs in the IMPs and the Transport layer runs in the Hosts. Services provided by the network layer defines the servicesa provided by the subnet

Goals to design
The services should be independent from the subnet technology. The subnet should shielded of the subnets present Network addresses should use a uniform numbering plan even across LANs and WANs.

Connection oriented
The freedom of services provided to the Transport layer degenerates into two factions a) Connection oriented b) connection less service.

Differences
Issues
Initial setup

Connection
Required

Connectionless
Not possible

Destination
address Packet

only needed
during setup Guaranteed

on every
packet Not

differences
Control
Error

Done by
Network Lay Network Layer Yes

Done by
Transport Layer Network Layer No

Flow
Option Negation Possible

Identifiers

Yes

No

MIXTURES OF SERVICES
Layers Connection oriented service 7 6 5 4 3 2 1 Connectionless service

OSI network service Primitives


1. That apply at the boundary between the network layer and transport layer. 2. Both connection-oriented and connection less primitives are provided 3. A connection is a pair of conceptual queues between two NASP 4. One queue for traffic in each direction. 5. The OSI connection -oriented network service 6. Primitives are listed grouped into four categories

Connection oriented
N-CONNECT .request ( callee, aks_wanted,exp_wanted,qos, user_data ) N_CONNECT.indication ( ) N-CONNECT.responce ( responer, acks_wanted,exp_wanted, qos,user_data ) N-CONNECT.conformation( ) N_DISCONNECT.request (originator ,reason,user_ data,responding_address ) N-DISCONNECT.indication( )

Connection oriented
N-DATA.request (user_data) N-DATA.indication (user_data) N_DATA-ACKNOWLEDGE.request() N-DATA-ACKNOWLEDGE.indiction() N-DATA.request (user_data) N-DATA.indication (user_data) N_DATA-ACKNOWLEDGE.request() N-DATA-ACKNOWLEDGE.indiction() N-RESET.indication(originator,reason ) N-RESET.response() N-REPORT.confirm()

Connectionless oriented
N-UNITDATA.request (source_ address,destination_add, qos,user_data ) N-UNITDATA.indication( ) N-FACILITY.request (qos) N-FACILITY.indication(drstinati on_address,qos,reason ) N-REPORT.indication (destination_ address,qos,)

callee: NASP to be called caller:NASP used by calling transport entity Acks_wanted: Boolean flag

terminology
callee: NASP to be called caller:NASP used by calling transport entity Acks_wanted: Boolean flag

terminology
Exp_wanted :Boolean flag Qos:Quality of service User_data: Bytes transmitted but not examined

terminology
Responder: NASP connected to at the destination Originator:Specification of who initiated the N-RESET Reason: Specification of why the event happened

network layer
One of the functions of the network layer is to provide a uniform naming for the Transport layer to use

network layer
The second orIDI ( initial Domain Identifier ) field specifies the domain to which the number in the Dsp part belongs.

NASP address

The full NASP address is variable length upto 40 decimal digits or 20 bytes long.

NSAPS
In the analogy ,the telephone sockets are the NSAPs and the telephone numbers are the NSAP addresses.

INTERNAL ORGANIZATION OF THE NETWORK LAYER


The OSI model does not provide a specification of the key algorithm, such as routing and congestion control

INTERNAL ORGANIZATION

In subnet design (as opposed to OSI), We will use the subnet terms "IMPS"and "HOST" instead of "network layer" and "transport layer"

INTERNAL ORGANIZATION

The internal operation of the subnet,a connection is usually called a VIRTUAL CIRCUIT,

INTERNAL ORGANIZATION

the independent packets of the connectionless organization are DATAGRAMS, in analogy with telegrams

INTERNAL ORGANIZATION

Virtual circuits are generally used in subnets whose primary service is connection oriented

INTERNAL ORGANIZATION

In contrast with a datagram subnet no routes are worked out in advance ,even if the sevice is connection-oriented

INTERNAL ORGANIZATION

to forward packets for each of the currently open Virtual circuits passing through it.

INTERNAL ORGANIZATION

If packet flowing over a given virtual circuit always take through the subnet, each IMP must remember where

OSI Network service primitives

user 1

user2

NSAP network layer

o prior to establishing a connection

OSI networklayer service primitives


After establishing a connection
user2

user 1

queue

OSI networklayer service primitives


After threee packets have been sent and recieved
user 1 user 2

o packet

Network addresses
The format of OSI network addresses(NSAPs)
idp AFI IDI DSP

IDP:initialdomain part AFI:Authority and format indicator IDI:initialDomain identifier DSP:Domain specific part

subnet
h b c h

h
a d h e f

Eight virtual circuits through the subnet


originating at A 0 - abcd 1 -aefd 2 -abfd 3 -aec 4 -aecdfb originating at b 0 - bcd 1 -bae 2 -bf

changes as the packet progresses


line packet
C TO D 2 D TO F F TO B H TO A A TO E E TO C 3 1

COMPARISION OF VIRTUAL AND DATAGRAMS WITHIN THE SUBNETS


BOTH HAVE THEIR SUPPORTERS AND DETRACTORS THE MAIN OBJECTIVES ARE IMP MEMORY SPACE AND BANDWIDTH

DIFFERENCES
VIRTUAL CIRCUITS ALLOW PACKETS TO CONTAIN CIRCUIT NUMBERS INSTEAD OF FULL DESTINATION ADDRESSES

COMPARISION OF DATAGRAM AND VIRTUALCIRCUIT SUBNETS


Datagram circuit setup not possible Virtual circuit it is required Data gram addressing is from the source to the destination In VC each packet contains a short VC number

comparision
Datagram each packet is routed independently In VC route is choosen when the VC is setup In Datagram congestion control is difficult In VC it is easy if enough buffers are allocated

Routing
In real function Network layer is routing packets from the source to the destination Te algorithms that choose the route and Data structures that they use are a major area of Network layer design

Routing algorithm
The routing algorithm is that part of the network layer software responsible for desiding which output line an incoming packet is to be transmitted on

routing Algorithms
The routing algorithms must be able to cope with the changes in the topology and traffic without requiring all jobs in all hosts to be abortedand the network to be rebooted every time some IMP crashes

Congestion
When too many packets are present in the subnet, performance degrades , this situation is called congestion

congestion

------------------capacity e l i v e r e d packets sent

perfect desired

congestion

congestion
Congestion tends to feed upon itself and become worse If an IMP has no free buffer, it must ignore newly arriving packets.

Differences between congestion control and flow control


congestion control is concerned about the subnet is able to carry the offered traffic. Flow control , in contrast ,relates to the point-to -point traffic between a given sender and a given reciever.

Internetworking
Just as Congestion control is closely related to the primary function of the network layer, routing, so is Networking.

InterNetworking
Routing aside, another problem with Internetworking is that not all networks use the same protocols. Different protocols imply different packet formats,headers,flow- control,development rules,and more.

Internetworking
As a consequence , When packets move from network to network, conversions are necessary.

Routing Algorithm Definition


1. Routing is the decision which path to take 2. A routing algorithm decides which output link an incoming packet should be transmitted on 3. A routing table contains the mappings from the networks and host addresses to output ports on the router 4. The routing algorithm builds this table

The Optimality Principle


1. Optimal routes without regard to network, topology and traffic 2. Optimal routes form a tree rooted at the destination 3. The tree is called the sink tree 4. The goal of all routing algorithms is to discover and use the sink trees for all routers.

Routing Algorithms Overview


Nonadaptive Algorithms
do not base their routing decisions on mesurements or estimates of the current traffic and topology.

Adaptive Algorithms
attempt to change their routing decisions to reflect changes in topology and the current traffic.

Nonadaptive Algorithms
Non-adaptive routing algorithms do not base their routing decisions on the current state of the network, This Procedure is sometimes called static routing.

1. 2.

Examples:
Flooding Shortest Path Routing

Flooding Algorithm
Every incoming packet is sent out on every outgoing line except the one it arrived on, No routing table, no lookup! Problem: Vast number of duplicated packets

Reducing Flooding Algorithms Duplicate Packets


Solution 1: Hop counter Have a hop counter in the packet header Routers decrement each arriving packets hop Counter Routers discard a packet with hop count=0 Ideally, the hop counter should be initialized to the length of the path from the source to the destination. Hop count defines the Horizon of the packet, which is how far a node can see.

Solution 2: Sequence Numbers Require the first router


hop to put a sequence number in each packet it receives from its hosts Each router maintains a table listing the sequence

Flooding Uses
1. Used in small networks or limited horizon order 100s of nodes 2. Military Applications
1. Large number of routers is desirable 2. If one router is taken out (by a bomb?) flooding will

still get packets to their destinations 3. Distributed Databases


1. Simultaneous updates of multiple databases can be done with a single packet transmission 2. Gnutella search is an example, uses horizon

Shortest Path Routing


This routing is conceptually simple. It is a widely used technique to build a graph of the subnet.
Nodes: IMPs Arcs: Communication lines

Dijkstras algorithm are well-known.

Undirected Weighted

A Graph of the Subnet

Geographic Distance Mean queuing and transmission delay for a standard test packet as determined by hourly or daily B 7 test runs. C
2 A 6 G 2 E 2 4 H F 3 2 3 D 2

Dijkstras Algorithm
Each node is labeled (in parentheses) with its distance from the source node along the best known path.
B 2 A 6 G 2 E

7
2 4 F 3 2

C 3 D 2 H

Dijkstras Algorithm (contd)


We want to find the shortest path from A to D. Initially, no paths are known, so all nodes are labeled with infinity.
B(-) A E(-) C(-) F(-) D(-)

G(-)

H(-)

Dijkstras Algorithm (contd)


We start out by marking node A (the working node) as permanent. We examine each of the nodes adjacent A, relabeling each one with the distance to A.
B(2, A) C(-) 2 A 6 G(6, A) H(-) E(-) F(-) D(-)

Dijkstras Algorithm (contd)


We make B with the smallest label permanent. B becomes the new working node.
B(2, A) A E(-) C(-) F(-) D(-)

G(6, A)

H(-)

Dijkstras Algorithm (contd)


We examine each of the nodes adjacent B, relabeling each one with the distance to B.
B(2, A) 2 A

C(9 B) F(-) D(-)

E(4, B)

G(6, A)

H(-)

Dijkstras Algorithm (contd)


We make E with the smallest label permanent. E becomes the new working node.
B(2, A) A G(6, A) E(4, B) C(9, B) F(-) D(-)

H(-)

Dijkstras Algorithm (contd)


We examine each of the nodes adjacent E, relabeling each one with the distance to E.
B(2, A) A E(4, B) C(9, B) F(6 E) D(-)

1
G(5, E)

2 H(-)

Dijkstras Algorithm (contd)


We make G with the smallest label permanent. G becomes the new working node.
B(2, A) A E(4, B) C(9, B) F(6, E) D(-)

G(5, E)

H(-)

Dijkstras Algorithm (contd)


We examine each of the nodes adjacent G, relabeling each one with the distance to G.
B(2, A) A E(4, B) 4 G(5, E) H(9 G) C(9, B) F(6, E) D(-)

Dijkstras Algorithm (contd)


We make F with the smallest label permanent. F becomes the new working node.
B(2, A) A E(4, B) C(9, B) F(6, E) D(-)

G(5, E)

H(9, G)

Dijkstras Algorithm (contd)


We examine each of the nodes adjacent F, relabeling each one with the distance to F.
B(2, A) A E(4, B) C(9, B) 3 F(6, E) 2 G(5, E) H(8, F) D(-)

Dijkstras Algorithm (contd)


We make H with the smallest label permanent. H becomes the new working node.
B(2, A) A E(4, B) C(9, B) F(6, E) D(-)

G(5, E)

H(8, F)

Dijkstras Algorithm (contd)


We examine each of the nodes adjacent H, relabeling each one with the distance to H.
B(2, A) A E(4, B) C(9, B) F(6, E) 2 G(5, E) H(8, F) D(10, F)

Dijkstras Algorithm (contd)


We make C with the smallest label permanent. C becomes the new working node.
B(2, A) A E(4, B) C(9, B) F(6, E) D(10, F)

G(5, E)

H(8, F)

Dijkstras Algorithm (contd)


We examine each of the nodes adjacent C, relabeling each one with the distance to C.
B(2, A) A E(4, B) C(9, B) 3 F(6, E) D(10, F)

G(5, E)

H(8, F)

Dijkstras Algorithm (contd)


We make D with the smallest label permanent. D becomes the new working node.
B(2, A) A E(4, B) C(9, B) F(6, E) D(10, F)

G(5, E)

H(8, F)

Dijkstras Algorithm (contd)


The shortest path (Dijkstras) algorithm from Source A to Destination D.

B(2, A) A E(4, B)

C(9, B) F(6, E) D(10, H)

G(5, E)

H(8, F)

Anda mungkin juga menyukai