zaterdag 13 november 2010

1.3.1 Circuit Switching and Packet Switching

There are two fundamental approaches to moving data through a network of links
and switches: circuit switching and packet switching. In circuit-switched networks,
the resources needed along a path (buffers, link transmission rate) to provide
for communication between the end systems are reserved for the duration of the
communication session between the end-systems. In packet-switched networks,
these resources are not reserved; a session 's messages use the resources on demand,
and as a consequence, may have to wait (that is, queue) for access to a communication
link. As a simple analogy, consider two restaurants, one that requires reservations
and another that neither requires reservations nor accepts them. For the
restaurant that requires reservations, we have to go through the hassle of calling
before we leave home. But when we arrive at the restaurant we can, in principle,
immediately communicate with the waiter and order our meal. For the restaurant
that does not require reservations, we don ' t need to bother to reserve a table. But
when we arrive at the restaurant, we may have to wait for a table before we can
communicate with the waiter.
The ubiquitous telephone networks are examples of circuit-switched networks.
Consider what happens when one person wants to send information (voice or facsimile)
to another over a telephone network. Before the sender can send the information,
the network must establish a connection between the sender and the
receiver. This is a bonafide connection for which the switches on the path between
the sender and receiver maintain connection state for that connection. In the jargon
of telephony, this connection is called a circuit. When the network establishes the
circuit, it also reserves a constant transmission rate in the network's links for the
duration of the connection. Since bandwidth has been reserved for this sender-toreceiver
connection, the sender can transfer the data to the receiver at the guaranteed
constant rate. Today's Internet is a quintessential packet-switched network. Consider what
happens when one host wants to send a packet to another host over the Internet. As
with circuit switching, the packet is transmitted over a series of communication
links. But with packet switching. the packet is sent into the network without reserving
any bandwidth whatsoever. If one of the links is congested because other packets
need to be transmitted over the link at the same time, then our packet will have
to wait in a buffer at the sending side of the transmission link, and suffer a dC1lay.
The internet makes its best effort to deliver packets in a timely manner, but ,it does
not make any guarantees.
Not all telecommunication networks can be neatly classified as pure circuitswitched
networks or pure packet-switched networks. Nevertheless, this fundamental
classification into packet- and circuit-switched networks is an excellent starting
point in understanding telecommunication network technology.

Circuit Switching

This book is about computer networks, the Internet, and packet switching, not about
telephone networks and circuit switching. Nevertheless, it is important to understand
why the Internet and other computer networks use packet switching rather
than the more traditional circuit-switching technology used in the telephone networks.
For this reason, we now give a brief overview of circuit switching.
Figure 1.12 illustrates a circuit-switched network. In this network, the four circuit
switches are interconnected by four links. Each of these links has n circuits, so
that each link can support n simultaneous connections. The hosts (for example, PCs
and workstations) are each directly connected to one of the switches. When two
hosts want to communicate, the network establishes a dedicated end-to-end connection
between the two hosts. (Conference calls between more than two devices
are, of course, also possible. But to keep things simple, let's suppose for now that
there are only two hosts for each connection.) Thus, in order for Host A to send messages
to Host B, the network must first reserve one circuit on each of two links.
Because each link has II circuits, for each link used by the end-to-end connection,
the connection gets a fraction lin of the link's bandwidth for the duration of the connection.

MulLiplexlllg in Circuit-Switched Networks

