Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SOLUTIONS MANUAL DATA AND COMPUTER COMMUNICATIONS Seventh Edition WILLIAM STALLINGS Copyright 2003: William Stallings 2 © 2003 by William Stallings All rights reserved. No part of this document may be reproduced, in any form or by any means, or posted on the Internet, without permission in writing from the author -2- 3 NOTICE This manual contains solutions to all of the review questions and homework problems in Data and Computer Communications, Seventh Edition. If you spot an error in a solution or in the wording of a problem, I would greatly appreciate it if you would forward the information via email to me at [email protected] An errata sheet for this manual, if needed, is available at W.S. -3- 4 TABLE OF CONTENTS Chapter 2: Chapter 3: Chapter 4: Chapter 5: Chapter 6: Chapter 7: Chapter 8: Chapter 9: Chapter 10: Chapter 11: Chapter 12: Chapter 13: Chapter 14: Chapter 15: Chapter 16: Chapter 17: Chapter 18: Chapter 19: Chapter 20: Chapter 21: Chapter 22: Protocol Architecture...................................................................................5 Data Transmission .......................................................................................8 Guided and Wireless Transmission.........................................................12 Signal Encoding Techniques.....................................................................16 Digital Data Communication Techniques ..............................................24 Data Link Control.......................................................................................31 Multiplexing................................................................................................38 Spread Spectrum ........................................................................................43 Circuit Switching and Packet Switching.................................................46 Asynchronous Transfer Mode..................................................................50 Routing in Switched Networks ................................................................56 Congestion Control in Switched Data Networks ..................................62 Cellular Wireless Networks......................................................................65 Local Area Network Overview ................................................................69 High-Speed LANs ......................................................................................77 Wireless LANs ............................................................................................82 Internetwork Protocols..............................................................................84 Internetwork Operation ............................................................................91 Transport Protocols....................................................................................96 Network Security .....................................................................................102 Distributed Applications.........................................................................106 -4- 5 CHAPTER 2 PROTOCOL ARCHITECTURE A N SWERS NSWERS TO Q UESTIONS 2.1 The network access layer is concerned with the exchange of data between a computer and the network to which it is attached. 2.2 The transport layer is concerned with data reliability and correct sequencing. 2.3 A protocol is the set of rules or conventions governing the way in which two entities cooperate to exchange data. 2.4 A PDU is the combination of data from the next higher communications layer and control information. 2.5 The software structure that implements the communications function. Typically, the protocol architecture consists of a layered set of protocols, with one or more protocols at each layer. 2.6 Transmission Control Protocol/Internet Protocol (TCP/IP) are two protocols originally designed to provide low level support for internetworking. The term is also used generically to refer to a more comprehensive collection of protocols developed by the U.S. Department of Defense and the Internet community. 2.7 Layering decomposes the overall communications problem into a number of more manageable subproblems. 2.8 A router is a device that operates at the Network layer of the OSI model to connect dissimilar networks. A N SWERS NSWERS TO PROBLEMS 2.1 The guest effectively places the order with the cook. The host communicates this order to the clerk, who places the order with the cook. The phone system provides the physical means for the order to be transported from host to clerk. The cook gives the pizza to the clerk with the order form (acting as a "header" to the pizza). The clerk boxes the pizza with the delivery address, and the delivery van encloses all of the orders to be delivered. The road provides the physical path for delivery. 2.2 a. -5- 6 The PMs speak as if they are speaking directly to each other. For example, when the French PM speaks, he addresses his remarks directly to the Chinese PM. However, the message is actually passed through two translators via the phone system. The French PM's translator translates his remarks into English and telephones these to the Chinese PM's translator, who translates these remarks into Chinese. b. An intermediate node serves to translate the message before passing it on. 2.3 Perhaps the major disadvantage is the processing and data overhead. There is processing overhead because as many as seven modules (OSI model) are invoked to move data from the application through the communications software. There is data overhead because of the appending of multiple headers to the data. Another possible disadvantage is that there must be at least one protocol standard per layer. With so many layers, it takes a long time to develop and promulgate the standards. 2.4 No. There is no way to be assured that the last message gets through, except by acknowledging it. Thus, either the acknowledgment process continues forever, or one army has to send the last message and then act with uncertainty. 2.5 A case could be made either way. First , look at the functions performed at the network layer to deal with the communications network (hiding the details from the upper layers). The network layer is responsible for routing data through the network, but with a broadcast network, routing is not needed. Other functions, such as sequencing, flow control, error control between end systems, can be accomplished at layer 2, because the link layer will be a protocol directly between the two end systems, with no intervening switches. So it would seem that a network layer is not needed. Second, consider the network layer from the point of view of the upper layer using it. The upper layer sees itself attached to an access point into a network supporting communication with multiple devices. The layer for assuring that data sent across a network is delivered to one of a number of other end systems is the network layer. This argues for inclusion of a network layer. In fact, the OSI layer 2 is split into two sublayers. The lower sublayer is concerned with medium access control (MAC), assuring that only one end system at a time transmits; the MAC sublayer is also responsible for addressing other end systems across the LAN. The upper sublayer is called Logical Link Control (LLC). LLC performs traditional link control functions. With the MAC/LLC combination, no network layer is needed (but an internet layer may be needed). 2.6 a. The internet protocol can be defined as a separate layer. The functions performed by IP are clearly distinct from those performed at a network layer and those performed at a transport layer, so this would make good sense. b. The session and transport layer both are involved in providing an end-to-end service to the OSI user, and could easily be combined. This has been done in TCP/IP, which provides a direct application interface to TCP. -6- 7 2.7 a. No. This would violate the principle of separation of layers. To layer (N – 1), the N-level PDU is simply data. The (N – 1) entity does not know about the internal format of the N-level PDU. It breaks that PDU into fragments and reassembles them in the proper order. b. Each N-level PDU must retain its own header, for the same reason given in (a). 2.8 Suppose that A sends a data packet k to B and the ACK from B is delayed but not lost. A resends packet k, which B acknowledges. Eventually A receives 2 ACKs to packet k, each of which triggers transmission of packet (k + 1). B will ACK both copies of packet (k + 1), causing A to send two copies of packet (k + 2). From now on, 2 copies of every data packet and ACK will be sent. 2.9 TFTP can transfer a maximum of 512 bytes per round trip (data sent, ACK received). The maximum throughput is therefore 512 bytes divided by the roundtrip time. Source: [STEV94]. -7- 8 CHAPTER 3 DATA TRANSMISSION A N SWERS NSWERS TO Q UESTIONS 3.1 With guided media, the electromagnetic waves are guided along an enclosed physical path whereas unguided media provide a means for transmitting electromagnetic waves but do not guide them. 3.2 A continuous or analog signal is one in which the signal intensity varies in a smooth fashion over time while a discrete or digital signal is one in which the signal intensity maintains one of a finite number of constant levels for some period of time and then changes to another constant level. 3.3 Amplitude, frequency, and phase are three important characteristics of a periodic signal. 3.4 2p radians. 3.5 The relationship is lf = v, where l is the wavelength, f is the frequency, and v is the speed at which the signal is traveling. 3.6 The spectrum of a signal is the frequencies it contains while the bandwidth of a signal is the width of the spectrum. 3.7 Attenuation is the gradual weakening of a signal over distance. 3.8 The rate at which data can be transmitted over a given communication path, or channel, under given conditions, is referred to as the channel capacity. 3.9 Bandwidth, noise, and error rate. A N SWERS NSWERS 3.1 TO PROBLEMS a. If two devices transmit at the same time, their signals will be on the medium at the same time, interfering with each other; i.e., there signals will overlap and become garbled. b. See discussion in Section 15.3. on medium access control. 3.2 Period = 1/1000 = 0.001 s = 1 ms. 3.3 a. sin (2p ft – p ) + sin (2p ft + p) = 2 sin (2p ft + p) or 2 sin (2p ft – p ) or –2 sin (2p ft) b. sin (2p ft) + sin (2p ft – p ) = 0. -8- 9 3.4 N C F 264 D W 1.25 D 297 33 E 330 33 1.11 F 352 22 1 G 396 44 0.93 A 440 44 0.83 B 495 55 0.75 C 528 33 0.67 0.63 N = note; F = frequency (Hz); D = frequency difference; W = wavelength (m) 3.5 2 sin(4p t + p); A = 2, f = 2, f = p 3.6 (1 + 0.1 cos 5t) cos 100t = cos 100t + 0.1 cos 5t cos 100t. From the trigonometric identity cos a cos b = (1/2)(cos(a + b) + cos(a – b)), this equation can be rewritten as the linear combination of three sinusoids: cos 100t + 0.05 cos 105t + 0.05 cos 95t. Source: [MOSH89] 3.7 We have cos2 x = cos x cos x = (1/2)(cos(2x) + cos(0)) = (1/2)(cos(2x) + 1). Then: f(t) = (10 cos t)2 = 100 cos2 t = 50 + 50 cos(2t). The period of cos(2t) is p and therefore the period of f(t) is p . 3.8 If f1 (t) is periodic with period X, then f1 (t) = f1 (t +X) = f1 (t +nX) where n is an integer and X is the smallest value such that f1 (t) = f1 (t +X). Similarly, f2 (t) = f2 (t +Y) = f2 (t + mY). We have f(t) = f1 (t) + f2 (t). If f(t) is periodic with period Z, then f(t) = f(t + Z). Therefore f1 (t) + f2 (t) = f1 (t + Z) + f2 (t + Z). This last equation is satisfied if f1 (t) = f1 (t + Z) and f 2 (t) = f2 (t + Z). This leads to the condition Z = nX = mY for some integers n and m. We can rewrite this last as (n/m) = (Y/X). We can therefore conclude that if the ratio (Y/X) is a rational number, then f(t) is periodic. 3.9 The signal would be a low-amplitude, rapidly changing waveform. 3.10 No transmission medium is capable of transmitting the entire spectrum of frequencies. A real signal therefore is bandlimited, with frequencies above a certain point absent. However, most of the information is in the lower frequencies. This is not a problem if it is remembered that the object of the transmission is to send signals that represent binary 1s and 0s. Even though there will be some distortion because of the loss of higher frequencies, the shape of the original pulse is known (by the specifications for the transmission system). Thus, the receiver will usually be able to distinguish a binary 0 from a binary 1. 3.11 A 6-bit code allows only 64 unique characters to be defined. Several shift lock codes were defined in various versions of TTS (shift, supershift, unshift). These codes change the meaning of all codes that follow until a new shift lock code appears. Thus, with two shift locks, 3 ¥ (64 - 3) = 183 different codes can be defined. The actual number is less, since some codes, such as space, are "don't-cares" with respect to shift locks. 3.12 Refer to the reasoning of Section 3.2. Retaining the vertical resolution of 483 lines, each horizontal line occupies 52.5 µsec. A horizontal resolution of H lines results in a maximum of H/2 cycles per line, thus the bandwidth of 5 MHz allows: 5 MHz = (H/2) / 52.5 µsec -9- 10 H = 525 lines Now, if we assume the same horizontal resolution of H = 450, then for a bandwidth of 5 MHz, the duration of one line is: 5 MHz = (450/2) / T T = 45 µsec allowing 11 µsec for horizontal retrace, each line occupies 56.2 µsec. The scanning frequency is: (1/30 s/scan) /V lines = 56.2 µsec/line V = 593 lines 3.13 a. (30 pictures/s) (480 ¥ 500 pixels/picture) = 7.2 ¥ 106 pixels/s Each pixel can take on one of 32 values and can therefore be represented by 5 bits: R = 7.2 ¥ 106 pixels/s ¥ 5 bits/pixel = 36 Mbps b. We use the formula: C = B log2 (1 + SNR) B = 4.5 ¥ 106 MHz = bandwidth, and SNRdB = 35 = 10 log10 (SNR), hence SNR = 10 35/10 = 103.5, and therefore C = 4.5 ¥ 106 log2 (1 + 103.5) = 4.5 ¥ 106 ¥ log 2 (3163) C = (4.5 ¥ 106 ¥ 11.63) = 52.335 ¥ 106 bps c. Allow each pixel to have one of ten intensity levels and let each pixel be one of three colors (red, blue, green) for a total of 10 ¥ 3 = 30 levels for each pixel element. 3.14 N = 10 log k + 10 log T + 10 log B = –228.6 dBW + 10 log 104 + 10 log 107 = –228.6 + 40 + 70 = –118.6 dBW Source: [FREE98] 3.15 Using Shannon's equation: C = B log2 (1 + SNR) We have W = 300 Hz (SNR)dB = 3 Therefore, SNR = 100.3 C = 300 log2 (1 + 100.3) = 300 log2 (2.995) = 474 bps 3.16 Using Nyquist's equation: C = 2B log2M We have C = 9600 bps a. log2 M = 4, because a signal element encodes a 4-bit word Therefore, C = 9600 = 2B ¥ 4, and B = 1200 Hz b. 9600 = 2B ¥ 8, and B = 600 Hz 3.17 N = 1.38 ¥ 10–23 ¥ (50 + 273) ¥ 10,000 = 4.5 ¥ 10–17 watts -10- 11 3.18 Nyquist analyzed the theoretical capacity of a noiseless channel; therefore, in that case, the signaling rate is limited solely by channel bandwidth. Shannon addressed the question of what signaling rate can be achieved over a channel with a given bandwidth, a given signal power, and in the presence of noise. 3.19 C = B log2 (1 + SNR) 20 ¥ 10 6 = 3 ¥ 106 ¥ log 2 (1 + SNR) log2 (1 + SNR) = 6.67 1 + SNR = 102 SNR = 101 3.20 a. Output waveform: sin (2p f1 t) + 1/3 sin (2p(3f 1 )t) + 1/5 sin (2p(5f 1 )t) + 1/7 sin (2p (7f 1 )t) where f1 = 1/T = 1 kHz Output power = 1/2 (1 + 1/9 + 1/25 + 1/49) = 0.586 watt b. Output noise power = 8 kHz ¥ 0.1 mWatt/Hz = 0.8 mWatt SNR = 0.586/0.0008 = 732.5 (SNR)db = 28.65 3.21 (Eb/N0 ) = –151 dBW – 10 log 2400 – 10 log 1500 + 228.6 dBW = 12 dBW Source: [FREE98] 3.22 Decibels Losses Gains 1 0.8 1.25 2 0.63 1.6 3 0.5 2 4 0.4 2.5 5 0.32 3.2 6 0.25 4.0 7 0.2 5.0 3.23 For a voltage ratio, we have NdB = 30 = 20 log(V2 /V1 ) V2 /V1 = 1030/20 = 101.5 = 31.6 3.24 Power (dBW) = 10 log (Power/1W) = 10 log20 = 13 dBw -11- 8 0.16 6.3 9 0.125 8.0 10 0.1 10 12 CHAPTER 4 TRANSMISSION MEDIA A N SWERS NSWERS TO Q UESTIONS 4.1 The twisting of the individual pairs reduces electromagnetic interference. For example, it reduces crosstalk between wire pairs bundled into a cable. 4.2 Twisted pair wire is subject to interference, limited in distance, band width, and data rate. 4.3 Unshielded twisted pair (UTP) is ordinary telephone wire, with no form of electromagnetic shielding around the wire. Shielded twisted pair (STP) surrounds the wire with a metallic braid or sheathing that reduces interference. 4.4 Optical fiber consists of a column of glass or plastic surrounded by an opaque outer jacket. The glass or plastic itself consists of two concentric columns. The inner column called the core has a higher index of refraction than the outer column called the cladding. 4.5 Point-to-point microwave transmission has a high data rate and less attenuation than twisted pair or coaxial cable. It is affected by rainfall, however, especially above 10 GHz. It is also requires line of sight and is subject to interference from other microwave transmission, which can be intense in some places. 4.6 Direct broadcast transmission is a technique in which satellite video signals are transmitted directly to the home for continuous operation. 4.7 A satellite must use different uplink and downlink frequencies for continuous operation in order to avoid interference. 4.8 Broadcast is omnidirectional, does not require dish shaped antennas, and the antennas do not have to be rigidly mounted in precise alignment. 4.9 The two functions of an antenna are: (1) For transmission of a signal, radiofrequency electrical energy from the transmitter is converted into electromagnetic energy by the antenna and radiated into the surrounding environment (atmosphere, space, water); (2) for reception of a signal, electromagnetic energy impinging on the antenna is converted into radio-frequency electrical energy and fed into the receiver. 4.10 An isotropic antenna is a point in space that radiates power in all directions equally. 4.11 A parabolic antenna creates, in theory, a parallel beam without dispersion. In practice, there will be some beam spread. Nevertheless, it produces a highly focused, directional beam. 4.12 Effective area and wavelength. -12- 13 4.13 Free space loss. 4.14 Refraction is the bending of a radio beam caused by changes in the speed of propagation at a point of change in the medium. 4.15 Diffraction occurs at the edge of an impenetrable body that is large compared to the wavelength of the radio wave. The edge in effect become a source and waves radiate in different directions from the edge, allowing a beam to bend around an obstacle. If the size of an obstacle is on the order of the wavelength of the signal or less, scattering occurs. An incoming signal is scattered into several weaker outgoing signals in unpredictable directions. A N SWERS NSWERS TO PROBLEMS 4.1 Elapsed time = (5000 km)/(1000 km/hr) = 5 hours = 18,000 seconds Amount of data per diskette = 1.4 ¥ 10242 ¥ 8 = 11.74 ¥ 106 bits/diskette Number of diskettes = (107 g)/(30 g/diskette) = 333333 diskettes (11.74 ¥ 106 bits diskette) ¥ (333333 diskettes) = 217 Mbps Data transfer rate = 18, 000 seconds 4.2 10 log (Po/P i ) = –20dB; Therefore, Po/P i = 0.01 For Pi = 0.5 Watt, Po = 0.005 Watt SNR = 0.005/(4.5 ¥ 10-6) = 1.11¥ 103 SNRdB = 10 log (1.11 ¥ 10 3) = 30 dB 4.3 The allowable power loss is 10 ¥ log 100 = 20 dB a. From Figure 4.3, the attenuation is about 13 dB per km. Length = (20 dB)/(13 dB per km) = 1.5 km b. Length = (20 dB)/(20 dB per km) = 1 km c. Length = (20 dB)/(2.5 dB per km) = 8 km d. Length = (20 dB)/(10 dB per km) = 2 km e. Length = (20 dB)/(0.2 dB per km) = 100 km 4.4 An electromagnetic wave cannot penetrate an enclosing conductor. If the outer conductor of a coaxial cable is everywhere held at ground potential, no external disturbance can reach the inner, signal-carrying, conductor. 4.5 From Equation 4,2, the ratio of transmitted power to received power is Pt/P r = (4pd/ l) 2 If we double the frequency, we halve l, or if we double the distance, we double d, so the new ratio for either of these events is: Pt/P r2 = (8pd/ l) 2 Therefore: -13- 14 10 log (Pr /P r2) = 10 log (22 ) = 6 dB Source: [MOSH89] 4.6 We have lf = c; in this case l ¥ 30 = 3 ¥ 108 m/sec, which yields a wavelength of 10,000 km. Half of that is 5,000 km which is comparable to the east-to-west dimension of the continental U.S. While an antenna this size is impractical, the U.S. Defense Department has considered using large parts of Wisconsin and Michigan to make an antenna many kilometers in diameter. 4.7 a. Using l f = c, we have l = (3 ¥ 10 8 m/sec)/(300 Hz) = 1,000 km, so that l/2 = 500 km. b. The carrier frequency corresponding to l/2 = 1 m is given by: f = c/l = (3 ¥ 108 m/sec)/(2 m) = 150 MHz. 4.9 l = 2 ¥ 2.5 ¥ 10 –3 m = 5 ¥ 10–3 m f = c/l = (3 ¥ 108 m/sec)/( 5 ¥ 10-3 m) = 6 ¥ 1010 Hz = 60 GHz 4.10 Distance (km) 1 2 4 8 16 Radio (dB) Wire (dB) –6 –3 –12 –6 –18 –12 –24 –24 –30 –28 4.11 a. First, take the derivative of both sides of the equation y2 = 2px: dy 2 dy dy dy p y = (2 px ); 2 y = 2 p; = dx dx dx dx y Therefore tan b = (p/y1 ). b. The slope of PF is (y1 – 0)/(x1 – (p/2)). Therefore: y1 p p y1 1 x1 y12 - px1 + p 2 2 2 tan a = y1 p = 1 1+ p y1 x1 y1 - 2 py1 + py1 x1 2 2 Because y1 = 2 px1 , this simplifies to tan a = (p/y1 ). 4.12 LdB = 20 log(fMHz ) + 120 +20 log (dkm) + 60 – 147.56 = 20 log(fMHz ) +20 log (dkm) + 32.44 4.13 a. From Appendix 3A, PowerdBW = 10 log (PowerW) = 10 log (50) = 17 dBW PowerdBm = 10 log (PowermW) = 10 log (50,000) = 47 dBm -14- 15 b. Using Equation (4.3), LdB = 20 log(900 ¥ 10 6 ) +20 log (100) – 147.56 = 120 + 59.08 +40 – 147.56 = 71.52 Therefore, received power in dBm = 47 – 71.52 = –24.52 dBm c LdB = 120 + 59.08 +80 – 147.56 =111.52; Pr,dBm = 47 – 111.52 = –64.52 dBm d The antenna gain results in an increase of 3 dB, so that Pr,dBm = –61.52 dBm Source: [RAPP96] 4.14 a. G = 7A/l 2 = 7Af2 /c 2 = (7 ¥ p ¥ (0.6) 2 ¥ (2¥ 109 )2 ]/(3 ¥ 108 )2 = 351.85 GdB = 25.46 dB b. 0.1 W x 351.85 = 35.185 W c. Use LdB = 20 log (4p) + 20 log (d) + 20 log (f) – 20 log (c) – 10 log(G r ) – 10 log (G t) LdB = 21.98 + 87.6 + 186.02 – 169.54 – 25.46 – 25.46 = 75.14 dB The transmitter power, in dBm is 10 log (100) = 20. The available received signal power is 20 – 75.14 = –55.14 dBm 4.15 By the Pythagorean theorem: d2 + r2 = (r + h)2 Or, d2 = 2rh + h2 . The h2 term is negligible with respect to 2rh , so we use d2 = 2rh. Then, d km = 2rkm hkm = 2 rkm hm / 1000 = 2 ¥ 6.37 ¥ hm = 3. 57 hm 4.16 For radio line of sight, we use d = 3.57 Kh , with K = 4/3, we have 802 = (3.57)2 ¥ 1.33 ¥ h. Solving for h, we get h = 378 m. 4.17 Let RI = refractive index, a = angle of incidence, b = angle of refraction (sin a )/sin b ) = RIair/RIwater = 1.0003/(4/3) = 0.75 sin b = 0.5/0.75 = 0.66; b = 41.8° -15- 16 CHAPTER 5 SIGNAL ENCODING TECHNIQUES A N SWERS NSWERS TO Q UESTIONS 5.1 Signal spectrum: A lack of high-frequency components means that less bandwidth is required for transmission. In addition, lack of a direct-current (dc) component means that ac coupling via transformer is possible. The magnitude of the effects of signal distortion and interference depend on the spectral properties of the transmitted signal. Clocking: Encoding can be used to synchronize the transmitter and receiver. Error detection: It is useful to have some error detection capability built into the physical signaling encoding scheme. Signal interference and noise immunity: Certain codes exhibit superior performance in the presence of noise. Cost and complexity: The higher the signaling rate to achieve a given data rate, the greater the cost. Some codes require a signaling rate that is in fact greater than the actual data rate. 5.2 In differential encoding, the signal is decoded by comparing the polarity of adjacent signal elements rather than determining the absolute value of a signal element. 5.3 Non return-to-zero-level (NRZ-L) is a data encoding scheme in which a negative voltage is used to represent binary one and a positive voltage is used to represent binary zero. As with NRZ-L, NRZI maintains a constant voltage pulse for the duration of a bit time. The data themselves are encoded as the presence or absence of a signal transition at the beginning of the bit time. A transition (low to high or high to low) at the beginning of a bit time denotes a binary 1 for that bit time; no transition indicates a binary 0. 5.4 For bipolar-AMI scheme, a binary 0 is represented by no line signal, and a binary 1 is represented by a positive or negative pulse. The binary 1 pulses must alternate in polarity. For pseudoternary, a binary 1 a is represented by the absence of a line signal, and a binary 0 by alternating positive and negative pulses. 5.5 A biphase scheme requires at least one transition per bit time and may have as many as two transitions. In the Manchester code, there is a transition at the middle of each bit period; a low-to-high transition represents a 1, and a high-to-low transition represents a 0. In differential Manchester, the midbit transition is used only to provide clocking. The encoding of a 0 is represented by the presence of a transition at the beginning of a bit period, and a 1 is represented by the absence of a transition at the beginning of a bit period. 5.6 In a scrambling technique, sequences that would result in a constant voltage level on the line are replaced by filling sequences that will provide sufficient transitions for the receiver's clock to maintain synchronization. The filling sequence must be recognized by the receiver and replaced with the original data sequence. The filling sequence is the same length as the original sequence, so there is no data rate penalty. -16- 17 5.7 A modem converts digital information into an analog signal, and conversely. 5.8 With amplitude-shift keying, binary values are represented by two different amplitudes of carrier frequencies. This approach is susceptible to sudden gain changes and is rather inefficient. 5.9 The difference is that offset QPSK introduces a delay of one bit time in the Q stream 5.10 QAM takes advantage of the fact that it is possible to send two different signals simultaneously on the same carrier frequency, by using two copies of the carrier frequency, one shifted by 90˚ with respect to the other. For QAM, each carrier is ASK modulated. 5.11 The sampling rate must be higher than twice the highest signal frequency. 5.12 Frequency modulation (FM) and phase modulation (PM) are special cases of angle modulation. For PM, the phase is proportional to the modulating signal. For FM, the derivative of the phase is proportional to the modulating signal. A N SWERS NSWERS TO PROBLEMS 5.1 NRZI, Differential Manchester 5.2 NRZ-L produces a high level for binary 0 and a low level for binary 1. Map this level as indicated by the definition for 1 and 0 for each of the other codes. 5.3 First, E-NRZ provides a minimum transition rate that reduces the dc component. Second, under worst case, E-NRZ provides a minimum of one transition for every 14 bits, reducing the synchronization problem. Third, the parity bit provides an error check. The disadvantages of E-NRZ are added complexity and the overhead of the extra parity bit. 5.4 -17- 18 In this diagram, a dashed arrow represents a binary 0 and a solid arrow represents a binary 1. The labels –, 0, and + are used to indicate the line voltages: negative, zero, and positive, respectively. 5.5 a. cm = bm – bm–1 = (am + bm–1) – bm–1 = am b. Bipolar-AMI 5.6 5.7 With Manchester, there is always a transition in the middle of a bit period. 1 1 1 0 0 1 -18- 1 0 1 0 19 5.8 5.9 The error is at bit position 7, where there is a negative pulse. For AMI, positive and negative pulses are used alternately for binary 1. The pulse in position 1 represents the third binary 1 in the data stream and should have a positive value. 5.10 +–0+–0–+ BPV could have been produced by either +–0+–+–+ error: converted to 0 +–0+–0–+ or +–0+00–+ error: converted to – +–0+–0–+ 5.11 s(t) = d 1 (t)cos wct + d 2 (t)sin wct Use the following identities: cos2a = 2cos2 a – 1; sin2 a = 2sina cosa s(t) coswct = d 1 (t)cos2 wct + d 2 (t)sinwct coswct = (1/2)d1 (t) + (1/2)d1 (t) cos2wct + (1/2)d2 (t) sin2wct Use the following identities: cos2a = 1 – 2 sin2 a; sin2 a = 2sin a cosa s(t) sinw ct = d 1 (t) coswct sinwct + d 2 (t)sin2 wct -19- 20 = (1/2)d1 (t) sin2wct + (1/2)d2 (t) - (1/2)d2 (t) cos2wct All terms at 2wc are filtered out by the low-pass filter, yielding: y1 (t) = (1/2)d1 (t); y 2 (t) = (1/2)d2 (t) 5.12 Ts = signal element period; Tb = bit period; A = amplitude = 0.005 a. Ts = T b = 10-5 sec T 1 s2 A2 P= s (t) = Ts Ú 2 0 Eb = P ¥ Tb = P ¥ Ts = ( b. ) A2 ¥ Ts ; N 0 = 2.5 ¥ 10 -8 ¥ Ts 2 A2 2 ¥ Ts Eb = = 500 ; N0 2.5 ¥ 10-8 ¥ Ts (Eb N0 )dB = 10 log 500 = 27 dB Ts T ; Eb = P ¥ s ; N 0 = 2.5 ¥ 10 -8 ¥ Ts 2 2 (Eb N 0 ) = 250; (Eb N 0 )dB = 10 log 250 = 24 dB Tb = 5.13 Each signal element conveys two bits. First consider NRZ-L. It should be clear that in this case, D = R/2. For the remaining codes, one must first determine the average number of pulses per bit. For example, for Biphase-M, there is an average of 1.5 pulses per bit. We have pulse rate of P which yields a data rate of R = P/1.5 D = P/2 = (1.5 x R)/2 = 0.75 ¥ R 5.14 Eb /N0 = (S/N) (B/R) S/N = (R/B) (Eb /N0) = 1 ¥ (Eb /N0) (S/N) dB = (E b /N0)dB For FSK and ASK, from Figure 5.4, (Eb /N0)dB = 13.5 dB (S/N) dB = 13.5 dB For PSK, from Figure 5.4, (Eb /N0)dB = 10.5 (S/N) dB = 10.5 dB For QPSK, the effective bandwidth is halved, so that (R/B) = 2 (R/B) dB = 3 (S/N) dB = 3 + 10.5 = 13.5 dB 5.15 For ASK, BT = (1 + r)R = (1.5)2400 = 3600 Hz -20- 21 For FSK, BT = 2 D F + (1 + r)R = 2(2.5 x 103 ) + (1.5)2400 = 8600 Hz 5.16 For multilevel signaling BT = [(1 + r)/log2 L]R For 2400 bps QPSK, log2 L = log2 4 = 2 BT = (2/2)2400 = 2400 Hz, which just fits the available bandwidth For 8-level 4800 bps signaling, log2 L = log2 8 = 3 BT = (2/3)(4800) = 3200 Hz, which exceeds the available bandwidth 5.17 As was mentioned in the text, analog signals in the voice band that represent digital data have more high frequency components than analog voice signals. These higher components cause the signal to change more rapidly over time. Hence, DM will suffer from a high level of slope overload noise. PCM, on the other hand, does not estimate changes in signals, but rather the absolute value of the signal, and is less affected than DM. 5.18 No. The demodulator portion of a modem expects to receive a very specific type of waveform (e.g., ASK) and would not produce meaningful output with voice input. Thus, it would not function as the coder portion of a codec. The case against using a codec in place of a modem is less easily explained, but the following intuitive argument is offered. If the decoder portion of a codec is used in place of the modulator portion of a modem, it must accept an arbitrary bit pattern, interpret groups of bits as a sample, and produce an analog output. Some very wide value swings are to be expected, resulting in a strange-looking waveform. Given the effects of noise and attenuation, the digital output produced at the receiving end by the coder portion of the codec will probably contain many errors. 5.19 From the text, (SNR)db = 6.02 n + 1.76, where n is the number of bits used for quantization. In this case, (SNR)db = 60.2 + 1.76 = 61.96 dB. 5.20 a. (SNR)db = 6.02 n + 1.76 = 30 dB n = (30 – 1.76)/6.02 = 4.69 Rounded off, n = 5 bits This yields 25 = 32 quantization levels b. R = 7000 samples/s ¥ 5 bits/sample = 35 Kbps 5.21 The maximum slope that can be generated by a DM system is d/T s = d fs where T s = period of sampling; fs = frequency of sampling Consider that the maximum frequency component of the signal is w(t) = A sin2pfa t The slope of this component is dw(t)/dt = A2 p f a cos2 p f a t and the maximum slope is A2 p fa . To avoid slope overload, we require that -21- 22 d fs > A2 p fa or d > 2pf a A fs Source: [COUC01] 5.22 a. A total of 28 quantization levels are possible, so the normalized step size is 2–8 = 0.003906. b. The actual step size, in volts, is: 0.003906 ¥ 10V = 0.03906V c. The maximum normalized quantized voltage is 1 – 2–8 = 0.9961. Thus the actual maximum quantized voltage is: 0.9961 ¥ 10V = 9.961V d. The normalized step size is 2–8. The maximum error that can occur is one-half the step size. Therefore, the normalized resolution is: + 1/2 ¥ 2 –8 = 0.001953 e. The actual resolution is + 0.001953 ¥ 10V = + 0.01953V f. The percentage resolution is + 0.001953 ¥ 100% = + 0.1953 % 5.23 slope overload distortions DM output 1 0 5.24 s(t) = A c cos[2pf ct + f(t)] = 10 cos [(108 )pt + 5 sin 2 p(10 3 )t] -22- 23 Therefore, f(t) = 5 sin 2p (103 )t, and the maximum phase deviation is 5 radians. For frequency deviation, recognize that the change in frequency is determined by the derivative of the phase: f'(t) = 5 (2p) (10 3 ) cos 2p(10 3 )t which yields a frequency deviation of Df = (1/2p )[ 5 (2p) (10 3 )] = 5 kHz 5.25 a. s(t) = A c cos[2pf ct + npm(t)] = 10 cos [2π(106 )t + 0.1 sin (103 )pt] Ac = 10; fc = 106 10 m(t) = 0.1 sin (103 )pt, so m(t) = 0.01 sin (10 3 )pt b. s(t) = A c cos[2pf ct + f(t)] = 10 cos [2π(106 )t + 0.1 sin (103 )pt] Ac = 10; fc = 106 f(t) = 0.1 sin (103 )pt, so f'(t) = 100p cos (10 3 )pt = nfm(t) = 10 m(t) Therefore m(t) = 10p cos (103 )pt 5.26 a. For AM, s(t) = [1 + m(t)] cos(2p fct) s1 (t) = [1 + m1 (t)] cos(2p fct); s2 (t) = [1 + m2 (t)] cos(2p fct) For the combined signal mc(t) = m1 (t) + m2 (t), sc(t) = [1 + m1 (t) + m2 (t)] cos(2p fct) = s1 (t) + s2 (t) – 1, which is a linear combination of s1 (t) and s2 (t). b. For PM, s(t) = A cos(2pfct + npm(t)) s1 (t) = A cos(2pfct + npm 1 (t)); s2 (t) = A cos(2pfct + npm 2 (t)) For the combined signal mc(t) = m1 (t) + m2 (t), sc(t) = A cos(2pfct + np[m 1 (t) + m2 (t)]), which is not a linear combination of s1 (t) and s2 (t). -23- 24 CHAPTER 6 DIGITAL DATA COMMUNICATION TECHNIQUES A N SWERS NSWERS TO Q UESTIONS 6.1 The beginning of a character is signaled by a start bit but with a value of binary zero. A stop (binary one) follows the character. 6.2 Asynchronous transmission requires an overhead of two or three bits per character, and is, therefore, significantly less efficient than synchronous transmission. 6.3 One possibility is to provide a separate clock line between transmitter and receiver. One side (transmitter or receiver) pulses the line regularly with one short pulse per bit time. The other side uses these regular pulses as a clock. An other alternative is to embed the clocking information in the data signal. For digital signals, this can be accomplished with Manchester or differential Manchester encoding. For analog signals, a number of techniques can be used; for example, the carrier frequency itself can be used to synchronize the receiver based on the phase of the carrier. 6.4 A check bit appended to an array of binary digits to make the sum of all the binary digits, including the check bit, always odd (odd parity) or always even (even parity). 6.5 An error detecting code in which the code is the remainder resulting from dividing the bits to be checked by a predetermined binary number. 6.6 The CRC has more bits and therefore provides more redundancy. That is, it provides more information that can be used to detect errors. 6.7 Modulo 2 arithmetic, polynomials, and digital logic. 6.8 It is possible. You could design a code in which all codewords are at least a distance of 3 from all other codewords, allowing all single-bit errors to be corrected. Suppose that some but not all codewords in this code are at least a distance of 5 from all other codewords. Then for those particular codewords, but not the others, a doublebit error could be corrected. 6.9 An (n, k) block code encodes k data bits into n-bit codewords. 6.10 Data circuit-terminating equipment (DCE) mediates between a user's data terminal equipment (DTE) and a network or transmission facility. A N SWERS NSWERS 6.1 TO PROBLEMS a. Each character has 25% overhead. For 10,000 characters, there are 20,000 extra bits. This would take an extra 20,000/2400 = 8.33 seconds. -24- 25 b. The file takes 10 frames or 480 additional bits. The transmission time for the additional bits is 480/2400 = 0.2 seconds. c. Ten times as many extra bits and ten times as long for both. d. The number of overhead bits would be the same, and the time would be decreased by a factor of 4 = 9600/2400. 6.2 For each case, compute the fraction g of transmitted bits that are data bits. Then the maximum effective data rate R is: R = gx, where x is the data rate on the line. a. There are 7 data bits, 1 start bit, 1.5 stop bits, and 1 parity bit g = 7/(1 + 7 + 1 + 1.5) = 7/10.5 = 0.67 R = 0.67 x b. Each frame contains 48 control bits + 128 information bits = 176 bits. The number of characters is 128/8 = 16, and the number of data bits is 16 ¥ 7 = 112. R = (112/176)B = 0.64x c. Each frame contains 48 + 1024 = 1072 bits. The number of characters is 1024/8 = 128, and the number of data bits is 128 ¥ 7 = 896. R = (896/1072)B = 0.84x 6.3 Use 1-bit START and STOP bits. Write down a few dozen characters. Choose a zero in the first characters as a START bit, count out eight bits, call the next bit STOP (even if it is a zero), look for the next zero, and call that the START bit of the next character. Since some 1's will intervene before you find that zero, you will have moved the starting point of the framing process. Eventually, you will achieve proper framing. 6.4 Not for asynchronous transmission. The stop bit is needed so that the start bit can be recognized as such. The start bit is the synchronization event, but it must be recognizable. The start bit is always a 0, and the stop bit is always a 1, which is also the idle state of the line. When a start bit occurs, it is guaranteed to be different from the current state of the line. 6.5 Let the bit duration be T. Then a frame is 12T long. Let a clock period be T'. The last bit (bit 12) is sampled at 11.5T'. For a fast running clock, the condition to satisfy is T 11. 5 11. 5T ¢ > 11T fi < = 1. 045 fi f clock < 1.045 f bit T¢ 11 For a slow running clock, the condition to satisfy is T 11. 5 11. 5T ¢ < 12T fi > = 0. 958 fi f clock > 0. 958 f bit T¢ 12 Therefore, the overall condition: 0.958 fbit < fclock <1.045 fbit 6.6 In worst case conditions, the two clocks will drift in opposite directions. The resultant accuracy is 2 minutes in 1 year or: 2/(60 ¥ 24 ¥ 365) = 0.0000038 The allowable error is 0.4 Therefore, number of bits is 0.4/0.0000038 = 105,000 bits 6.7 The inclusion of a parity bit extends the message length. There are more bits that can be in error since the parity bit is now included. The parity bit may be in error when there are no errors in the corresponding data bits. Therefore, the inclusion of -25- 26 a parity bit with each character would change the probability of receiving a correct message. 6.8 Any arithmetic scheme will work if applied in exactly the same way to the forward and reverse process. The modulo 2 scheme is easy to implement in circuitry. It also yields a remainder one bit smaller than binary arithmetic. 6.9 a. We have: Pr [single bit in error] = 10–3 Pr [single bit not in error] = 1 – 10–3 = 0.999 Pr [8 bits not in error] = (1 – 10–3)8 = (0.999)8 = 0.992 Pr [at least one error in frame] = 1 – (1 – 10–3)8 = 0.008 b. Pr [at least one error in frame] = 1 – (1 – 10–3)10 = 1 – (0.999)10 = 0.01 6.10 a. -26- 27 b. Shift 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 0 Shift Register 0000 0000 0001 0010 0100 1000 0001 0011 0110 1100 1001 0011 0110 1101 1011 0111 1110 CRC Input 0 1 0 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6.11 At the conclusion of the data transfer, just before the CRC pattern arrives, the shift register should contain the identical CRC result. Now, the bits of the incoming CRC are applied at point C4 (Figure 6.5). Each 1 bit will merge with a 1 bit (exclusive-or) to produce a 0; each 0 bit will merge with a 0 bit to produce a zero. -27- 28 6.12 6.13 a. C3 ⊕ C2 C1 C0 ⊕ Input b. Data = 1 0 0 1 1 0 1 1 1 0 0 M(X) = 1 + X3 + X4 + X6 + X7 + X8 X4 M(X) = X12 + X11 + X10 + X8 + X7 + X4 X 4 M (X) X2 12 11 10 8 7 = X +X +X +X +X + P (X ) P( X) R(X) = X2 T(X) = X4 M(X) + R(X) = X12 + X11 + X10 + X8 + X7 + X4 + X2 Code = 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 c. Code = 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 T (X ) yields a nonzero remainder P (X ) 6.14 a. Divide X10 + X7 + X4 + X3 + X + 1 by X4 + X + 1. The remainder is X3 + X2 . The CRC bits are 1100. The string 100100110111100 is sent. b. The string 000110110111100 is received, corresponding to X11 + X10 + X8 + X7 + X5 + X4 + X3 + X2 . The remainder after division by X4 + X + 1 is X3 + X2 + X , which is nonzero. The errors are detected. c. The string 000010110111100 is received, corresponding to X10 + X8 + X7 + X5 + -28- 29 X4 + X3 + X2 . The remainder after division by X4 + X + 1 is zero. The errors are not detected. 6.15 a. The multiplication of M(X) by X16 corresponds to shifting M(X) 16 places and thus providing the space for a 16-bit FCS. The addition of XkL(X) to X16M(X) inverts the first 16 bits of G(X) (one's complements). The addition of L(X) to R(X) inverts all of the bits of R(X). b. The HDLC standard provides the following explanation. The addition of XK L(X) corresponds to a value of all ones. This addition protects against the obliteration of leading flags, which may be non-detectable if the initial remainder is zero. The addition of L(X) to R(X) ensures that the received, errorfree message will result in a unique, non-zero remainder at the receiver. The non-zero remainder protects against the potential non-detectability of the obliteration of trailing flags. c. The implementation is the same as that shown in Solution 6.10b, with the following strategy. At both transmitter and receiver, the initial content of the register is preset to all ones. The final remainder, if there are no errors, will be 0001 1101 0000 1111. 6.16 a. 00000 10101 01010 00000 0 3 2 10101 2 0 5 01010 2 5 0 000000 010101 101010 110110 000000 0 3 3 4 b. 010101 3 0 6 6 101010 3 6 0 3 110110 4 6 3 0 6.17 a. p(v|w) = bd(w,v)(1 – b) (n – d(w,v) n- d Ê1- b ˆd p (v|w1 ) b d (1 - b ) b. If we write di = d(w i ,v), then = ˜ n -d = Á p( v| w2 ) b d (1 - b ) Ëb¯ 1 1 2 2 -d1 2 c. If 0 < b < 0.5, then (1 – b )/b > 1. Therefore, by the equation of part b, p(v|w1 )/p(v|w2 ) > 1 if an only if d1 < d2 . 6.18 Suppose that the minimum distance between codewords is at least 2t + 1. For a codeword w to be decoded as another codeword w', the received sequence must be at least as close to w' as to w. For this to happen, at least t + 1 bits of w must be in error. Therefore all errors involving t or fewer digits are correctable. -29- 30 . 6.19 DCE Calling EIA-232 (modem) DTE Network DCE EIA-232 (modem) CD on Number of called modem sent to calling modem CD on CC on Called DTE CC on Connection setup CE on CF on BB CF off CA on Carrier on CB on Data tones Carrier off Carrier on CB on BA CA off CB off CF off CA on Data tones Carrier off Carrier off CD off BA CA off CB off CF on BB CA off CB off CF off CD off CC off CC off Time 6.20 If a device asserts Request to Send, it will get back a Clear to Send and the other device will get a Carrier Detect. If a device asserts Data Terminal Ready, the other device is alerted with a Data Set Ready and a Ring Indicator. Data transmitted by one side is received by the other. In order to operate a synchronous data link without a modem, clock signals need to be supplied. The transmitter and Receive Timing leads are cross-connected for this purpose. 6.21 Circuit SD (Send Data) and Circuit RD (Receive Data) are disconnected or isolated from the remote DTE at the interface and connected to each other in the remote DCE. -30- 31 CHAPTER 7 DATA LINK CONTROL PROTOCOLS A N SWERS NSWERS TO Q UESTIONS 7.1 Frame synchronization: The beginning and end of each frame must be recognizable. Flow control: The sending station must not send frames at a rate faster than the receiving station can absorb them. Error control: Bit errors introduced by the transmission system should be corrected. Addressing: On a multipoint line, such as a local area network (LAN), the identity of the two stations involved in a transmission must be specified. Control and data on same link: The receiver must be able to distinguish control information from the data being transmitted. Link management: The initiation, maintenance, and termination of a sustained data exchange require a fair amount of coordination and cooperation among stations. Procedures for the management of this exchange are required. 7.2 The function performed by a receiving entity to limit the amount or rate of data that is sent by a transmitting entity. 7.3 A flow control protocol in which the sender transmits a block of data and then awaits an acknowledgment before transmitting the next block. 7.4 (1) The buffer size of the receiver may be limited. (2) The longer the transmission, the more likely that there will be an error, necessitating retransmission of the entire frame. With smaller frames, errors are detected sooner, and a smaller amount of data needs to be retransmitted. (3) On a shared medium, such as a LAN, it is usually desirable not to permit one station to occupy the medium for an extended period, thus causing long delays at the other sending stations. 7.5 A method of flow control in which a transmitting station may send numbered packets within a window of numbers. The window changes dynamically to allow additional packets to be sent. 7.6 The stop & wait approach requires acknowledgments after each frame. The sliding window flow control technique can send multiple frames before waiting for an acknowledgment. Efficiency can be greatly improved by allowing multiple frames to be in transit at the same time. 7.7 The inclusion of an acknowledgment to a previously received packet in an outgoing data packet. 7.8 Error control refers to mechanisms to detect and correct errors that occur in the transmission of frames. 7.9 Error detection; positive acknowledgment; retransmission after timeout; negative acknowledgment. -31- 32 7.10 A feature that automatically initiates a request for retransmission when an error in transmission is detected. 7.11 Stop-and-wait ARQ: Based on stop-and-wait flow control. A station retransmits on receipt of a duplicate acknowledgment or as a result of a timeout. Go-back-N ARQ: Based on sliding-window flow control. When an error is detected, the frame in question is retransmitted, as well as all subsequent frames that have been previously transmitted. Selective-reject ARQ. Based on sliding-window flow control. When an error is detected, only the frame in question is retransmitted. 7.12 Primary station: Responsible for controlling the operation of the link. Frames issued by the primary are called commands. Secondary station: Operates under the control of the primary station. Frames issued by a secondary are called responses. The primary maintains a separate logical link with each secondary station on the line. Combined station: Combines the features of primary and secondary. A combined station may issue both commands and responses. 7.13 Normal response mode (NRM): Used with an unbalanced configuration. The primary may initiate data transfer to a secondary, but a secondary may only transmit data in response to a command from the primary. Asynchronous balanced mode (ABM): Used with a balanced configuration. Either combined station may initiate transmission without receiving permission from the other combined station. Asynchronous response mode (ARM): Used with an unbalanced configuration. The secondary may initiate transmission without explicit permission of the primary. The primary still retains responsibility for the line, including initialization, error recovery, and logical disconnection. 7.14 The flag field delimits the beginning and end of a frame. 7.15 Data transparency refers to the ability to include arbitrary bit patterns in the data field of a frame without any pattern being confused with part of the control information in the frame. This is achieved by bit stuffing. 7.16 Information frames (I-frames) carry the data to be transmitted for the user (the logic above HDLC that is using HDLC). Additionally, flow and error control data, using the ARQ mechanism, are piggybacked on an information frame. Supervisory frames (S-frames) provide the ARQ mechanism when piggybacking is not used. Unnumbered frames (U-frames) provide supplemental link control functions. A N SWERS NSWERS 7.1 TO PROBLEMS a. Because only one frame can be sent at a time, and transmission must stop until an acknowledgment is received, there is little effect in increasing the size of the message if the frame size remains the same. All that this would affect is connect and disconnect time. b. Increasing the number of frames would decrease frame size (number of bits/frame). This would lower line efficiency, because the propagation time is unchanged but more acknowledgments would be needed. c. For a given message size, increasing the frame size decreases the number of frames. This is the reverse of (b). -32- 33 7.2 Let L be the number of bits in a frame. Then, using Equation 7.5 of Appendix 7A: a= Propagation Delay 20 ¥ 10-3 80 = = 3 Transmission Time L 4 ¥ 10 L ( ) Using Equation 7.4 of Appendix 7A: U= 1 1 = ≥ 0.5 1 + 2 a 1 + (160 L) L ≥ 160 Therefore, an efficiency of at least 50% requires a frame size of at least 160 bits. Propagation Delay 270 ¥ 10 -3 7.3 a = = = 270 LR 10 3 106 a. b. c. d. U = 1/(1 + 2a) = 1/541 = 0.002 Using Equation 7.6: U = W/(1 + 2a) = 7/541 = 0.013 U = 127/541 = 0.23 U = 255/541 = 0.47 7.4 A Æ B: B Æ C: Propagation time = 4000 ¥ 5 msec = 20 msec 1000 Transmission time per frame = = 10 msec 100 ¥ 103 Propagation time = 1000 ¥ 5 msec = 5 msec Transmission time per frame = x = 1000/R R = data rate between B and C (unknown) A can transmit three frames to B and then must wait for the acknowledgment of the first frame before transmitting additional frames. The first frame takes 10 msec to transmit; the last bit of the first frame arrives at B 20 msec after it was transmitted, and therefore 30 msec after the frame transmission began. It will take an additional 20 msec for B's acknowledgment to return to A. Thus, A can transmit 3 frames in 50 msec. B can transmit one frame to C at a time. It takes 5 + x msec for the frame to be received at C and an additional 5 msec for C's acknowledgment to return to A. Thus, B can transmit one frame every 10 + x msec, or 3 frames every 30 + 3x msec. Thus: 30 + 3x = 50 x = 6.66 msec R = 1000/x = 150 kbps 7.5 Round trip propagation delay of the link = 2 ¥ L ¥ t -33- 34 Time to transmit a frame = B/R To reach 100% utilization, the transmitter should be able to transmit frames continuously during a round trip propagation time. Thus, the total number of frames transmitted without an ACK is: È2 ¥ L ¥ t ˘ N=Í + 1˙ , Í BR ˙ where ÈX ˘ is the smallest integer greater than or equal to X This number can be accommodated by an M-bit sequence number with: M = È log2 (N )˘ 7.6 In fact, NAK is not needed at all, since the sender will time out if it fails to receive an ACK. The NAK improves efficiency by informing the sender of a bad frame as early as possible. 7.7 Assume a 2-bit sequence number: 1. Station A sends frames 0, 1, 2 to station B. 2. Station B receives all three frames and cumulatively acknowledges with RR 3. 3. Because of a noise burst, the RR 3 is lost. 4. A times out and retransmits frame 0. 5. B has already advanced its receive window to accept frames 3, 0, 1, 2. Thus it assumes that frame 3 has been lost and that this is a new frame 0, which it accepts. 7.8 Use the following formulas: a S&W GBN (7) 0.1 (1 – P)/1.2 (1–P)/(1+0.2P) GBN (127) (1–P)/(1+0.2P) SREJ (7) SREJ (127) 1–P 1–P 1. 10 100 (1 – P)/3 (1 – P)/21 (1 – P)/201 (1–P)/(1+2P) 7(1–P)/21(1+6P 7(1 – P)/201(1+6P) ) (1–P)/(1+2P) (1 – P)/(1+20P) 127(1–P)/201(1+126P ) 1–P 7(1 – P)/21 7(1 – P)/201 1–P 1–P 127(1 – P)/201 For a given value of a, the utilization values change very little as a function of P over a reasonable range (say 10-3 to 10-12). We have the following approximate values for P = 10-6: a Stop-and-wait GBN (7) GBN (127) SREJ (7) SREJ (127) 0.1 0.83 1.0 1.0 1.0 1.0 1.0 0.33 1.0 1.0 1.0 1.0 10 0.05 0.33 1.0 0.33 1.0 -34- 100 0.005 0.035 0.63 0.035 0.63 35 7.9 a. ••• 0 1 2 3 4 5 6 7 0 ••• ••• 0 1 2 3 4 5 6 7 0 ••• ••• 0 1 2 3 4 5 6 7 0 ••• b. c. 7.10 A lost SREJ frame can cause problems. The sender never knows that the frame was not received, unless the receiver times out and retransmits the SREJ. 7.11 From the standard: "A SREJ frame shall not be transmitted if an earlier REJ exception condition has not been cleared (To do so would request retransmission of a data frame that would be retransmitted by the REJ operation.)" In other words, since the REJ requires the station receiving the REJ to retransmit the rejected frame and all subsequent frames, it is redundant to perform a SREJ on a frame that is already scheduled for retransmission. Also from the standard: "Likewise, a REJ frame shall not be transmitted if one or more earlier SREJ exception conditions have not been cleared." The REJ frame indicates the acceptance of all frames prior to the frame rejected by the REJ frame. This would contradict the intent of the SREJ frame or frames. 7.12 Let t1 = time to transmit a single frame t1 = 1024 bits = 1. 024 m sec 106 bps The transmitting station can send 7 frames without an acknowledgment. From the beginning of the transmission of the first frame, the time to receive the acknowledgment of that frame is: t2 = 270 + t1 + 270 = 541.024 msec During the time t2 , 7 frames are sent. Data per frame = 1024 – 48 = 976 7 ¥ 976 bits Throughput = = 12. 6 kbps 541. 024 ¥ 10- 3 sec -35- 36 7.13 No, because the field is of known fixed length. 7.14 The following enhancements are possibilities: •Always transmit an integral number of octets •Include a length field •Do not use the same flag to close one frame and open another •Ignore any frame containing fewer than 32 bits •Ignore any frame ending in seven or more ones The length field is used to compare the number of octets received with the number transmitted. Any discrepancies result in discarding the frame. The last three enhancements allow the rejection of frames when the closing flag has been destroyed. 7.15 A problem with NRZ-L is its lack of synchronization capability: a long sequence of 1's or 0's yields a constant output voltage with no transitions. Bit-stuffing at least eliminates the possibility of a long string of 1's. 7.16 N(R) = 2. This is the number of the next frame that the secondary station expects to receive. 7.17 One example of such a scheme is the multilink procedure (MLP) defined as part of layer 2 of X.25. The same frame format as for LAPB is used, with one additional field: Flag Address Control MLC Packet FCS Flag The multilink control (MLC) field is a 16-bit field that contains a 12-bit sequence number that is unique across all links. The MLC and packet fields form a multilink protocol (MLP) frame. Once an MLP frame is constructed, it is assigned to a particular link and further encapsulated in a LAPB frame, as shown above. The LAPB control field includes, as usual, a sequence number unique to that link. The MLC field performs two functions. First, LAPB frames sent out over different links may arrive in a different order from that in which they were first constructed by the sending MLP. The destination MLP will buffer incoming frames and reorder them according to MLP sequence number. Second, if repeated attempts to transmit a frame over one link fails, the DTE or DCE will send the frame over one or more other links. The MLP sequence number is needed for duplicate detection in this case. -36- 37 7.18 The selective-reject approach would burden the server with the task of managing and maintaining large amounts of information about what has and has not been successfully transmitted to the clients; the go-back-N approach would be less of a burden on the server. -37- 38 CHAPTER 8 MULTIPLEXING A N SWERS NSWERS TO Q UESTIONS 8.1 Multiplexing is cost-effective because the higher the data rate, the more cost-effective the transmission facility. 8.2 Interference is avoided under frequency division multiplexing by the use of guard bands, which are unused portions of the frequency spectrum between subchannels. 8.3 Echo cancellation is a signal processing technique that allows transmission of digital signals in both directions on a single transmission line simultaneously. In essence, a transmitter must subtract the echo of its own transmission from the incoming signal to recover the signal sent by the other side. 8.4 Downstream: from the carrier’s central office to the customer’s site; upstream: from customer to carrier. 8.5 A synchronous time division multiplexer interleaves bits from each signal and takes turns transmitting bits from each of the signals in a round-robin fashion. 8.6 A statistical time division multiplexer is more efficient than a synchronous time division multiplexer because it allocates time slots dynamically on demand and does not dedicate channel capacity to inactive low speed lines. 8.7 The basic difference between North American and international TDM carrier standards is that the North American DS-1 carrier has 24 channels while the international standard is 30 channels. This explains the basic difference between the 1.544 Mbps North American standard and the 2.048 Mbps international standard. 8.8 As load increases, the buffer size and delay increase until the load approximates the capacity of the shared channel when both become infinite. A N SWERS NSWERS 8.1 TO PROBLEMS a. The available bandwidth is 3100 – 400 = 2700 Hz. A scheme such as depicted in Figure 8.4 can be used, with each of the four signals modulated onto a different 500-Hz portion of the available bandwidth. b. Each 500-Hz signal can be sampled at a rate of 1 kHz. If 4-bit samples are used, then each signal requires 4 kbps, for a total data rate of 16 kbps. This scheme will work only if the line can support a data rate of 16 kbps in a bandwidth of 2700 Hz. 8.2 In FDM, part of the channel is assigned to a source all of the time. In time-division multiplexing, all of the channel is assigned to the source for a fraction of the time. -38- 39 8.3 In many cases, the cost of the transmission medium is large compared to the cost of a single transmitter/receiver pair or a modulator/demodulator pair. If there is spare bandwidth, then the incremental cost of the transmission can be negligible. The new station pair is simply added to an unused subchannel. If there is no unused subchannel it may be possible to redivide the existing subchannels creating more subchannels with less bandwidth. If, on the other hand, a new pair causes a complete new line to be added, then the incremental cost is large indeed. 8.4 Although it seems logical to think of bits being separated as they come in and then switched unchanged onto the transmission channel, this is not necessarily the way it happens. What the multiplexer receives from attached stations are several bit streams from different sources. What the multiplexer sends over the multiplexed transmission line is a bit stream from the multiplexer. As long as the multiplexer sends what can be interpreted as a bit stream to the demultiplexer at the other end, the system will work. The multiplexer, for example, may use a self-clocking signal. The incoming stream may be, on the other hand, encoded in some other format. The multiplexer receives and understands the incoming bits and sends out its equivalent set of multiplexed bits. 8.5 The purpose of the start and stop bits is to delimit the data bits of a character in asynchronous transmission. In synchronous TDM, using character interleaving, the character is placed in a time slot that is one character wide. The character is delimited by the bounds of the time slot, which are defined by the synchronous transmission scheme. Thus, no further delimiters are needed. When the character arrives at its destination, the start and stop bits can be added back if the receiver requires these. 8.6 Synchronous TDM is a technique to divide the medium to which it is applied into time slots which are used by multiple inputs. TDM's focus is on the medium rather than the information which travels on the medium. Its services should be transparent to the user. It offers no flow or error control. These must be provided on an individual-channel basis by a link control protocol. 8.7 This bit carries must carry a repetitive bit pattern that enables the receiver to determine whether or not it has lost synchronization. The actual bit pattern is 01010101... If a receiver gets out of synchronization it can scan for this pattern and resynchronize. This pattern would be unlikely to occur in digital data. Analog sources cannot generate this pattern. It corresponds to a sine wave at 4,000 Hz and would be filtered out from a voice channel that is band limited. 8.8 There is one control bit per channel per six frames. Each frame lasts 125 µsec. Thus: Data Rate = 1/(6 ¥ 125 ¥ 10 -6) = 1.33 kbps 8.9 Assuming 4 kHz per voice signal, the required bandwidth for FDM is 24 ¥ 4 = 96 kHz. With PCM, each voice signal requires a data rate of 64 kbps, for a total data rate of 24 ¥ 64 = 1.536 Mbps. At 1 bps/Hz, this requires a bandwidth of 1.536 MHz. 8.10 The structure is that of Figure 8.8, with one analog signal and four digital signals. The 500-Hz analog signal is converted into a PAM signal at 1 kHz; with 4-bit encoding, this becomes a 4-kbps PCM digital bit stream. A simple multiplexing -39- 40 technique is to use a 260-bit frame, with 200 bits for the analog signal and 15 bits for each digital signal, transmitted at a rate of 5.2 kbps or 20 frames per second. Thus the PCM source transmits at (20 frames/sec) ¥ (200 bits/frame) = 4000 bps. Each digital source transmits at (20 frames/sec) ¥ (15 bits/frame) = 300 bps. 8.11 a. n = 7 + 1 + 1 + 2 = 11 bits/character b. Available capacity = 2400 ¥ 0.97 = 2328 bps If we use 20 terminals sending one character at a time in TDM plus a synchronization character, the total capacity used is: 21 ¥ 110 bps = 2310 bps available capacity c. One SYN character, followed by 20 11-bit terminal characters, followed by stuff bits. 8.12 The capacity of the T1 line is 1.544 Mbps. The available capacity is 1.544 ¥ 0.99 = 1.52856 Mbps = AC. a. AC/110 = 13,896 b. AC/300 = 5,095 c. AC/1200 = 1273 d. AC/9600 = 159 e. AC/64000 = 23 If the sources were active only 10% of the time, a statistical multiplexer could be used to boost the number of devices by a factor of about seven or eight in each case. This is a practical limit based on the performance characteristics of a statistical multiplexer. 8.13 Synchronous TDM: 9600 bps ¥ 10 = 96 kbps Statistical TDM: 9600 bps ¥ 10 ¥ 0.5/0.8 = 60 kbps 8.14 a. 4 ¥ 4.8 kbps 1011101 I1I 2I3 I4I5 I6I 1 ••• I6 ••• I1 ••• I 6 1011101 1 ¥ 9.6 kbps 7 bits 48 bits (8 groups of 6) 7 bits b. 7/(48 + 7) ¥ 100 = 12.7% c. (6 x 4.8 kbps) x ((48 + 7)/48) = 33 kbps = R0 d. If the receiver is on the framing pattern (no searching), the minimum reframe time is 12 frame times (the algorithm takes 12 frames to decide it is "in frame"). Frame time = Tf = (55 bits/frame)/(R0 seconds/bit) = 1.67 ms -40- 41 Minimum reframe time = 12Tf = 20 ms For maximum reframe time, the system is at the worst possible position, having just missed the framing pattern. Hence it must search the maximum number of bits (55) to find it. Each search takes 12Tf. Therefore, Maximum reframe time = 55(12Tf) = 1.1 s. Assuming the system is random, the reframing is equally to start on any bit position. Hence on the average it starts in the middle or halfway between the best and worst cases. Average reframe time = (1.1 + 0.02)/2 = 0.56 s 8.15 The four terminals could easily be multiplexed onto one voice grade line. Therefore, the channel cost will be only one-fourth, since one channel rather than four is now needed. The same reasoning applies to termination charges. The present solution requires eight low speed modems (four pairs of modems. The new solution requires two higher-speed modems and two multiplexers. The reliability of the multiplexed solution may be somewhat less. The new system does not have the redundancy of the old system. A failure anywhere except at the terminals will cause a complete loss of the system. 8.16 No. Each multiplexer also acts as a buffer. It can accept bits in asynchronous form, buffer them and transmit them in synchronous form, and vice versa. 8.17 Voice sampling rate = 2 ¥ 4 kHz = 8 kHz; Thus: 30 voices channels: 1 synchronous bit/channel: 1 synchronous bit/frame: 6 bits/sample 30 ¥ 8 ¥ 6 = 30 ¥ 8 = 1¥8= TOTAL 1440 kbps 240 kbps 8 kbps __________ 1688 kbps 8.18 a. Assume a continuous stream of STDM frames. Then: Bit rate for data portion of frame = L bits/second Frame rate in frames per second = (C bits/second)/(F bits/frame) Bit rate for overhead = (OH bits/frame) ¥ (C/F frames/second) Total data rate = C = L + ((C ¥ OH)/F) bits/second F = (C ¥ OH)/(C – L) bits If we fix the number of overhead bits (OH), we can vary the percent of overhead by varying F. -41- 42 b. 4 10 8 6 Frame length (bits) 4 2 3 10 8 6 OH = 120 4 2 OH = 80 2 10 8 OH = 40 6 4 0 2000 4000 6000 L(bps) 8000 c. 4 10 8 6 Frame length (bits) 4 2 3 10 8 6 4 2 C = 7200 bps 2 10 8 6 C = 9600 bps 4 0 1000 2000 3000 4000 L(bps) 5000 6000 7000 8.19 A field can be delimited by a count or by a delimiter that does not occur in the data. If a delimiter is used, bit or character-stuffing may be needed. -42- 43 CHAPTER 9 SPREAD SPECTRUM A N SWERS NSWERS TO Q UESTIONS 9.1 The bandwidth is wider after the signal has been encoded using spread spectrum. 9.2 (1) We can gain immunity from various kinds of noise and multipath distortion. (2) It can also be used for hiding and encrypting signals. Only a recipient who knows the spreading code can recover the encoded information. (3) Several users can independently use the same higher bandwidth with very little interference, using code division multiple access (CDMA). 9.3 With frequency hopping spread spectrum (FHSS), the signal is broadcast over a seemingly random series of radio frequencies, hopping from frequency to frequency at fixed intervals. A receiver, hopping between frequencies in synchronization with the transmitter, picks up the message. 9.4 Slow FHSS = multiple signal elements per hop; fast FHSS = multiple hops per signal element. 9.5 With direct sequence spread spectrum (DSSS), each bit in the original signal is represented by multiple bits in the transmitted signal, using a spreading code. 9.6 For an N-bit spreading code, the bit rate after spreading (usually called the chip rate) is N times the original bit rate. 9.7 CDMA allows multiple users to transmit over the same wireless channel using spread spectrum. Each user uses a different spreading code. The receiver picks out one signal by matching the spreading code. A N SWERS NSWERS TO PROBLEMS 9.1 a. We have C = B log2 (1 + SNR). For SNR = 0.1, C = 0.41 MHz; For SNR = 0.01, C = 3.9 MHz; for SNR = 0.001, C = 38.84 MHz. Thus, to achieve the desired SNR, the signal must be spread so that 56 KHz is carried in very large bandwidths. b. For 1 bps/Hz, the equation C = B log2 (1 + SNR) becomes log2 (1 + SNR) = 1. Solving for SNR, we have SNR = 1. Thus a far higher SNR is required without spread spectrum. 9.2 The total number of tones, or individual channels is: Ws /fd = (400 MHz)/(100 Hz) = 4 ¥ 106 . The minimum number of PN bits = Èlog 2 (4 ¥ 10 6 )˘ = 22 where Èx˘ indicates the smallest integer value not less than x. Source: [SKLA01] 9.3 Ws = 1000 fd ; Wd = 4 fd ; Using Equation 7.3 , G p = Ws /Wd = 250 = 24 dB -43- 44 9.4 a. Period of the PN sequence is 24 – 1 = 15 b. MFSK c. L = 2 d. M = 2L = 4 e. k = 3 f. slow FHSS g. 2k = 8 h. Time 0 1 2 3 4 5 Input data 0 1 1 1 1 1 Frequency f1 f3 f3 Time Input data Frequency 12 0 13 1 f1 14 1 15 1 f3 6 1 7 0 8 0 f2 16 1 9 0 f0 17 0 f2 18 1 10 1 11 0 f2 19 0 f2 Source: [HAYK01] 9.5 a. Period of the PN sequence is 24 – 1 = 15 b. MFSK c. L = 2 d. M = 2L = 4 e. k = 3 f. fast FHSS g. 2k = 8 h. Same as for Problem 9.4 9.6 a. This is from the example in Section 6.2. f1 = 75 kHz 000 f2 =125 kHz 001 f3 = 175 kHz 010 f4 = 225 kHz 011 f5 = 275 kHz 100 f6 = 325 kHz 101 f7 = 375 kHz 110 f8 = 425 kHz 111 b. We need three more sets of 8 frequencies. The second set can start at 475 kHz, with 8 frequencies separated by 50 kHz each. The third set can start at 875 kHz, and the fourth set at 1275 kHz. 9.7. a. C0 = 1110010; C1 = 0111001; C2 = 1011100; C3 = 0101110; C4 = 0010111; C5 = 1001011; C6 = 1100101 b. C1 output = –7; bit value = 0 c. C2 output = +9; bit value = 1 9.8 Let us start with an initial seed of 1. The first generator yields the sequence: 1, 6, 10, 8, 9, 2, 12, 7, 3, 5, 4, 11, 1, . . . The second generator yields the sequence: 1, 7, 10, 5, 9, 11, 12, 6, 3, 8, 4, 2, 1, . . . Because of the patterns evident in the second half of the latter sequence, most people would consider it to be less random than the first sequence. -44- 45 9.9 When m = 2k, the right-hand digits of Xn are much less random than the left-hand digits. See [KNUT98], page 13 for a discussion. 9.10 Many packages make use of a linear congruential generator with m = 2k. As discussed in the answer to Problem 9.9, this leads to results in which the right-hand digits are much less random than the left-hand digits. Now, if we use a linear congruential generator of the following form: Xn+1 = (aXn + c) mod m then it is easy to see that the scheme will generate all even integers, all odd integers, or will alternate between even and odd integers, depending on the choice for a and c. Often, a and c are chosen to create a sequence of alternating even and odd integers. This has a tremendous impact on the simulation used for calculating π. The simulation depends on counting the number of pairs of integers whose greatest common divisor is 1. With truly random integers, one-fourth of the pairs should consist of two even integers, which of course have a gcd greater than 1. This never occurs with sequences that alternate between even and odd integers. To get the correct value of π using Cesaro's method, the number of pairs with a gcd of 1 should be approximately 60.8%. When pairs are used where one number is odd and the other even, this percentage comes out too high, around 80%, thus leading to the too small value of π. For a further discussion, see Danilowicz, R. "Demonstrating the Dangers of Pseudo-Random Numbers," SIGCSE Bulletin, June 1989. -45- 46 CHAPTER 10 CIRCUIT SWITCHING AND PACKET SWITCHING A N SWERS NSWERS TO Q UESTIONS 10.1 It is advantageous to have more than one possible path through a network for each pair of stations to enhance reliability in case a particular path fails. 10.2 Subscribers: the devices that attach to the network, such as telephones and modems. Subscriber line: the link between the subscriber and the network. Exchanges: the switching centers in the network. Trunks: the branches between exchanges. Trunks carry multiple voice-frequency circuits using either FDM or synchronous TDM. 10.3 Telephone communications. 10.4 With inchannel signaling, the same channel is used to carry control signals as is used to carry the call to which the control signals relate. With common channel signaling, control signals are carried over paths completely independent of the voice channels. 10.5 (1) Line efficiency is greater, because a single node-to-node link can be dynamically shared by many packets over time. (2) A packet-switching network can perform data-rate conversion. Two stations of different data rates can exchange packets because each connects to its node at its proper data rate. (3) When traffic becomes heavy on a circuit-switching network, some calls are blocked; that is, the network refuses to accept additional connection requests until the load on the network decreases. On a packet-switching network, packets are still accepted, but delivery delay increases. (4) Priorities can be used. Thus, if a node has a number of packets queued for transmission, it can transmit the higher-priority packets first. These packets will therefore experience less delay than lower-priority packets. 10.6 In the datagram approach, each packet is treated independently, with no reference to packets that have gone before. In the virtual circuit approach, a preplanned route is established before any packets are sent. Once the route is established, all the packets between a pair of communicating parties follow this same route through the network. 10.7 There is a significant relationship between packet size and transmission time. As a smaller packet size is used, there is a more efficient "pipelining" effect, as shown in Figure 10.14. However, if the packet size becomes too small, then the transmission is less efficient, as shown in Figure 10.14d. 10.8 Transmission, processing, and queuing delays. 10.9 Frame relay is much simplified, compared to X.25. The major differences are that frame relay uses out-of-channel signaling while X.25 uses all in-channel control. In frame relay there is no "hop-by-hop" flow control or error control as there is in X.25. -46- 47 If a frame error is detected it is just dropped rather than being retransmitted. Similarly, on an end-to-end basis, there is no error control or flow control except what is provided by higher level protocols outside of frame relay. Finally, frame relay is a two level (physical and link) layer protocol and the multiplexing of logical channels takes place at Level 2 rather than in the Level 3 Packet Layer as in X.25. 10.10 Because frame relay is so much simpler than X.25, the processing to support switching can be reduced and higher data rates than for X.25, up to several megabits per second, can be supported. On the other hand, because of the lack of hop-by-hop flow control, the user of frame relay has fewer tools to manage network congestion. The effective use of frame relay also depends on the channels being relatively error free. For example, this is true for fiber optics, but probably not for most forms of broadcast, wireless transmission. A N SWERS NSWERS TO PROBLEMS 10.1 Each telephone makes 0.5 calls/hour at 6 minutes each. Thus a telephone occupies a circuit for 3 minutes per hour. Twenty telephones can share a circuit (although this 100% utilization implies long queuing delays). Since 10% of the calls are long distance, it takes 200 telephones to occupy a long distance (4 kHz) channel full time. The interoffice trunk has 106 /(4 ¥ 103 ) = 250 channels. With 200 telephones per channel, an end office can support 200 ¥ 250 = 50,000 telephones. Source: [TANE03] 10.2 SS7 could be implemented using circuit switching. This would have the merit of providing minimum delay between control points for the exchange of control information. However, the circuits would have to be set up, which takes time. Alternatively, the circuits could be permanently maintained, which consumes resources. 10.3 The argument ignores the overhead of the initial circuit setup and the circuit teardown. 10.4 a. Circuit Switching T = C 1 + C2 where C 1 = Call Setup Time C 2 = Message Delivery Time C 1 = S = 0.2 C 2 = Propagation Delay + Transmission Time = N ¥ D + L/B = 4 ¥ 0.001 + 3200/9600 = 0.337 T = 0.2 + 0.337 = 0.537 sec Datagram Packet Switching T = D1 + D 2 + D 3 + D 4 where D1 = Time to Transmit and Deliver all packets through first hop D2 = Time to Deliver last packet across second hop D3 = Time to Deliver last packet across third hop -47- 48 D4 = Time to Deliver last packet across forth hop There are P – H = 1024 – 16 = 1008 data bits per packet. A message of 3200 bits require four packets (3200 bits/1008 bits/packet = 3.17 packets which we round up to 4 packets). D1 = 4 ¥ t + p where t = transmission time for one packet p = propagation delay for one hop D1 = 4 ¥ (P/B) + D = 4 ¥ (1024/9600) + 0.001 = 0.428 D2 = D3 = D 4 = t + p = (P/B) + D = (1024/9600) + 0.001 = 0.108 T = 0.428 + 0.108 + 0.108 + 0.108 = 0.752 sec Virtual Circuit Packet Switching T = V1 + V2 where V1 = Call Setup Time V2 = Datagram Packet Switching Time T = S + 0.752 = 0.2 + 0.752 = 0.952 sec b. Circuit Switching vs. Diagram Packet Switching Tc = End-to-End Delay, Circuit Switching Tc = S + N ¥ D + L/B Td = End-to-End Delay, Datagram Packet Switching ÈL˘ Np = Number of packets = Í ÍP - H ˙ ˙ Td = D1 + (N – 1)D 2 D1 = Time to Transmit and Deliver all packets through first hop D2 = Time to Deliver last packet through a hop D1 = Np(P/B) + D D2 = P/B + D T = (Np + N – 1)(P/B) + N x D T = Td S + L/B = (Np + N – 1)(P/B) Circuit Switching vs. Virtual Circuit Packet Switching TV = End-to-End Delay, Virtual Circuit Packet Switching TV = S + Td TC = TV L/B = (Np + N – 1)(P/B) Datagram vs. Virtual Circuit Packet Switching Td = T V – S 10.5 From Problem 10.4, we have -48- 49 Td= (Np + N – 1)(P/B) + N ¥ D For maximum efficiency, we assume that Np = L/(P – H) is an integer. Also, it is assumed that D = 0. Thus Td = (L/(P – H) + N – 1)(P/B) To minimize as a function of P, take the derivative: 0 = dTd/(dP) 0 = (1/B)(L/(P – H) + N – 1) - (P/B)L/(P – H)2 0 = L(P – H) + (N – 1) (P – H)2 - LP 0 = –LH + (N – 1)(P – H)2 (P - H)2 = LH/(N – 1) LH P=H+ N-1 10.6 Yes. A large noise burst could create an undetected error in the packet. With an Nbit CRC, the probability of an undetected error is on the order of 2-N. If such an error occurs and alters a destination address field or virtual circuit identifier field, the packet would be misdelivered. 10.7 The layer 2 flow control mechanism regulates the total flow of data between DTE and DCE. Either can prevent the other from overwhelming it. The layer 3 flow control mechanism regulates the flow over a single virtual circuit. Thus, resources in either the DTE or DCE that are dedicated to a particular virtual circuit can be protected from overflow. 10.8 Yes. Errors are caught at the link level, but this only catches transmission errors. If a packet-switching node fails or corrupts a packet, the packet will not be delivered correctly. A higher-layer end-to-end protocol, such as TCP, must provide end-toend reliability, if desired. 10.9 On each end, a virtual circuit number is chosen from the pool of locally available numbers and has only local significance. Otherwise, there would have to be global management of numbers. Ttd + Ru = 2 + 2a 8 ¥ Ld where the variable a is the same one defined in Chapter 7. In essence, the upper part of the fraction is the length of the link in bits, and the lower part of the fraction is the length of a frame in bits. So the fraction tells you how many frames can be laid out on the link at one time. Multiplying by 2 gives you the round-trip length of the link. You want your sliding window to accommodate that number of frames so that you can continue to send frames until an acknowledgment is received. Adding 1 to that total takes care of rounding up to the next whole number of frames. Adding 2 instead of 1 is just an additional margin of safety. See Figure 7.11. 10.10 k = 2 + 2 ¥ -49- 50 CHAPTER 11 ASYNCHRONOUS TRANSFER MODE A N SWERS NSWERS TO Q UESTIONS 11.1 The most obvious feature of ATM compared to frame relay is that ATM makes use of a 53 byte fixed length cell while the frame in frame relay is much longer, and may vary in length, both in its header and its data fields. Additionally, error checking is only done on the header in ATM rather than on the whole cell or frame. Virtual channels of ATM that follow the same route through the network are bundled into paths. A similar mechanism is not used in frame relay. 11.2 ATM is even more streamlined than frame relay in its functionality, and can support data rates several orders of magnitude greater than frame relay. 11.3 A virtual channel is a logical connection similar to virtual circuit in X.25 or a logical channel in frame relay. In ATM, virtual channels which have the same endpoints can be grouped into virtual paths. All the circuits in virtual paths are switched together; this offers increased efficiency, architectural simplicity, and the ability to offer enhanced network services. 11.4 Simplified network architecture: Network transport functions can be separated into those related to an individual logical connection (virtual channel) and those related to a group of logical connections (virtual path). Increased network performance and reliability: The network deals with fewer, aggregated entities. Reduced processing and short connection setup time: Much of the work is done when the virtual path is set up. By reserving capacity on a virtual path connection in anticipation of later call arrivals, new virtual channel connections can be established by executing simple control functions at the endpoints of the virtual path connection; no call processing is required at transit nodes. Thus, the addition of new virtual channels to an existing virtual path involves minimal processing. Enhanced network services: The virtual path is used internal to the network but is also visible to the end user. Thus, the user may define closed user groups or closed networks of virtual channel bundles. 11.5 Quality of service: A user of a VCC is provided with a Quality of Service specified by parameters such as cell loss ratio (ratio of cells lost to cells transmitted) and cell delay variation. Switched and semipermanent virtual channel connections: A switched VCC is an on-demand connection, which requires a call control signaling for setup and tearing down. A semipermanent VCC is one that is of long duration and is set up by configuration or network management action. Cell sequence integrity: The sequence of transmitted cells within a VCC is preserved. Traffic parameter negotiation and usage monitoring: Traffic parameters can be negotiated between a user and the network for each VCC. The input of cells to the VCC is monitored by the network to ensure that the negotiated parameters are not violated. -50- 51 11.6 Same as for a VCC, plus: Virtual channel identifier restriction within a VPC: One or more virtual channel identifiers, or numbers, may not be available to the user of the VPC but may be reserved for network use. Examples include VCCs used for network management. 11.7 Generic flow control: used to assist the customer in controlling the flow of traffic for different qualities of service; virtual path identifier: constitutes a routing field for the network; virtual channel identifier: used for routing to and from the end user; payload type: indicates the type of information in the information field; cell loss priority bit: is used to provide guidance to the network in the event of congestion; header error control: used for both error control and synchronization. 11.8 Cell-based: No framing is imposed. The interface structure consists of a continuous stream of 53-octet cells. SDH-based: imposes a synchronous TDM structure on the ATM cell stream. 11.9 Constant bit rate: provides a fixed data rate that is continuously available during the connection lifetime, with a relatively tight upper bound on transfer delay. Realtime variable bit rate: intended for time-sensitive applications; that is, those requiring tightly constrained delay and delay variation. The principal difference between applications appropriate for rt-VBR and those appropriate for CBR is that rt-VBR applications transmit at a rate that varies with time.. Non-real-time variable bit rate: with this service, the end system specifies a peak cell rate, a sustainable or average cell rate, and a measure of how bursty or clumped the cells may be. With this information, the network can allocate resources to provide relatively low delay and minimal cell loss.. Available bit rate: designed to improve the service provided to bursty sources that would otherwise use UBR. An application using ABR specifies a peak cell rate (PCR) that it will use and a minimum cell rate (MCR) that it requires.. Unspecified bit rate: a best-effort service. Guaranteed frame rate: designed to optimize the handling of frame-based traffic. 11.10 Handling of transmission errors; segmentation and reassembly, to enable larger blocks of data to be carried in the information field of ATM cells; handling of lost and misinserted cell conditions; flow control and timing control. A N SWERS NSWERS TO -51- PROBLEMS 52 11.1 Controlling Æ controlled 0 0 0 0 NO_HALT, NULL 0000 Controlled Æ controlling Terminal is uncontrolled. Cell is assigned or on an uncontrolled ATM connection. 1000 HALT, NULL_A, NULL_B 0001 Terminal is controlled. Cell is unassigned or on an uncontrolled ATM connection. 0100 NO_HALT, SET_A, NULL_B 0101 1100 HALT, SET_A, NULL_B 0011 Terminal is controlled. Cell on a controlled ATM connection Group A. Terminal is controlled. Cell on a controlled ATM connection Group B. 0010 1010 0110 1110 NO_HALT, NULL_A, SET_B HALT, NULL_A, SET_B NO_HALT, SET_A, SET_B HALT, SET_A, SET_B All other values are ignored. 11.2 a. We reason as follows. A total of X octets are to be transmitted. This will require ÈX ˘ a total of Í ˙ cells. Each cell consists of (L + H) octets, where L is the number ÍL˙ of data field octets and H is the number of header octets. Thus N= X ÈX ˘ Í L ˙ (L + H ) Í˙ The efficiency is optimal for all values of X which are integer multiples of the cell information size. In the optimal case, the efficiency becomes N opt = X ÊXˆ Á ˜( L + H ) ËL¯ = L L+H For the case of ATM, with L = 48 and H = 5, we have Nopt = 0.91 † b. Assume that the entire X octets to be transmitted can fit into a single variablelength cell. Then N= X X + H + Hv -52- 53 c. Transmission efficiency N (variable) 1.0 Nopt 0.9 0.8 0.7 N (fixed) 0.6 0.5 0.4 0.3 0.2 0.1 X 0 48 96 144 192 240 N for fixed-sized cells has a sawtooth shape. For long messages, the optimal achievable efficiency is approached. It is only for very short cells that efficiency is rather low. For variable-length cells, efficiency can be quite high, approaching 100% for large X. However, it does not provide significant gains over fixed-length cells for most values of X. 11.3 a. As we have already seen in Problem 11.2: N= b. D = L L +H 8¥ L R -53- 54 c. Packetization delay (ms) Transmission efficiency 2 1.0 D64 N D32 0.9 4 0.8 8 0.7 16 0.6 8 16 32 64 128 Data field size of cell in octets A data field of 48 octets, which is what is used in ATM, seems to provide a reasonably good tradeoff between the requirements of low delay and high efficiency. Source: [PRYC96] 11.4 a. The transmission time for one cell through one switch is t = (53 ¥ 8)/(43 ¥ 106 ) = 9.86µs. b. The maximum time from when a typical video cell arrives at the first switch (and possibly waits) until it is finished being transmitted by the 5th and last one is 2 ¥ 5 ¥ 9.86µs = 98.6µs. c. The average time from the input of the first switch to clearing the fifth is (5 + 0.6 ¥ 5 ¥ 0.5) ¥ 9.86µs = 64.09µs. d. The transmission time is always incurred so the jitter is due only to the waiting for switches to clear. In the first case the maximum jitter is 49.3µs. In the second case the average jitter is 64.09 – 49.3 = 14.79µs. -54- 55 11.5 a. The reception of a valid BOM is required to enter reassembly mode, so any subsequent COM and EOM cells are rejected. Thus, the loss of a BOM results in the complete loss of the PDU. b. Incorrect SN progression between SAR-PDUs reveals the loss of a COM, except for the cases covered by (c) and (d) below. The result is that at least the first 40 octets of the AAL-SDU is correctly received, namely the BOM that originally began the reassembly, and any subsequent COMs up to the point where cell loss occurred. Data from the BOM through the last SAR-PDU received with a correct SN can be passed up to the AAL user as a partial CPCS-PDU. c. The SN wraps around so that there is no incorrect SN progression, but the loss of data is detected by the CPCS-PDU being undersized. In this case, only the BOM may be legitimately retrieved. d. The same answer as for (c). 11.6 a. If the BOM of the second block arrives before the EOM of the first block, then the partially reassembled first block must be released. The entire partially reassembled CPCS-PDU received to that point is considered valid and passed to the AAL user along with an error indication. This mechanism works when just the EOM is lost or when a cell burst knocks out some COMs followed by the EOM. b. This might be detected by the SN mechanism. If not, the loss will be detected when the Btag and Etag fields fail to match. The Length indication may fail to pick up this error if the cell bust loses as many cells as are added by concatenation the two CPCS-PDU fragments. In this case only the first BOM may be legitimately retrieved. 11.7 a. Single bit errors are not picked up until the CPCS-PDU CRC is calculated, and they result in the discarding of the entire CPCS-PDU. b. Loss of a cell with SDU=0 is detected by an incorrect CRC. If the CRC fails to catch the error, the Length field mismatch ensures that the CPCS-PDU is discarded. c. Loss of a cell with SDU=1 is detectable in three ways. First, the SAR-PDUs of the following CPCS-PDU may be appended to the first, resulting in a CRC error or Length mismatch being flagged when the second CPCS-PDU trailer arrives. Second, the AAL may enforce a length limit which, if exceeded while appending the second CPCS-PDU, can flag an error and cause the assembled data to be discarded. Third, a timer may be attached to the CPCS-PDU reassembly; if it expires before the CPCS-PDU is completely received, the assembled data is discarded. See [ARMI93] for a further discussion of the issues raised in problems 11.5 through 11.7. -55- ...
View Full Document

This note was uploaded on 09/10/2011 for the course EE 135 taught by Professor Dong during the Spring '11 term at NYU Poly.

Ask a homework question - tutors are online