computer networks network layer,routing

63
Network Layer, Switched WAN Deepak John SJCET-Pala

Upload: deepak-john

Post on 20-Jun-2015

241 views

Category:

Education


2 download

DESCRIPTION

Deepak John,SJCET-pala.Network Layer: Services of NW layer, Routing: Characteristics, performance criteria, routing strategies: fixed routing, flooding, random routing, Adaptive routing, congestion control Switched WAN – Virtual Circuit Switching, Global addressing, Virtual circuit identifier, Connection Setup:- Permanent Virtual Circuit, Switched Virtual Circuit, X.25 WAN, X.25 layers and protocols.

TRANSCRIPT

Page 1: Computer networks network layer,routing

Network Layer, Switched WAN

Deepak John

SJCET-Pala

Page 2: Computer networks network layer,routing

Network Layer

Page 3: Computer networks network layer,routing

functions Providing Services to Transport Layer: Network layer provides services to transport layer at

the network layer/transport layer interface. Routing: Implements routing of frames (packets) through the network. Defines the most

optimum path the packet should take from the source to the destination. Congestion Control

Page 4: Computer networks network layer,routing

Implementation 2 packet switching techniques are used:

i. Datagrams

ii. Virtual Circuits 2 types of services are provided to the transport layer:

i. Connectionless Service: Sender and receiver treat each transmitted message as an independent unit

ii. Connection-oriented Service: Sender and receiver see data as traveling on a logical connection. Receiver receives data in the same order in which they are transmitted.

Connectionless service and connection-oriented service can be reliable or unreliable Reliable = Delivery of all data is ensured. The receiver acknowledges data and sender

retransmits data that was not received Unreliable = No acknowledgments or retransmission of data

Page 5: Computer networks network layer,routing

Datagram Each packet is routed independently

Page 6: Computer networks network layer,routing

1

23

0111

value in arrivingpacket’s header

routing algorithm

local forwarding table

header value output link

0100010101111001

3221

Datagram forwarding table

Page 7: Computer networks network layer,routing

Advantages connectionlessDisadvantagesEvery switch/router knows about every destinationPotentially huge tablesNeed routing protocol to fill table

Page 8: Computer networks network layer,routing

Virtual Circuit All packets of a VC follow the same route. every router on source-dest path maintains “state”

for each passing connection. consists of:

1. Path from source to destination

2. VC numbers, one number for each link along path

3. Entries in forwarding tables in routers along path

Page 9: Computer networks network layer,routing
Page 10: Computer networks network layer,routing

Advantages Efficient lookup (simple table lookup)/ Can reserve bandwidth at connection setup easier for hardware implementationsDisadvantages need route connection setup request. More complex failure recovery – must recreate connection state

Page 11: Computer networks network layer,routing

Connectionless Service Each packet is transmitted independently

Page 12: Computer networks network layer,routing

Connection-oriented Service Logical connection is established

Page 13: Computer networks network layer,routing

ROUTING

Page 14: Computer networks network layer,routing

Routing One of the important functions of the network layer is to route the packets from source

machine to destination machine The network layer at the source creates a packet from the data coming from transport layer The header of the packet contains, the logical addresses of the source and destination The network layer is responsible for checking its routing table to find the routing

information. The network layer at the destination is responsible for address verification It makes sure that the destination address on the packet is the same as the address of the

host. If the packet is a fragment, the network layer waits until all fragments have arrived, It then reassembles them and delivers the reassembled packet to the transport layer.

Page 15: Computer networks network layer,routing

Performance Criteria The selection of a route is generally based on some performance criterion. The simplest criterion is to choose the minimum-hop route a cost is associated with each link And, for any pair of attached stations, the route through the network that accumulates the

least cost is to be selected(highest throughput and minimum delay).

Page 16: Computer networks network layer,routing

Routing algorithm:: that part of the Network Layer responsible for deciding on which output line to transmit an incoming packet.

