Switching Techniques
The process of moving the
data packets towards their destination by forwarding them from one port to the
other port is called as switching.
Various switching techniques
are-
1.
Circuit Switching
2.
Message Switching
3.
Packet Switching
Circuit Switching-
This switching technique operates in the
following three phases-
1.
Establishing a circuit
2.
Transferring the data
3.
Disconnecting the
circuit
1. Establishing A Circuit-
In this phase,
·
A circuit is
established between the two ends.
·
Circuit provides a
dedicated path for data to travel from one to the other end.
·
Resources are reserved
at intermediate switches which are used during the transmission.
·
The intermediate
switches are connected by the physical links.
2. Transferring The Data-
After the circuit is established,
·
The entire data
travels over the dedicated path from one end to the other end.
3. Disconnecting The Circuit-
After the data transfer is completed,
·
The circuit is torn
down i.e. disconnected.
Total Time-
Total time taken to
transmit a message in circuit switched network
= Connection set up
time + Transmission delay + Propagation delay + Tear down time
|
where-
·
Transmission delay =
Message size / Bandwidth
·
Propagation delay =
(Number of hops on way x Distance between 2 hops) / Propagation speed
Advantages-
Circuit switching has the following
advantages-
A well defined and dedicated path exists for
the data to travel.
There is no header overhead.
There is no waiting time at any switch and the
data is transmitted without any delay.
Data always reaches the other end in order.
No re ordering is required.
Disadvantages-
Circuit switching has the following
disadvantages-
The channel is blocked for two ends only.
It is inefficient in terms of utilization of
system resources.
The time required for establishing the circuit
between the two ends is too long.
Dedicated channels require more bandwidth.
It is more expensive than other switching
techniques.
Routing decisions can not be changed once the
circuit is established.
Important Notes-
Circuit switching is implemented at physical
layer.
Circuit switching is now outdated.
Packet Switching-
In packet switching,
·
The entire message to
be sent is divided into multiple smaller size packets.
·
This process of
dividing a single message into smaller size packets is called as packetization.
·
These smaller packets
are sent after the other.
·
It gives the advantage
of pipelining and reduces the total time taken to transmit the message.
Optimal Packet Size-
If the packet size is not chosen wisely, then-
·
It may result in
adverse effects.
·
It might increase the
time taken to transmit the message.
So, it is very important to choose the packet size wisely.
Example-
Consider-
·
There is a network
having bandwidth of 1 MBps.
·
A message of size 1000
bytes has to be sent.
·
Packet switching
technique is used.
·
Each packet contains a
header of 100 bytes.
Out of the following, in how many packets the
message must be divided so that total time taken is minimum-
1.
1 packet
2.
5 packets
3.
10 packets
4.
20 packets
NOTE
·
While
calculating the total time, we often ignore the propagation delay.
·
The
reason is in packet switching, transmission delay dominates over propagation
delay.
·
This
is because each packet is transmitted over the link at each hop.
|
Case-01: Sending Message in 1 Packet-
In
this case, the entire message is sent in a single packet.
Size Of
Packet-
Packet
size
=
1000 bytes of data + 100 bytes of header
=
1100 bytes
Transmission
Delay-
Transmission
delay
=
Packet size / Bandwidth
=
1100 bytes / 1 MBps
=
1100 x 10-6 sec
=
1100 μsec
=
1.1 msec
Total
Time Taken-
Total
time taken to send the complete message from sender to receiver
=
3 x Transmission delay
=
3 x 1.1 msec
=
3.3 msec
Conclusion-
We
conclude-
·
Total time decreases when packet size is reduced but only up to
a certain limit.
·
If the packet size is reduced beyond a certain limit, then total
time starts increasing.
From
the given choices,
·
Sending the message in 5 packets would be most efficient.
·
In other words, packet size = 300 bytes would be the best
choice.
Types of Packet Switching-
Packet
switching may be carried out in the following 2 ways-
1.
Virtual Circuit Switching
2.
Datagram Switching
Virtual Circuit Switching-
Virtual
circuit switching operates in the following three phases-
1.
Establishing a circuit
2.
Transferring the data
3.
Disconnecting the circuit
1.
Establishing A Circuit-
In
this phase,
·
A logical connection is established between the two ends.
·
It provides a dedicated path for data to travel from one to the
other end.
·
Resources are reserved at intermediate switches which are used
during the transmission.
2.
Transferring The Data-
After
the connection is established,
·
The entire data travels over the dedicated path from one end to
the other end.
3.
Disconnecting The Circuit-
After
the data transfer is completed,
·
The connection is disconnected.
Datagram Switching-
In
datagram switching,
·
There exists no dedicated path for data to travel.
·
The header of each packet contains the destination address.
·
When any intermediate switch receives the packet, it examines
its destination address.
·
It then consults the routing table.
·
Routing table finds the corresponding port through which the
packet should be forwarded.
Virtual Circuit Switching
Vs Datagram Switching-
The
following table shows a comparison between virtual circuit switching and
datagram switching-
Virtual Circuit
Switching
|
Datagram Switching
|
The first packet during its transmission-
1) Informs the intermediate switches that more packets are
following.
2) Reserve resources (CPU,
bandwidth and buffer) for the following packets at all the switches on the
way.
|
The first packet does not perform any such task during its
transmission.
|
The packets are never discarded at intermediate switches and
immediately forwarded since resources are reserved for them.
|
The packets may be discarded at intermediate switches if
sufficient resources are not available to process the packets.
|
It is a connection oriented service since resources are
reserved for the packets at intermediate switches.
|
It is a connection less service since no resources are
reserved for the packets.
|
All the packets follow the same dedicated path.
|
All the packets take path independently.
|
Data appears in order at the destination since all the packets
take the same dedicated path.
|
Data may appear out of order at the destination since the
packets take path independently.
|
It is highly reliable since no packets are discarded.
|
It is not reliable since packets may be discarded.
|
It is costly.
|
It is cost effective.
|
Only first packet requires a global header which identifies
the path from one end to other end.
All
the following packets require a local header which identifies the path from
hop to hop.
|
All the packets require a global header which contains full
information about the destination.
|
ATM (Asynchronous Transfer Mode) uses virtual circuit
switching.
|
IP Networks use datagram switching.
|
Virtual circuit switching is normally implemented at data link
layer.
|
Datagram switching is normally implemented at network layer.
|
No comments:
Post a Comment