Sie sind auf Seite 1von 14

Contents

LECTURE 1.3 • I. Switched Communication Networks


Switching • II. Circuit-Switching
• III. Datagram Networks
—Switching Technique
—Packet Size
• IV. Datagram
• V. Virtual Circuit (VC)
• VI. Comparison of Circuit Switching and Packet
Chapter 8 Switching Switching
(Forouzan, Data Communications and Networking, 4th Edition)
• VII. Structure of a Switch

1 2

I. Switching Networks Nodes


• Long distance transmission is typically done over a • Nodes may connect to other nodes only, or to
network of switched nodes stations and other nodes
• Nodes not concerned with content of data
• Node to node links usually multiplexed
• End devices are stations
— Computer, terminal, phone, etc. • Network is usually partially connected
• A collection of nodes and connections is a —Some redundant connections are desirable for
communications network reliability
• Data routed by being switched from node to node • Two different switching technologies
• More efficient than mesh or star direct connection —Circuit switching
• More reliable than a bus connection —Packet switching

3 4
Figure 8.1 Switched network Figure 8.2 Taxonomy of switched networks

5 6

II. Circuit Switching CIRCUIT-SWITCHED NETWORKS


• Dedicated communication path between two A circuit-switched network consists of a set of switches
stations connected by physical links. A connection between two
• Three phases stations is a dedicated path made of one or more links.
—Establish However, each connection uses only one dedicated
—Transfer channel on each link. Each link is normally divided
—Disconnect into n channels by using FDM or TDM.
• Must have switching capacity and channel
A circuit-switched network is made of a set of
capacity to establish connection
switches connected by physical links, in which each
• Must have intelligence to work out routing link is divided into n channels.

7 8
Figure 8.3 A trivial circuit-switched network Circuit Switching - Applications
• Inefficient
—Channel capacity dedicated for duration of connection
—If no data, capacity wasted
• Set up (connection) takes time
• Once connected, data transfer is transparent
—Continuous flow of data mixed with silence gap
—No addressing is involved
• Developed for voice traffic (phone)
In circuit switching, the resources need to be reserved
during the setup phase;
the resources remain dedicated for the entire duration of
data transfer until the teardown phase.
9 10

Figure 8.4 Circuit-switched network used in Example 8.1 Figure 8.5 Circuit-switched network used in Example 8.2

As another example, consider a circuit-switched network that connects computers


As a trivial example, let us use a circuit-switched network to connect eight
in two remote offices of a private company. The offices are connected using a T-1
telephones in a small area. Communication is through 4-kHz voice channels. We
line leased from a communication service provider. There are two 4 × 8 (4 inputs
assume that each link uses FDM to connect a maximum of two voice channels. The
and 8 outputs) switches in this network. For each switch, four output ports are
bandwidth of each link is then 8 kHz. Figure 8.4 shows the situation. Telephone 1
folded into the input ports to allow communication between computers in the same
is connected to telephone 7; 2 to 5; 3 to 8; and 4 to 6. Of course the situation may
office. Four other output ports allow communication between the two offices.
change when new connections are made. The switch controls the connections.
Figure 8.5 shows the situation.

11 12
Phases in Circuit Switching Strength and Weakness
• Connection setup • Resource are allocated during the entire connection
duration
—Dedicated line from node to switch
• Minimum delay in data transfer phase
—Dedicated channel between the switches — Setup delay consists of
—Involve addressing and resource reservation • Propagation time of request
• Signal transfer time
—Completed when being acknowledged • Propagation time of acknowledgement
• Data transfer • Signal transfer time
— Data transfer delay consists of propagation time and data
• Teardown transfer time
— No waiting time at switch
Switching at the physical layer in the traditional
telephone network uses the circuit-switching
approach.
13 14

III DATAGRAM NETWORKS


Figure 8.6 Delay in a circuit-switched network

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 a packet-switched network, there


is no resource reservation;
resources are allocated on demand.
15 16
Packet Switching Concept Use of Packets
• First-come, first-served
• Use router instead of switch
• Also referred to as connectionless network
—Router does not keep information about connection
state
• No setup and teardown phase
• Involve queuing and delay with each packet

17 18

Figure 8.7 A datagram network with four switches (routers)