Properties: Correctness, Simplicity, Robustness, Stability ,Fairness and Optimality Routing strategies

Four key strategies are:

1. Fixed routing

2. Flooding

3. Random routing

4. Adaptive routing

Page 17: Computer networks network layer,routing

Fixed routing A single, permanent route is configured for each source-destination pair of nodes in the

network. To implement fixed routing A central routing matrix is created, to be stored at a network

control centre. The matrix shows, for each source-destination pair of nodes, the identity of the next node on

the route. There is no difference between routing for datagrams and virtual circuits. All packets from a given source to a given destination follow the same route The advantage of fixed routing is its simplicity and disadvantage is its lack of flexibility

Page 18: Computer networks network layer,routing

Fixed Routing Tables

Page 19: Computer networks network layer,routing

Flooding No network info required Packet sent by node to every neighbor Incoming packets retransmitted on every link except incoming link Eventually a number of copies will arrive at destination Each packet is uniquely numbered so duplicates can be discarded Nodes can remember packets already forwarded to keep network load in bounds One problem with this method is that packets may go in a loop A simpler technique is to include a hop count field with each packet The count can originally be set to some maximum value. Each time a node passes on a packet, it decrements the count by one When the count reaches zero, the packet is discarded

Page 20: Computer networks network layer,routing

The flooding technique has three remarkable properties: All possible routes between source and destination are tried. So a packet will always get

through if at least one path between source and destination exists. Because all routes are tried, at least one copy of the packet to arrive at the destination will

have used a minimum-hop route. All nodes that are directly or indirectly connected to the source node are visited The principal disadvantage of flooding is the high traffic load that it generates, which is

directly proportional to the connectivity of the network.

Page 21: Computer networks network layer,routing

Random Routing A node selects only one outgoing path for retransmission of an incoming packet The outgoing link is chosen at random or round robin fashion, excluding the link on which

the packet arrived. A refinement of this technique is to assign a probability to each outgoing link and to select

the link based on that probability The probability could be based on data rate, in which case we have

Page 22: Computer networks network layer,routing

Adaptive Routing Used by almost all packet switching networks. Adaptive routing is the process of locating a clear path from a source to destination across a

network of nodes that could change at any point. It ensure that data packets can move from one point in the network to another, even if the

one or more nodes in between are unavailable. Requires information about the network, which will be updated from time to time to enable

the routing decision to adapt to changing conditions. Routing decisions change as conditions on the network change

Failure Congestion

Page 23: Computer networks network layer,routing

There are several drawbacks associated with the use of adaptive routing: Routing decisions more complex Reacting too quickly can cause congestion

A convenient way to classify adaptive routing strategies is on the basis of information source: local adjacent nodes all nodes

adaptive strategies can be either distributed or centralized In the distributed case, each node exchanges delay information with other nodes. Based on

incoming information, a node tries to estimate the delay situation throughout the network, and applies a least-cost routing algorithm

In the centralized case, each node reports its link delay status to a central node, which designs routes based on this incoming information and sends the routing information back to the nodes

Page 24: Computer networks network layer,routing

CONGESTION CONTROL

Page 25: Computer networks network layer,routing

Congestion control An important issue in a packet-switched network is congestion Congestion occurs when the number of packets being transmitted through a network begins

to approach the packet-handling capacity of the network Congestion will lead to a large queue length, which results in buffer overflow and loss of

packets The objective of congestion control is to maintain the number of packets within the network

below the level at which performance falls off dramatically. congestion affects vital parameters of the network performance ..

1. Through put

2. Delay

Page 26: Computer networks network layer,routing

Effects of Congestion

Page 27: Computer networks network layer,routing

Causes of Congestion Congestion in a network or internetwork occurs because routers and switches have buffers

that hold the packets before and after processing A router has an input queue and an output queue for each interface. If the rate of packet

arrival is higher than the packet processing rate, the input queues become longer and longer. If the packet departure rate is less than the packet processing rate, the output queues become

