3. 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
4. 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
6. 1
3 2
0111
value in arriving
packet’s header
routing algorithm
local forwarding table
header value output link
0100
0101
0111
1001
3
2
2
1
Datagram forwarding table
7. Advantages
connectionless
Disadvantages
Every switch/router knows about every destination
Potentially huge tables
Need routing protocol to fill table
8. 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
9.
10. Advantages
Efficient lookup (simple table lookup)/
Can reserve bandwidth at connection setup
easier for hardware implementations
Disadvantages
need route connection setup request.
More complex failure recovery – must recreate connection state
14. 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.
15. 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).
16. 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
17. 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
19. 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
20. 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.
21. 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
22. 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
23. 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
25. 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
27. 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.
28. 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 categories
1. 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.
29. 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.
30. 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.
31. 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.
32. 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
33. 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
34. 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.
35. 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.
36. Explicit Signaling
The 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.
38. 3.3 Switched WANs
Switched WAN
Two different technologies are used in wide area switched networks: circuit switching and
packet switching.
The backbone networks in the Internet are usually switchedWANs.
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.
Wide area network and switching methods
39. 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.
41. 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.
42. VCI Phases
A source and destination need to go through three phases in a virtual-circuit network:
1. Setup
2. Data transfer
3. Teardown
43. 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
44. 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.
45. 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.
47. 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.
48. 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.
49. Classification of Virtual Circuits
Two types of virtual circuits exist:
Permanent Virtual Circuits (PVC)
Switched Virtual Circuits (SVC)
50. 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.
51. 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
53. X.25
is a packet switched technology used inWide 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
54. 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.
55. 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
56. 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
57. 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.
58. 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.
59. 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
60. 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
61. 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
62. 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.
63. iii. Packet Type Identifier (PTI)
Identifies the packet types.
iv. User Data
Contains encapsulated upper-layer information. This field is present only in data
packets