Comp 346/488: Telecom Midterm guide solutions Dordal, March 2005 ======================================================================= Here are solutions to some of the book exercises on the study guide. Numbering is 7th_edition/6th_edition, with each number in the form chapter.exercise. As of March 18 all that is missing are the diagrams. 2.4/2.1 The idea is for the first general to resend a messenger if an answer hasn't been received in a reasonable amount of time; this represents *timeout and retransmission*. Three-way handshakes don't help here! In a military situation there may be time constraints forcing a very small value of timeout, in which case you are basically sending several messengers in parallel, but that is another issue. 2.7/2.7 (a) No; there is no reason for the layer-N header to be replicated in each (N-1)-layer fragment. The fragments will each need an address, of course, but that will be an essential component of the (N-1)-layer header. (b) For consolidation, it is very difficult to consolidate the N-layer headers because it is hard to guarantee that the N-layer packets have any specific relation to one another. If the packets are not related, then each will need to keep its own header. 3/12/3.10 You are adding 25% more bandwidth. Thus, you can either increase the number of vertical lines by 25%, or increase the number of pixels horizontally by 25%. 3/16/3.14 (a) 1200 (b) 600 #levels = 2^(#bits) = M; log_2(M) = #bits 4.2/4.2 output noise = 0.0045 mw; output signal = 5 mw (input signal = 500 mw, reduced 100-fold, ie by 20dB). SNR - 0.0045 / 5; taking logs, we get 30.5dB 4.4/4.4 Grounding the outer conductor provides electrical shielding. 5.7/5.7 Manchester: 0 = transition from high to low. Note that the last half-cycle of a previous bit interval is shown. The data is 1 1 1 0 0 1 1 0 1 0 However, there is no reason to have provided the last half-cycle of the previous bit unless *differential* manchester was being used (which is what is normally thought of as "Manchester"); if the question was about differential manchester, the answer would be 0 0 0 1 0 1 0 1 1 1. 5.8/5.8 Diagram 7.1/7.1 Line utilization is the fraction of time the sending station spends actually sending, versus waiting for the ACK. If transmit_time is the time it takes to send a packet (ie bandwidth time), and prop_time is the ROUND TRIP propagation delay, this is transmit_time / (transmit_time + prop_time) Since bandwidth is fixed, transmit depends only on the frame size. (a). Frame size is unchanged, so there is no significant utilization change (b). frame size DECREASES, so the utilization goes down (b). frame size increases, and so does utilization 7.3/7.3 We have 1 frame per ms, with a 270 msdelay. The book does not make clear whether that 270ms includes the 1ms needed to send a frame, or doesn't. I will assume the former. (a) 1/270 (b) 127/270 (c) 255/270 7.9/7.17 Diagrams as indicated. Note that there are no packet losses, so the ARQ mechanism does not matter. For (c), A has sent 0,1,2,3,4,5, B has sent ACKs 0, 1, 2, 3, and just sent ACK 4 8.7/8.7 The receiving station monitors this frame bit position to be sure that, over a series of several frames, a specified pattern is seen. T1 uses a pattern of 12 bits, so 12 frames must be observed. According to Stallings, p 254, a typical bit pattern is 101010101010. 8.10/8.10 Diagram. You won't have to produce diagrams like this on the test, but you should understand what Figure 8.8 means. 10.1/9.2 Phones are used on average 24 minutes out of each 8-hour day, or 5% of the time. So, 20 phones means that on average one is used at a time. 10% of the calls are long distance, so for every 200 phones, we need one long-distance channel (10% of 200 is 20). The text is unclear about how many channels there are. If you assume one voice channel is 4mHz, and that channels can be packed tightly together, then there are 1mHz/4kHz = 250 channels and we can support 200*250 = 50,000 phones. If you assume that the trunk handles 1mbps, and each phone needs 64kbps (normal T-carrier numbers), then the trunk can handle 1mbit/64kbit = 16 channels, for a total of 16*200 = 3200 phones. 10.3/10.1 For circuit switching, idle time still uses the circuit. For packet switching, idle time costs nothing. 10.4/10.2 Circuit-switching: delay = S + ND + L/B = 537 ms packet switching There are three whole packets, each with 1008 bytes of data, 1024 bytes total, and one final packet of 176 bytes data / 192 bytes total. One whole packet takes 1024/B bandwidth delay, or 125 ms. There are *six* such delays: on link one we have three, and then one additional such delay for each of the three subsequent links. This is a total of 750 ms. We also have the 192-byte packet; this takes 20ms. We count *one* such delay, as this packet traverses the final link; whenever this packet is on an earlier link there is also a whole packet on the next link and the whole-packet time was counted previously. We thus have 770ms total bandwidth delay. We now add 4 ms of propagation delay (D*N) to get a grand total of: 774 ms virtual-circuit delay: We add the setup time of 200 ms to the above, yielding 974 ms. ======================================================================= ======================================================================= Solutions to my additional problems ======================================================================= ======================================================================= > 1. Give a possible explanation for transmission distortion that is based on > Fourier analysis. This one is pretty vague. The idea is that: * every signal can be represented as a sum of sine waves * distortion for sine waves is usually easier to analyze For example, in many cases sine waves aren't "distorted" at all, but different frequencies are attenuated by different amounts. The net effect for non-sine waves may indeed be distortion, as the overall shape is changed as the differently attenuated sine waves are reassembled. ======== > 2. Why is digital data often encoded via an analog signal? Having an analog "carrier" often improves reliability over long distances. ======== > 3. Give some advantages of microwaves versus land lines, for long-distance > transmission. * Microwaves may be cheaper. The cost of stringing wire is significant. * Any kind of cable is subject to exponential attenuation: if the signal is reduced by 1/2 in one distance unit, then it is reduced by 1/2^n in n distance units. Attenuation of wireless transmission is, in the long run, subject to much less attenuation due to the inverse-square law: if the signal is reduced by 1/2 in one distance unit then it is reduced by 1/2n^2 in n units, and as n gets large this means *much* less strength reduction. ======== > 4. List some disadvantages with NRZ encoding for long lines (>= 10 km). > Which, if any, are addressed by NRZI? > Which, if any, are not an issue for shorter lines? The problems with NRZ encoding are: * long runs of 1's or 0's are hard to keep count of * There is a significant DC component, and if that gets lost the signal is lost * the receiver must receive and recognize a specific voltage. NRZI can reliably send long strings of 0's (assuming 0 = transition), but still loses count sending 1's. By switching to transitions rather than absolute voltage levels, NRZI also fixes the third problem. For shorter lines, the last two issues are not significant; they become significant, however, for long lines. ======== > 5. Suppose we take a 4-kHz voice signal and digitize it to a 56kbps signal. > (a). What frequency bandwidth is needed to transmit this using binary signaling, > so the signaling rate is also 56kbps? > (b). What bandwidth is needed if we use 16-level signaling? How many bits can > be sent in a single signal element? 56kbps = 2B logM. For (a), logM = 1, and so B = 28 kHz. For (b), M=16 and logM = 4; each signal element encodes 4 bits. We have 28 kHz = B * 4, or B = 7 kHz. ======== > 6. Consider the following sequence of virtual-circuit routers, and tables. > > D > | > link3 > | > [1] > A------link1-------[0]-B-[1]------link2---------[0]-C-[2]-----link4------E > vc vc port vc vc port > in out out in out out > 3 5 1 5 4 2 > 4 2 1 2 3 1 > List the VC used on each link as A sends to D 4 2 3 A-------B-------C-------D > List the VC used on each link as A sends to E 3 5 4 A-------B-------C-------E ======== > 7. Why are virtual circuits called that? That is, why are they like circuits, > and why is the adjective "virtual" there? Circuits can be defined as ways to send a stream of bits at a specified bandwidth. Virtual circuits provide this capability. However, they do entail some delay due to the need to wait for a packet to fill with data before it can be sent; while this delay is often small if the packet size is small, it is usually much larger than the corresponding circuit delay.