longer and longer.

Page 28: Computer networks network layer,routing

Congestion Control Techniques Congestion control refers to the techniques and mechanisms which can prevent congestion

from happening or remove congestion after it has taken place divided into two categories1. Open loop: prevent or avoid congestion by ensuring that the system never enters a Congested

State. 2. Close loop: allow system to enter congested state, detect it, and remove it.

Page 29: Computer networks network layer,routing

Open-loop Congestion Control In open-loop congestion control, policies are applied to prevent congestion before it happens Congestion control is handled by either the source or the destination List of policies that can prevent congestion are:

Retransmission Policy Window Policy Acknowledgment Policy Discarding Policy Admission Policy

1. Retransmission policy Retransmission in general may increase congestion in the network The retransmission policy and the retransmission timers must be designed to optimize

efficiency and at the same time prevent congestion.

Page 30: Computer networks network layer,routing

2. Window Policy The type of window at the sender may also affect congestion The Selective Repeat window is better than the Go-Back-N window for congestion control.

3. Acknowledgement Policy If the receiver does not acknowledge every packet it receives, it may slow down the sender

and help prevent congestion.

Several approaches are used in this case: A receiver may send an acknowledgment only if a special timer expires. A receiver may decide to acknowledge only N packets at a time.

4. Discarding policy A good discarding policy by the routers may prevent congestion and at the same time may

not harm the integrity of the transmission.

Page 31: Computer networks network layer,routing

5. Admission Policy An admission policy, which is a quality-of-service mechanism, can also prevent congestion

in virtual-circuit networks Routers first check the resource requirement of a flow before admitting it to the network A router can deny establishing a virtual circuit connection if there is congestion in the

network or if there is a possibility of future congestion.

Page 32: Computer networks network layer,routing

Closed-Loop Congestion Control Closed-loop congestion control mechanisms try to alleviate congestion after it happens. Few of the mechanisms used are

Backpressure Choke Packet Implicit Signalling Explicit Signalling

Page 33: Computer networks network layer,routing

Backpressure Backpressure is a node-to-node congestion control that starts with a node and propagates, in

the opposite direction of data flow, to the source. This technique can be applied only to virtual circuit networks, in which each node knows the

upstream node from which a flow of data is coming

Page 34: Computer networks network layer,routing

Choke packets A choke packet(warning) is a packet sent by a node , which has encountered congestion, to

the source station directly to inform it of congestion.

Page 35: Computer networks network layer,routing

Implicit Signaling There is no communication between the congested node or nodes and the source The source guesses that there is a congestion somewhere in the network from other

symptoms For example, when a source sends several packets and there is no acknowledgment for a

while, one assumption is that the network is congested The delay in receiving an acknowledgment is interpreted as congestion in the network; the

source should slow down.

Page 36: Computer networks network layer,routing

Explicit SignalingThe node that experiences congestion can explicitly send a signal to the source or destination.can occur in either the forward or the backward direction.

Backward Signaling A bit can be set in a packet moving in the direction opposite to the congestion This bit can warn the source that there is congestion and that it needs to slow down to avoid

the discarding of packets.

Forward Signaling A bit can be set in a packet moving in the direction of the congestion. This bit can warn the destination that there is congestion. The receiver in this case can use policies, such as slowing down the acknowledgments, to

alleviate the congestion.

Page 37: Computer networks network layer,routing

SWITCHED WAN

Page 38: Computer networks network layer,routing

3.3 Switched WANs Two different technologies are used in wide area switched networks: circuit switching and

packet switching. The backbone networks in the Internet are usually switched WANs. A switched WAN is a wide area network that covers a large area (a state or a country) and

provides access at several points to the users. Inside the network, there is a mesh of point-to-point networks that connects switches.

Switched WAN

Wide area network and switching methods

Page 39: Computer networks network layer,routing

VIRTUAL CIRCUIT SWITCHING It is a packet switching methodology where a pre planned route is established and all the

