Switching Notes
Switching Notes
A switched network consists of a series of interlinked nodes, called switches. Switches are
devices capable of creating temporary connections between two or more devices linked to the
switch. Figure 2.1 shows a switched network.
2. Before starting communication, the stations must make a reservation for the resources to be
usedduring the communication.
3. Data transferred between the two stations are not packetized. The data are a continuous flow
sent by the source station and received by the destination station.
4. There is no addressing involved during data transfer.
Efficiency:
It can be argued that circuit-switched networks are not as efficient as the other two types of
networks because resources are allocated during the entire duration of the connection. These
resources are unavailable to other connections. In a telephone network, people normally
terminate the communication when they have finished their conversation.
Delay:
Although a circuit-switched network normally has low efficiency, the delay in this type of
network is minimal. During data transfer the data are not delayed at each switch; the resources
are allocated for the duration of the connection.
Figure 2.3 shows the idea of delay in a circuit-switched network when only two switches are
involved. As Figure 2.3 shows, there is no waiting time at each switch. The total delay is due to
the time needed to create the connection, transfer data, and disconnect the circuit. The delay
caused by the setup is the sum of four parts: the propagation time of the source computer request,
the request signal transfer time, the propagation time of the acknowledgment from the
destination computer, and the signal transfer time of the acknowledgment. The delay due to data
transfer is the sum of two parts: the propagation time and data transfer time, which can be very
long. The third box shows the time needed to tear down the circuit. We have shown the case, in
which the receiver requests disconnection, which creates the maximum delay.
In data communications, we need to send messages from one end system to another. If the
message is going to pass through a packet-switched network, it needs to be divided into packets
of fixed or variable size.
The size of the packet is determined by the network and the governing protocol.
In packet switching, there is no resource allocation for a packet. This means that there is no
reserved bandwidth on the links, and there is no scheduled processing time for each packet.
Resources are allocated on demand. The allocation is done on a first-come, first-served
basis.
For example, if we do not have a reservation at a restaurant, we might have to wait. In a
packetswitched network, there is no resource reservation; resources are allocated on demand. .
Packets in this approach are referred to as datagrams.
Datagram switching is normally done at the network layer.
routing tables are dynamic and are updated periodically. The destination addresses and the
corresponding forwarding output ports are recorded in thetables. This is different from the table
of a circuit switched network in which each entry is created whenthe setup phase is completed
and deleted when the teardown phase is over. Figure 2.4 shows the routing table for a switch.
Destination Address
Every packet in a datagram network carries a header that contains, among other information, the
destination address of the packet which remains the same during the entire journey of the packet.
When the switch receives the packet, this destination address is examined; the routing table is
consulted to find the corresponding port through which the packet should be forwarded.
Three Phases
Phases in a virtual-circuit network: setup, data transfer, and teardown. In the setup phase, the
source and destination use their global addresses to help switches make table entries for the
connection. In the teardown phase, the source and destination inform the switches to delete the
corresponding entry.
Data transfer occurs between these two phases.
1. 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 table, in its simplest form, has four columns. This means that the switch holds four
pieces of information for each virtual circuit that is already set up.
Figure 2.9 shows such a switch and its corresponding table. It shows a frame arriving at port 1
with a VCI of 14. When the frame arrives, the switch looks in its table to find port 1 and a VCI
of 14. When it is found, the switch knows to change the VCI to 22 and send out the frame from
port 3.
a. The destination sends an acknowledgment to switch 3. Switch 3 uses the VCI to complete the
outgoing VCI column for this entry. Note that 77 is the incoming VCI for destination B, but the
outgoing VCI for switch 3.
b. Switch 3 sends an acknowledgment to switch 2 that contains its incoming VCI in the table,
chosen in the previous step. Switch 2 uses this as the outgoing VCI in the table.
c. Switch 2 sends an acknowledgment to switch 1 that contains its incoming VCI in the table,
chosen in the previous step. Switch 1 uses this as the outgoing VCI in the table.
d. Finally switch 1 sends an acknowledgment to source A that contains its incoming VCI in the
table, chosen in the previous step.
e. The source uses this as the outgoing VCI for the data frames to be sent to destination B.
3. Teardown 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.
Efficiency
As we said before, resource reservation in a virtual-circuit network can be made during the setup
or can be on demand during the data transfer phase.In the first case, the delay for each packet is
the same; in the second case, each packet may encounter different delays.
There is one big advantage in a virtual-circuit network even if resource allocation is on demand.