Basic Operation
• Data transmitted in small packets
— Longer messages split into series of packets
— Each packet contains a portion of user data plus some control
info
• Control info = Routing (addressing) info
— Each packet is independent from other packets
— Referred to as “Datagram”
• Packets are received, stored briefly (buffered) and past
on to the next node
— Store and forward
— Different packets can take different routes
• Can also be lost or dropped
• Up to receiver to re-order packets and recover from missing
packets
19 20
Advantages Packet Size
• Circuit switching is designed for voice
— Resources dedicated to a particular call
— Much of the time a data connection is idle
— Data rate is fixed
• Both ends must operate at the same rate
• Line efficiency
— Single node to node link can be shared by many packets over
time
— Packets queued and transmitted as fast as possible
• Data rate conversion
— Each station connects to the local node at its own speed
— Nodes buffer data if required to equalize rates
• Packets are accepted even when network is busy
— Delivery may slow down
• Priorities can be used
21 22

Datagram Figure 8.8 Routing table in a datagram network


Diagram
• Packet is routed using a
routing table
—Based on destination address
• Permanent entry
—Circuit switching use
temporary table that is
created when a call is being
setup

A switch in a datagram network


uses a routing table that is based
on the destination address.
23 24
Routing Characteristics Figure 8.9 Delay in a datagram network
• Destination Address
—Carried in header of each packet
The destination address in the header of a packet in a
datagram network remains the same during the entire
journey of the packet.
• More efficient
—Resources are allocated only when a packet need to
be transferred
—Idle capacity can be used by other sources
• 3 x Transmission time
• More delay from queuing at the router • 3 x Propagation delay
Switching in the Internet is done by using
the datagram approach to packet
—Delay can also vary from packet to packet • Wait time at router 1 switching at the network layer.
• Wait time at router 2
25 26

V. VIRTUAL-CIRCUIT NETWORKS Virtual Circuit Characteristics


A virtual-circuit network is a cross between a circuit-
• Preplanned route established before any
switched network and a datagram network. It has
packets sent
some characteristics of both.
• Call request and call accept packets establish
Virtual Circuit Packet Circuit
Switching Switching connection (handshake)
Have setup and tear down phase √ • Each packet contains a virtual circuit identifier
Resource can be allocated at setup √ √ instead of destination address
or on demand • No routing decisions required for each packet
Each packet carry abbreviated √ • Clear request to drop circuit
header
• Not a dedicated path
All packets follow the same path √
Normally implemented in datalink Network Physical
layer layer layer27 28
Virtual
Circuit Figure 8.10 Virtual-circuit network

Diagram

29 30

Figure 8.11 Virtual-circuit identifier Phases in Virtual Circuit


• Setup phase
—Switch uses global source and destination addresses
to create virtual circuit table entry
• Teardown phase
—Source and destination inform the switches to delete
the corresponding entry
• Global addressing
—Use “Teardown request” frame and “Teardown
—Only used to create virtual circuit identifier confirmation” frame
• Virtual circuit identifier (VCI) • Data transfer phase
—Used during data transfer —Looking up outgoing port and outgoing VCI using
—Small number that only have switch scope incoming port and incoming VCI
• Will change from one switch to another switch —Same procedure for all frames
—Used by a frame between two switches 31 32
Figure 8.12 Switch and tables in a virtual-circuit network Figure 8.13 Source-to-destination data transfer in a virtual-circuit network

33 34

Figure 8.14 Setup request in a virtual-circuit network Figure 8.15 Setup acknowledgment in a virtual-circuit network

• Request contains global • Final VCI (77) is • Acknowledgement still • Acknowledgement sent
source and destination assigned by the contains global source out by destination (B)
addresses destination (B) and destination has VCI = 77
• Switch must already — Identify that this frame addresses — Switch 3 uses this info
know outgoing port come from source A, — Allow the switch to to complete its table
through another and no one else reference back to • Connection is only used
permanent routing table corresponding VCI in one direction
table entry
• Incoming VCI is chosen
by the switch 35 36
Efficiency and Delay Figure 8.16 Delay in a virtual-circuit network

• Resource can be reserved during setup


—Like circuit switching
—One-time delay during setup and teardown
—Low and predictable delay for each subsequent frame
• Resource can also be reserved during each
frame
—Not common
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. • 3 x Transmission time • Setup delay
• 3 x Propagation delay • Teardown delay
37 38