packets between a pair of communicating parties follow this same route through the network. Each packet contains a virtual circuit identifier as well as data. The switching or routing in a virtual-circuit network is based on the virtual circuit identifier, It

determines the next link along the path. The table associated with switch contains four pieces of information specific to a virtual

circuit: input port, input virtual circuit number, output port, and output virtual circuit number

When a packet arrives at a switch in a virtual circuit network, the pair (input port, input VCI) can uniquely determined how the packet is to be routed

A transmitted packet is buffered at each node.

Page 40: Computer networks network layer,routing

VIRTUAL CIRCUIT SWITCHING

Page 41: Computer networks network layer,routing

ADDRESSING In a virtual-circuit network, two types of addressing are involved: global and local (virtual-

circuit identifier).

Global Addressing: A source or a destination needs to have a global address-that can be unique in the network.

Virtual-Circuit Identifier: It is an identifier that is actually used for data transfer Unlike a global address, it is a small number that has only switch scope. It is used by a packet between two switches. When a packet arrives at a switch, it has a VCI;

when it leaves, it has a different VCl.

Page 42: Computer networks network layer,routing

VCI Phases A source and destination need to go through three phases in a virtual-circuit network: 1. Setup2. Data transfer3. Teardown

Page 43: Computer networks network layer,routing

1.Setup phase a switch creates an entry for a

virtual circuit. Two steps are required for this:

Setup Request Acknowledgment

A setup request frame is sent from the source to the destination.

Setup Request

Page 44: Computer networks network layer,routing

Steps in Setup Request

1. Source A sends a setup frame to switch 1.

2. Switch 1 receives the setup request frame. It knows the output port through which the frame will proceed.

3. The switch creates an entry in its table for this virtual circuit, ie. It enters value of the input port, input VCI and output port.

4. The frame is forwarded to the switch 2 through the specific output port.

5. The same process repeats at switch 2 and switch 3.

6. Destination B receives the setup frame, and if it is ready to receive frames from A, it assigns a VCI to the incoming frames that come from A.

Page 45: Computer networks network layer,routing

Acknowledgment acknowledgment frame, completes the entries in the switching tables The destination sends an acknowledgment to switch 3. The acknowledgment carries the global source and destination addresses so the switch knows

which entry in the table is to be completed. The frame also carries VCI chosen by the destination as the incoming VCI for frames from A Switch 3 uses this VCI to complete the outgoing VCI column for this entry. Switch 3 sends an acknowledgment to switch 2 that contains its incoming VCI in the table Switch 2 uses this as the outgoing VCI in the table. The above mentioned procedure is repeated for switch 2 and the table is filled Finally switch 1 sends an acknowledgment to source A that contains its incoming VCI in the

table, chosen in the previous step. The source uses this as the outgoing VCI for the data frames to be sent to destination B.

Page 46: Computer networks network layer,routing

Acknowledgment

Page 47: Computer networks network layer,routing

2.Data transfer phase To transfer a frame from a

source to its destination, all switches need to have a table entry for this virtual circuit

The source sends a packet with VCI attached to the switch 1.

Switch 1 consults it table and find the specific output port and output VCI.

The data transfer phase is active until the source sends all its frames to the destination.

Page 48: Computer networks network layer,routing

3.Tear down phase In this phase, source A, after sending all frames to B, sends a special frame called a

teardown request. Destination B responds with a teardown confirmation frame. All switches delete the corresponding entry from their tables.

Page 49: Computer networks network layer,routing

Classification of Virtual Circuits Two types of virtual circuits exist:

Permanent Virtual Circuits (PVC) Switched Virtual Circuits (SVC)

Page 50: Computer networks network layer,routing

Permanent virtual circuit (PVC) established as an option to provide a dedicated circuit link between two facilities.the connection setup is simple.table entry is recorded for all switches by the administrator.The administrator determines a complete path from source to destination.A connection is created from one source to one single destination. If a source needs connections with several destinations, it needs a PVC for each connection.It can established for repeated/continuous use between the same source & destination and eliminate the need for repeated connection set-up and clearing.

