TOPIC 6.2.: CIRCUIT
SWITCHING AND PACKET SWITCHING
CIRCUIT SWITCHING
- Circuit switching is the line which is dedicated to the 'conversation'
for the duration of the call, irrespective of whether any information is
actually being transmitted or not.
- The public telephone system is an example of a
switched network using circuit-switched paths. When a caller dials a number,
the path between the two telephones is set up by operating switches in all
of the exchanges involved in the path, and the circuit is set up and held
for the whole duration of the call, even through periods of silence or heavy
breathing.
- This permits the two people on the phone to
hold a conversation with no waiting at either end for the message to arrive.
- However, because switches are used to connect
and disconnect the circuits, electrical interference is produced, and
although this is not a serious problem for speech, it may produce corrupt or
lost data if the path is being used to transmit computer data. If this is
likely to be a serious problem, a leased line may be used instead.
MESSAGE SWITCHING
- Circuit switching is inefficient for computers, as the line is tied up
when no useful information is sent as data could also go via different
routes. This is called as message switching.
- Message switching was originally used for the
transmission of morse code for sending telegraphed messages as early as 1866,
over a century before the days of fax and electronic mail.
- A batch of messages was relayed to a receiving
terminal, where they were manually sorted and stored ready for transmission to
the next station in the link to the final destination, in much the same way as
letters are sent from the postbox to the main Post Office, sorted and sent on
until they finally reach the addressee.
- In due course the storing and forwarding was
automated, and the system is now known as a message switching system.
- Computers are used to store messages on disk
while they wait to be sent on to their destinations.
- The advantage of this system over circuit
switching is that unless the lines are completely congested, messages will
always be accepted, even though it may not be forwarded for some time.
PACKET SWITCHING
- To prevent large messages hogging the line for long periods, the
messages are split up into similar defined-size parts called packets.
- A message sent in this way is called packet switching. With packet
switching you do not 'own' the same line for the duration of the call, and
are therefore said to have a virtual circuit.
- In a packet switching system (PSS) messages
are divided into packets - fixed length blocks of data of say 128 bytes.
- As well as the data, each packet also carries:
- the
source and destination address;
- a
packet sequence number so that the whole message can be correctly reassembled;
- a
checksum (longitudinal parity check) for the purposes of error checking;
- The PSS (such as the one which in Britain is
owned by British Telecom) takes the form of a computer network in which each
computer redirects packets it receives to the next computer along an
appropriate route to its destination.
- The packets from different users to different
destinations may be interleaved, and all the packets making up one
transmission need not necessarily travel by the same route or arrive in the
right order.
- The PSS ensures that they are all reassembled in
the correct order at their destination.
- The computers in the PSS are able to perform
error checking and request retransmission of packets found to be in error.
- They are also able to perform error correction
so that even if a transmission contained some errors, perhaps due to
distortion on the line, it may be possible to correct these without having to
retransmit.
- In order to use the PSS, a user requires a
network user identity, which is registered at his or her local packet switch
exchange.
THE ANATOMY OF A PACKET
- A packet contains the data to be transmitted, but also contain
information like ID, source and destination of the packet, and some error
checking too.
- It corresponds to layer 3 of the ISO OSI (Open System Interconnection)
model. The exact form of the data depends on the systems being used, and
proprietary systems have their own names for the different protocols
corresponding to the different layers of the ISO OSI model.
- At the application layer we have the original data to be transmitted.
This would usually be part of an entire message.
- In a simple Ethernet system, the next layer to add information is the
transport layer (layer 4), which puts a header onto the data to be sent.
- The network layer (layer 3) adds a header, and the data-link layer
(layer 2) adds a header and footer too.
- An Ethernet packet, assembled for transmission.
ADVANTAGES OF PACKET SWITCHING COMPARED WITH
MESSAGE SWITCHING
- more efficient use of lines;
- cost depends only on the number of packets sent,
not on distance so all data can be transmitted at local call rates;
- less likely to be affected by network failure
because of the multiple routes available to transmit data packets;
- better security; data is less likely to be
intercepted because the packets may be sent along different routes or be
interleaved with other unrelated packets.