VI. Virtual Circuits v Datagram


Comparison • Virtual circuits
of Circuit —Network can provide sequencing and error control
Switching —Packets are forwarded more quickly
• No routing decisions to make
and Packet —Less reliable
Switching • Loss of a node looses all circuits through that node
• Datagram
—No call setup phase
• Better if few packets
—More flexible
• Routing can be used to avoid congested parts of the
network

39 40
VII. Structure of a Switch Figure 8.17 Crossbar switch with three inputs and four outputs

We use switches in circuit-switched and packet-


switched networks. In this section, we discuss the
structures of the switches used in each type of
network.

Topics discussed in this section:


• Require large number of
Structure of Circuit Switches crosspoints
Structure of Packet Switches
• Inefficient

41 42

Example 8.3
Figure 8.18 Multistage switch
Design a three-stage, 200 × 200 switch (N = 200) with
k = 4 and n = 20.

Solution
In the first stage we have N/n or 10 crossbars, each of size
20 × 4. In the second stage, we have 4 crossbars, each of
size 10 × 10. In the third stage, we have 10 crossbars,
each of size 4 × 20. The total number of crosspoints is
• N inputs are divided into N/n groups, each groups has n inputs 2kN + k(N/n)2, or 2000 crosspoints. This is 5 percent of
— One stage-1 crossbar is needed per group the number of crosspoints in a single-stage switch (200 ×
In a three-stage switch, the total number of crosspoints is 200 = 40,000).
2kN + k(N/n)2 which is much smaller than the number of
crosspoints in a single-stage switch (N2). 43 44
Example 8.4
Multistage Switches: Blocking
• Advantage: The number of crosspoints Redesign the previous three-stage, 200 × 200 switch,
• Disadvantage: blocking using the Clos criteria with a minimum number of
—One input cannot be connected to one output crosspoints for non-blocking switch.
because there is no path available
• Even when output is not busy Solution
—Usually caused by small number of crossbars at the We let n = (200/2)1/2, or n = 10. We calculate k = 2n − 1 =
middle stage
19. In the first stage, we have 200/10, or 20, crossbars,
• Clos criterion: condition of nonblocking
each with 10 × 19 crosspoints. In the second stage, we
n ≥ (N/2)1/2 have 19 crossbars, each with 10 × 10 crosspoints. In the
k ≥ 2n – 1 third stage, we have 20 crossbars each with 19 × 10
Crosspoints ≥ 4N [(2N)1/2 – 1] crosspoints. The total number of crosspoints is 20(10 ×
19) + 19(10 × 10) + 20(19 ×10) = 9500.
45 46

Figure 8.19 Time-slot interchange


Strength and Weakness
• Space-division switch is instantaneous but needs
a lot of crosspoints
—Acceptable for high-speed connection between
switches
• Time-division switch does not need crosspoints
but incurrs processing delay
—Best for low-speed connection to the end-user
• Time-space-time (TST) switch

47 48
Figure 8.20 Time-space-time switch Figure 8.21 Packet switch components

• Completely different from circuit-switch


• Routing processor search routing table for next hop address and
output port
•Average delay equal to 4 inputs
•Pure time-division switch will have average delay of 12 inputs 49
• Switching fabric can be crossbar, Banyan, or Batcher-Banyan switch50

Figure 8.22 Input port 2x2 Banyan Switch


• Takes two inputs, numbered 0 and 1
• Also have two outputs, numbered 0 and 1
• Every packet that comes in has a header that
contains one bit indicating what its destination is
• Physical layer to process received electrical signal (either 0 or 1)
• Data link layer to decapsulate the incoming frame
• The switch reads the bit
• Also has buffer to hold packet before forwarding to switching fabric
—If it has value 0, packet is sent to its higher output
Figure 8.23 Output port —If it has value 1, packet is sent to its lower output

51 52
Figure 8.24 A banyan switch Figure 8.25 Examples of routing in a banyan switch

• Multistage switch with microswitches at each stage that route


the packets based on the output port represented as a binary
string 53 54

Figure 8.26 Batcher-banyan switch

• Problem in Banyan switch: possibility of internal collision


— Solve it by sorting the arriving packets based on their destination
port

Sort packet Prevent


duplicate
packet 55