A circuit in a link is implemented with either frequency-division multiplexing
(FDM) or time-division multiplexing (TDM). With FDM, the frequency spectrum
of a link is divided up among the connections established across the link.
Specifically, the link dedicates a frequency band to each connection for the
duration of the connection. In telephone networks, this frequency band typically
has a width of 4 kHz (that is, 4,000 hertz or 4,000 cycles per second). The width of the band is called, not surprisingly, the bandwidth. FM radio stations also use FOM to share the frequency spectrum between 88 MHz and 108 MHz, with each station being allocated a specific frequency band. For a TOM link, time is divided into frames of fixed duration, and each frame is divided into a fixed number of time slots. When the network establishes a connecgist's
tion across a link, the network dedicates one time slot in every frame to this connecthat
tion. These slots are dedicated for the sole use of that connection, with one time slot available for lise (in every frame) to transmit the connect jon 's data. Figure 1.13 illustrates FOM and TDM for a specific network link suppOlting up to four circuits. For FDM, the frequency domain is segmented into four bands, each of bandwidth 4 kHz. For TOM, the time domain is segmented into frames, with four time slots in each frame; each circuit is assigned the same dedicated slot in the revolving TOM frames. For TOM, the transmission rate of a circuit is equal to the frame rate multiplied by the number of bits in a slot. For example, if the link transend-
mits 8,000 frames per second and each slot consists of 8 bits, then the transmission rate of a circuit is 64 kbps. Proponents of packet switching have always argued that circuit switching is wasteful because tbe dedicated circuits are idle during silent periods. For example, when one person in a telephone call stops talking, the idle network resources (fresion
quency bands or time slots in the links along the connection's route) cannot be used by other ongoing connections. As another example of how these resources can be underutilized, consider a radiologist who uses a circuit-switched network to
remotely access a series of x-rays. The radiologist sets up a connection, requests an
image, contemplates the image, and then requests a new image. Network resources
are allocated to the connection but are not used (i.e., are wasted) during the radiologist
's contemplation periods. Proponents of packet switching also enjoy pointing out
that establishing end-to-end circuits and reserving end-to-end bandwidth is complicated
and requires complex signaling software to coordinate the operation of the
switches along the end-to-end path.
Before we finish our discussion of circuit switching, let's work through a
numerical example that should shed further insight on the topic. Let us consider how
long it takes to send a file of 640,000 bits from Host A to Host B over a circuitswitched
network. Suppose that all links in the network use TDM with 24 slots and
have a bit rate of 1.536 Mbps. Also suppose that it takes 500 msec to establish an
end-to-end circuit before Host A can begin to transmit the file . How long does it take
to send the file? Each circuit has a transmission rate of (1.536 Mbps)/24 = 64 kbps,
so it takes (640,000 bits)/(64 kbps) =10 seconds to transmit the file. To this 10 seconds
we add the circuit establishment time, giving 10.5 seconds to send the file.
Note that the transmission time is independent of the number of links: The transmission
time would be 10 seconds if the end-to-end circuit passed through one link or a
hundred links. (The actual end-to-end delay also includes a propagation delay ; see
Section 1.4.)

Packet Switching

Distributed applications exchange messages in accomplishing their task. Messages
can contain anything the protocol designer wants. Messages may perform a control
function (for example, the "Hi" messages in our handshaking example) or can contain
data, such as an e-mail message, a JPEG image, or an MP3 audio file. In modern
computer networks, the source breaks long messages into smaller chunks of data
known as packets. Between source and destination, each of these packets travels
through communication links and packet switches (for which there are two predominant
types, routers and link-layer switches). Packets are transmitted over each
communication link at a rate equal to the filiI transmission rate of the link.
Most packet switches use store-and-forward transmission at the inputs to the
links. Store-and-forward transmission means that the switch must receive the entire
packet before it can begin to transmit the flfSt bit of the packet onto the outbound link.
Thus store-and-forward packet switches introduce a store-and-forward delay at the
input to each link along the packet's route. Consider how long it takes to send a packet
of L bits from one host to another host across a packet-switched network. Let's suppose
that there are Q links between the two hosts, each of rate R bps. Assume that this
is the only packet in the network. The packet must first be transmitted onto the first
link emanating from Host A; this takes UR seconds. It must then be transmitted on
each of the Q - I remaining links; that is, it must be stored and forwarded Q - I times,
each time with a store-and-forward delay ofLfR. Thus the total delay is QUR.
Each packet switch has multiple links attached to it. For each attached link, the
packet switch has an output buffer (also called an output queue), which stores
packets that the router is about to send into that link. The output buffers playa key
role in packet switching. If an arriving packet needs to be transmitted across a link
but finds the link busy with the transmission of another packet, the arriving packet
must wait in the output buffer. Thus, in addition to the store-and-forward delays,
packets suffer output buffer queuing delays. These delays are variable and depend
on the level of congestion in the network. Since the amollnt of buffer space is finite,
an arriving packet may find that the buffer is comple tely filled with other packets
waiting for transmission. In this case, packet loss will occur-either the arriving
packet or one of the already-queued packets will be dropped. Returning to our
restaurant analogy from earlier in this section, the queuing delay is analogoLls to the
amount of time you spend waiting at the restaurant's bar for a table to become free.
Packet loss is analogous to being told by the waiter that you must leave the premises
because there are already too many other people waiting at the bar for a table.
Figure 1.14 illustrates a simple packet-switched network. In this and subsequent
figures, packets are represented by three-dimensional slabs. The width of a slab represents
the number of bits in the packet. In this figure, all packets have the same
width and hence the same length. Suppose Hosts A and B are sending packets to
Host E. Hosts A and B first send their packets along 10 Mbps Ethernet links to the
first packet switch. The packet switch then directs these packets to the 1.5 Mbps link. If the arrival rate of packets to the switch exceeds the rate at which the switch
can forward packets across the 1.5 Mbps output link, congestion will occur as packets
queue in the link's output buffer before being transmitted onto the link. We ' ll
examine this queuing delay in more detail in Section 1.4.

Packet switching Versus. Circuit Switching: Statistical Multiplexing

Having described circuit switching and packet switching, let us compare the two.
Critics of packet switching have often argued that packet switching is not suitable
for real-time services (for example, telephone calls and video conference calls)
because of its variable and unpredictable end-to-end delays (due primarily to variable
and unpredictable queuing delays). Proponents of packet switching argue that
(I) it offers better sharing of bandwidth than circuit switching and (2) it is simpler,
more efficient, and less costly to implement than circuit switching. An interesting
discussion of packet switching versus circuit switching is [Molinero-Fernandez
2002]. Generally speaking, people who do not like to hassle with restaurant reservations
prefer packet switching to circuit switching.
Why is packet switching more efficient? Let's look at a simple example. Suppose
users share a I Mbps link. Also suppose that each user alternates between periods
of acti vity, when a user generates data at a constant rate of 100 kbps, and periods
of inactivity, when a user generates no data. Suppose further that a user is active
only 10 percent of the time (and is idly drinking coffee during the remaining 90 percent
of the time). With circuit switching, 100 kbps must be reserved for each user at
all times. For example, with circuit-switched TDM, if a one-second frame is divided into 10 time slots of 100 ms each, then each user would be allocated one time slot per frame. Thus, the circuit-switched link can support only 10 (= 1 MbpsllOO kbps) simultaneous
users. With packet switching, the probability that a specific user is active is 0.1 (that is, 10 percent). If there are 35 users, the probability that there are 11 or more simultaneously active users is approximately 0.0004. (Homework Problem P7 outlines how this probability is obtained.) When there are 10 or fewer simultanepacket?
ously active users (which happens with probability 0.9996), the aggregate arrival rate of data is less than or equal to 1 Mbps, the output rate of the link. Thus, when are 10 or fewer active users, users' packets flow through the link essentially
without delay, as is the case with circuit switching. When there are more than 10 simultaneously active users, then the aggregate arrival rate of packets exceeds the
output capacity of the link, and the output queue will begin to grow. (It continues to grow until the aggregate input rate falls back below I Mbps, at which point the queue will begin to diminish in length.) Because the probability of having more than 10 simultaneously active users is minuscule in this example, packet switching proWhen
vides essentially the same performance as circuit switching, but does so while allowing for more than three times the number of users. Let's now consider a second simple example. Suppose there are 10 users and that one user suddenly generates one thousand I,OOO-bit packets, while other users remain quiescent and do not generate packets. Under TDM circuit switching with 10 slots per frame and each slot consisting of 1,000 bits, the active user can only use its one time slot per frame to transmit data, while the remaining nine times slots in each frame remain idle. It will be to seconds before all of the active user's one million bits of data has been transmitted. In the case of packet switching, the active user can conmaticall
tinuously send its packets at the full link rate of 1 Mbps, since there are no other users generating packets that need to be multiplexed with the active user's packets. In this case, all of the active user's data will be transmitted within 1 second. The above examples illustrate two ways in which the performance of packet switching can be superior to that of circuit switching. They also highlight the crucial difference between the two forms of sharing a link's transmission rate among multineighbc
ple data streams. Circuit switching pre-allocates use of the transmission link regardFlorida.
less of demand, with allocated but unneeded link time going unused . Packet switching on the other hand allocates link use on demand. Link transmiss ion capacentranCf
ity will be shared on a packet-by-packet basis only among those users who have packets that need to be transmitted over the link. Such on-demand (rather than presonville
allocated) sharing ofresources is sometimes referred to as the statistical multiplexThe
ing of resources . Although packet switching and circuit switching are both prevalent in today 's telecommunication networks, the trend has certainly been in the direction of packet switching. Even many of today 's circuit-switched telephone networks are slowly migrating toward packet switching. In particular, telephone networks often use packet switching for the expensive overseas portion of a telephone call.

Geen opmerkingen:

Een reactie posten