Switching - Data Communications
Switching - Data Communications
• Circuit-Switched Networks
• Datagram Networks
• Virtual-Circuit Networks
• Structure of a Switch
8-1
Switching
• 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.
• In a switched network, some of these nodes are connected to the end systems, others are
used only for routing.
8-2
Switched Network
Taxonomy of Switched Networks
• In message switching, each switch stores the whole message and forwards it to the next
switch.
8-3
Circuit-switched Networks(1)
• A circuit-switched network consists of a set of switches connected by physical links.
• A connection between two stations is a dedicated path made of one or more links.
8-4
A circuit-switched network
Circuit-switched Networks(2)
Three phases
•Actual communication requires three phases:
- connection setup
- data transfer
- connection teardown
Setup phase
•Before the parties can communicate, a channel (circuit) is reserved on each link.
Teardown phase
•When one of the parties needs to disconnect, a signal is sent to each switch to release the
resources.
8-5
Circuit-Switched Network: Example 1
8-6
Circuit-Switched Network: Example 2
8-7
Circuit-switched Networks(5)
• Not as efficient as other two types of networks.
• Delay is minimal.
• Switching at the physical layer in the traditional telephone network uses the
circuit-switching approach.
8-8
Delay in circuit-switched network
Datagram Networks(1)
• Means that there is no reserved bandwidth on the links, and there is no scheduled
processing time for each packet.
8-9
Datagram Networks(2)
• In a datagram network, each packet is treated independently of all others.
•
• Packets in this approach are referred to as datagrams.
8-10
Datagram Networks(3)
Routing Table
• A switch in a datagram networks uses a routing table
that is based on the destination address.
• Datagram network may have greater delay than a virtual-circuit network even
though no setup and teardown phases.
8-12
Delay in datagram network
Virtual-Circuit Networks(1)
• A virtual-circuit network (VCN) is a cross between a circuit-switched network
and a datagram network.
8-14
Virtual-Circuit Networks(3)
Addressing
•Two types of addressing: global and local (virtual-circuit identifier: VCI)
8-15
Virtual-Circuit Networks(4)
Three Phases
•Data transfer phase, setup phase, teardown phase
Setup Phase
•Switch creates an entry for a virtual-circuit.
•Two steps are required: the setup request and the acknowledgement.
Teardown Phase
•Two frames are exchanged: the teardown request and teardown confirmation.
8-16
Data transfer Phase
8-17
Setup Phase: Setup Request
8-18
Setup Phase: Acknowledgement
8-19
Virtual-Circuit Networks(8)
• In virtual-circuit switching, all packets belonging to the same source and destination
travel the same path; but the packets may arrive at the destination with different
delays if resource allocation is on demand.
• Switching at the data link layer in a switched WAN is normally implemented by using
virtual-circuit techniques.
8-20
Structure of Circuit Switches
• Space-division switch or time-division switch.
Space-division Switch
- in this switching, the paths in the circuit are separated from one another
spatially.
- crossbar switch, multistage switch
8-21
Crossbar Switch
Crossbar Switches: Problem
• The number of switches is huge.
– connect n inputs by m output -- requires n*m crosspoints.
– Ex : 1000 input, 1000 output → 1,000,000 crosspoint
• Inefficient
– fewer than 25% of the crosspoints are in use at a given
time.
8-22
Multistage Switch
8-23
Design of a Three-Stage Switch
• Three steps
– Divide the N input lines into groups, each of n lines. For each group, use one
crossbar of size n x k, where k is the number of crossbars in the middle stage
– Use k crossbars, each of size (N/n) x (N/n) in the middle stage
– Use N/n crossbars, each of size k x n at the third stage.
8-24
Multistage Switch: Example 1
• Design a three-stage, 200 × 200 switch (N = 200) with k =
4 and n = 20.
8-25
Multistage Switches
• Advantage: The number of crosspoints.
• Disadvantage: blocking
(Blocking refers to times when one input cannot be connected
to an output because there is no path available between them –
all the possible intermediate switches are occupied.)
8-26
Multistage Switch: Example 2
• Redesign the previous three-stage, 200 × 200 switch, using the Clos
criteria with a minimum number of crosspoints.
.
• We let n = (200/2)1/2, or n = 10. We calculate k = 2n − 1 = 19. In the
first stage, we have 200/10, or 20, crossbars, each with 10 × 19
crosspoints. In the second stage, we have 19 crossbars, each with 10
× 10 crosspoints. In the third stage, we have 20 crossbars each with
19 × 10 crosspoints. The total number of crosspoints is 20(10 × 19) +
19(10 × 10) + 20(19 ×10) = 9500.
8-27
Time-division switch
• Time Division Switching uses TDM inside a switch.
• The size of each location is same as the size of a single time slot.
• The RAM fills up with incoming data from time slots in the order received. Slots are
then sent out in an order based on the decisions of a control unit.
8-28
Time-Slot Interchange
Time- and Space-Division Switch Combinations
• Fig. shows a simple time-space-time (TST) switch that consists of two time
stages and one space stage.
• Middle stage is a space-division switch (crossbar) that connects the TSI groups
to allow connectivity between all possible input and output pairs.
8-29
TST Switch
8-30
Structure of Packet Switches
8-31
Structure of Packet Switches(2)
INPUT PORTS
• Perform physical and data link functions.
• Bits are constructed from the received signal.
• Packet is decapsulated from the frame.
• Errors are detected and corrected.
• In addition to physical layer processor and a data link processor, the input port
has buffers (queues) to hold the packet before it is directed to the switching
fabric.
8-32
Structure of Packet Switches(3)
OUTPUT PORTS
• Perform the same functions as the input port, but in the reverse order.
• First, outgoing packets are queued, then the packet is encapsulated in a frame,
and finally to create the signal to be sent on the line.
8-33
Structure of Packet Switches(4)
ROUTING PROCESSOR
• Perform the functions of network layer.
• Table lookup: searching the routing table for next hop address and output
port number by destination address.
SWITCHING FABRICS
• Difficult task in a packet switch is to move the packet from the input queue to
the output queue.
• The speed with which this is done affects the size of the input/output queue
and the overall delay in packet delivery.
• Types: Crossbar switch
Banyan switch
Batcher-Banyan switch
8-34
Banyan Switch
• Multistage switch with microswitches at each stage that route the packets
based on the output port represented as a binary string.
• For n inputs and n outputs, we have log2n stages with n/2 microswitches
at each stage.
8-35
Examples of Routing in a Banyan Switch
• First stage routes the packet based on the high-order bit of the binary
string.
• Second stage routes the packet based on the second high-order bit, and so
on.
8-36
Batcher-Banyan Switch
• Problem in Banyan switch: possibility of internal collision
– Solve it by sorting the arriving packets based on their destination port
• Sorting switch uses hardware merging techniques.
• Trap module prevents duplicate packets from passing to the banyan
switch simultaneously.
8-37