12 - LectureTwelve Swiching
12 - LectureTwelve Swiching
, Diyala University
Switching
Whenever we have multiple devices, we have the problem of how to connect them.
One solution is to install a point-to-point connection between each pair of devices (a mesh
topology) or between a central device and every other device (a star topology). These
methods, however, are impractical and wasteful when applied to very large networks. Other
topologies employing multipoint connections, such as a bus, are ruled out because the
distance between devices and the total number of devices increase beyond the capacities of
the media.
Three methods of switching have been important: circuit switching, packet switching,
and message switching. The first two are commonly used today. The third has been phased
out in general communications but still has networking applications. New switching
strategies are gaining prominence, among them cell relay (ATM) and frame relay.
1- Circuit Switching:
Circuit switching creates a direct physical connection between two devices such as
phones or computers. For example, in figure below, instead of point-to-point connections
between the three computers on the left (A, B, and C) to the four computers on the right (D,
E, F, and G), requiring 12 links, we can use four switches to reduce the number and the
total length of the links.
By moving the levers of the switches, any computer on the left can be connected to
any computer on the right.
Circuit switching today can use either of two technologies: space-division switches or
time-division switches
Data Communication and Computer Networks, 4th Stage ( 031 ) Yahiea Al-Naiemy
Lec# 12 Switching Computer Science Dept., Diyala University
Circuit switching is less well suited to data and other non voice transmissions. Non
voice transmissions come with idle gaps between them. When circuit switched links are
used for data transmission, therefore, the line is often idle and facilities wasted.
A second weakness of circuit switched connections for data transmission is in its data
rate. Third, circuit switching is inflexible. Once a circuit has been established, that circuit is
the path taken by all parts of the transmission whether or not it remains the most efficient or
available. Finally, circuit switching sees all transmissions as equal.
2- Packet Switching:
Data Communication and Computer Networks, 4th Stage ( 030 ) Yahiea Al-Naiemy
Lec# 12 Switching Computer Science Dept., Diyala University
to the information in its header. There are two popular approaches to packet switching:
datagram and virtual circuit.
a\ Datagram Approach:
Above figure shows how the datagram approach can be used to deliver four packets
from station (A) to station (X). This approach can cause the datagrams of transmission to
arrive at their destination out of order. It is responsibility of the transport layer in most
protocols to reorder the datagrams before passing them on to the destination port.
In the virtual circuit approach to packet switching, the relationship between all packets
belonging to a message or session is preserved. A single route is chosen between sender and
receiver at the beginning of the session. When data are sent, all packets of the transmission
travel one after another along that route. Today, virtual circuit transmission is implemented
in two formats: switched virtual circuit (SVC) and permanent virtual circuit (PVC).
Data Communication and Computer Networks, 4th Stage ( 032 ) Yahiea Al-Naiemy
Lec# 12 Switching Computer Science Dept., Diyala University
Each time that (A) wishes to communicate with (X), a new route is established. The
route may be the same each time, or it may differ in response to varying network
conditions.
PVCs are comparable to leased lines in circuit switching. In this method, the same
virtual circuit is provided between two users on a continuous basis. The circuit is dedicated
to the specific users. No one else can use it and, because it is always in place, it can be used
without connection establishment and connection termination. Whereas two SVC users may
get a different route every time they request a connection, two PVC users always get the
same route as shown in figure below:
Although it seems that a circuit switched connection and a virtual circuit connection
are the same, there are differences:
Data Communication and Computer Networks, 4th Stage ( 033 ) Yahiea Al-Naiemy
Lec# 12 Switching Computer Science Dept., Diyala University
a
-
C
i
r
c
u
i
a- Circuit switched connection
Data Communication and Computer Networks, 4th Stage ( 034 ) Yahiea Al-Naiemy
Lec# 12 Switching Computer Science Dept., Diyala University
Data Communication and Computer Networks, 4th Stage ( 035 ) Yahiea Al-Naiemy
Lec# 12 Switching Computer Science Dept., Diyala University
3- Message Switching:
Message switching is best known by the description term store and forward. In this
mechanism, a node (usually a special computer with a number of disks) receives a message,
stores it until the appropriate router is free, then sends it along.
Store and forward is considered a switching technique because there is no direct link
between the sender and receiver of a transmission. A message is delivered to the node along
one path then rerouted along another to its destination.
Note that in message switching, the messages are stored and relayed from secondary
storage (disk), while in packet switching the packets are stored and forwarded from primary
storage (RAM).
Message switching was common in the 1960s and 1970s. The primary uses have been
to provide high level network services (e.g. delayed delivery, broadcast) for unintelligent
devices. Since such devices have been replaced, this type of switch has virtually
disappeared.
Data Communication and Computer Networks, 4th Stage ( 036 ) Yahiea Al-Naiemy