Page 51: Computer networks network layer,routing

Switched Virtual Circuit SVC SVC creates a temporary, short connection that exists only when data are being

transferred between source and destination. SVC requires a connection setup phase. First you need to establish a connection between the required source and

destination After that data is transferred Once data transfer is completed the connection is removed

Page 52: Computer networks network layer,routing

X.25

Page 53: Computer networks network layer,routing

is a packet switched technology used in Wide Area Networks designed to operate effectively regardless of the type of systems connected to the

network. It defines standard for establishing, maintaining and terminating connections

between devices. X.25 network devices fall into three general categories:

Data terminal equipment (DTE). Data circuit-terminating equipment (DCE). Packet switching exchange (PSE).

an interface between DTE and DCE

X.25

Page 54: Computer networks network layer,routing

DTE devices are end systems that communicate across the X.25 network DCE devices are communications devices such as modems and packet switches;

provide the interface between DTE devices and a PSE. PSE is a switch in x.25 WAN network located at the vendor’s site.The customer’s

DCE is connected to a vendor’s PSE through a high speed tele-communication line.

Page 55: Computer networks network layer,routing

Layers

Physical layer deals with the physical interface between a station (computer, terminal) and a

packet-switching node. specifies the physical, electrical, functional and procedural characteristics to

control the physical link between a DTE and a DCE

Page 56: Computer networks network layer,routing

X.21bis is a physical layer protocol used in X.25 that defines the electrical and mechanical procedures for using the physical medium.

X.21bis handles the activation and deactivation of the physical medium connecting to DTE and DCE devices.

It supports point-to-point and synchronous connections, full-duplex transmission over four-wire media

Page 57: Computer networks network layer,routing

Link layer ensures reliable transfer of data between the DTE and DCE by transmitting data

as a sequence of frames. The functions performed by link layer include

Transfer of data in an efficient and timely manner

Synchronization with the receiver and transmitter

Detection of transmission errors and recovery from such errors

Identification and reporting of procedural errors to higher levels for recovery.

Page 58: Computer networks network layer,routing

Link Access Protocol Balanced is a data link layer protocol that manages communication and framing between

DTE and DCE devices It is a bit-oriented protocol that ensures that frames are correctly ordered and

error-free.

Page 59: Computer networks network layer,routing

Packet Layer Responsible for creating a virtual circuit between two DTEs. make up a packet that include a header and user data. Functions performed by packet Layer are:

Establishing Connection Transferring data Terminating a connection With the help of X.25 packet layer, data are transmitted in

packets over external virtual circuits

Page 60: Computer networks network layer,routing

Packet Layer Protocol(PLP ) network layer Protocol which manages the packet exchange between DTE

devices . It runs in 5 different modes

1. Call Setup used to establish switched virtual circuits between DTE devices. Uses SVC

2. Data transfer used for transferring data b/w two DTE devices across a virtual circuit. In this mode PLP handles segmentation & reassembly, bit padding and flow &

error control

Page 61: Computer networks network layer,routing

3. Idle Mode used when a virtual circuit is established, but data transfer is not occurring. used only with SVCs.

4. Call Clearing Mode Used to end communication sessions between DTE devices and is used only

with SVCs.

5. Restarting Mode used to synchronize transmission b/w a DTE device and a locally connected

DCE device

Page 62: Computer networks network layer,routing

PLP packet fields

i. General Format Identifier (GFI) Identifies packet parameters(whether the packet carries user data or control

information, kind of windowing used, etc)

ii. Logical Channel Identifier (LCI) Identifies the virtual circuit across the local DTE/DCE interface.

Page 63: Computer networks network layer,routing

iii. Packet Type Identifier (PTI)Identifies the packet types.iv. User DataContains encapsulated upper-layer information. This field is present only in data packets