3213 Final Fall2010 Solutions

Embed Size (px)

Citation preview

  • 8/12/2019 3213 Final Fall2010 Solutions

    1/15

    1

    Department of Computer Science and Engineering

    CSE 3213: Communication Networks (Fall 2010)

    Instructor: N. VlajicDate: Dec 21, 2010

    Final Examination

    Instructions:

    Examination time: 180 min.

    Print your name and CS student number in the space provided below.

    This examination is closed book and closed notes. Calculator and one-sided cheat-sheet areallowed.

    There are 8 questions. The points for each question are given in square brackets, next to thequestion title. The overall maximum score is 100.

    Answer each question in the space provided. If you need to continue an answer onto the lastpage, clearly indicate that and label the continuation with the question number.

    FIRST NAME: ___________________________

    LAST NAME: ___________________________

    STUDENT #: ___________________________

    Question Points

    1 / 15

    2 / 10

    3 / 104 / 15

    5 / 15

    6 / 15

    7 / 8

    8 / 12

    Total / 100

  • 8/12/2019 3213 Final Fall2010 Solutions

    2/15

    2

    1. Multiple Choice [15 points] Circle the letter beside the choice that is the best answer for each question. For eachquestion choose only ONE answer.

    (1.1) According to OSI model, packet re-sequencing is a main function of the____________ layer.

    (a) Physical(b) Data Link(c) Network(d) Transportation

    (1.2) A signal power is measured at the input and output of an observed channel (P1 and P2respectively). The attenuation of the channel is calculated to be 1 dB. This means:

    (a) P1= 1 W(b) P1 = P2(c) P1> P2(d) P1< P2

    (1.3) Consider a noiseless channel with a bandwidth of 4 kHz. If we want to transmit 24kbps on this channel, the minimum number of signal levels we need is:

    (a) 4(b) 6(c) 8

    (d) 12

    (1.4) We have a digital signal with effective bandwidth of 4 kHz. If we modulate the signalusing ASK and carrier frequency of 6 MHz, the bandwidth needed for effective transmissionof this signal would be:

    (a) 2 kHz(b) 8 kHz(c) 6 MHz(d) 12 MHz

    (1.5) In digital transmission, if the receiver clock is 0.02% slower than the sender clock,then:

    (a) In every 10000 bits, two ful l bits are lost(b) In every 10000 bits, two full extra bits are received(c) In every 100 bits, two full bits are lost(d) In every 100 bits, two full extra bits are received

  • 8/12/2019 3213 Final Fall2010 Solutions

    3/15

    3

    (1.6) Pulse Code Modulation (PCM) is a form of:

    (a) analog to digital conversion(b) analog to analog conversion(c) digital to analog conversion(d) digital to digital conversion

    (1.7) The expected throughput of a pure Aloha network at the offered load of X packets perframe time is given by the function F(X). Which of the following statements are correct aboutthe throughput of this network?

    (a) F(1) > F(0.5)(b) F(1) < F(0.5)(c) F(0.5) = 0.38(d) none of the above

    (1.8) Looking at a token-ring network with a token-holding time (THT) of 10 msec and atransmission rate of 10 Mbps, what is the longest frame size (bits)?

    (a) 1,000(b) 25,000(c) 100,000(d) 200,000

    (1.9) The minimum length of the data payload that can be transmitted in an Ethernet frameis ___________ bytes.

    (a) 46(b) 56(c) 64(d) none of the above

    (1.10) IP computes a checksum only over the header of an IP packet.(a) True(b) False

  • 8/12/2019 3213 Final Fall2010 Solutions

    4/15

    4

    2. Potpourri [10 points]2.1) [5 points]

    Consider a circuit-switched network with an aggregate (core network) bandwidth of 10 Mbpsas show in the figure below. How many users can the network support simultaneously if halfof the users want 50 kbps and half of them want 450 kbps?

    Solution:

    10 Mbps is the aggregate bandwidth that needs to be shared.

    Let x be number of users that want 10 kbps. Then:

    x*50 kbps + x*450 kbps = 10 Mbps

    solving for x, we get: X = 10,000 kbps / 500 kbps = 20

    So, the total number of users is 40.

    10 Mbps

  • 8/12/2019 3213 Final Fall2010 Solutions

    5/15

    5

    2.2) [5 points]In Delta Modulation (DM), discuss individual pros and cons of using:

    a) small step size (),b) small sampling time (T).

    Solution:

    Small advantage: more accurate estimation of slow-changing signals

    Small disadvantage: underestimation of fast(er)-changing signals

    Small T advantage: more accurate estimation of signals, if combined

    with appropriate step size

    Small T disadvantage: more samples higher bit rate

  • 8/12/2019 3213 Final Fall2010 Solutions

    6/15

    6

    3. Channel Capacity and PCM [10 points] The analog waveform

    ( ) ( )42000t20sin31000t10cosx(t) +++=

    is uniformly sampled for digital transmission.

    3.1 [3 points] Determine the maximum allowable time interval between twoconsecutive sample values that will ensure perfect reconstruction of the analoguesignal.

    3.2 [2 points] If 8 bits are used to quantize each sample values obtained in (a),determine the data rate in bits per second of the PCM stream produced by the abovesignal.

    3.3 [5 points] The PCM data stream of (b) is transmitted through a noisy channel witha SNR of 20 dB. Determine the minimum bandwidth of the channel to ensure an

    arbitrarily small probability of transmission errors.

    Solution:

    (a) Maximum frequency present in x(t) is: fmax= 2000/2 or 1000/ Hz.Applying Nyquist sampling theorem, minimum sampling rate = 2 1000/ = 2000/samples/s. Hence, maximum sampling interval is Tsample= /2000 = 1.571 ms.

    (b) Using the sampling rate of 2000/ samples/s with 8 bits/sample, the data rateof the PCM stream is given by RPCM = 8 2000/ = 16000/ = 5095.5 bits persecond.

    (c) Using the Shannons channel capacity theorem,

    SNR)(1logBC 2 +=

    where C= 16000/ bits per second and SNR on a linear scale = 102= 100.Substituting the above values, we get

    (101)log

    16000Bor100),(1logB16000/

    2

    2

    =+= ,

    which gives a value of B= 764.9138 Hz.

  • 8/12/2019 3213 Final Fall2010 Solutions

    7/15

    7

    4. Error Control [15 points]

    4.1) [4 points]

    Suppose an error correction scheme that encodes each 3 bit data block into a 7 bit codeword. What is the number of invalid code words in case of such a scheme?

    Solution:

    Number of possible codes (3-bit combinations) = 23= 8

    Number of possible codewords = 27= 128

    Hence, the number of invalid words is: 128 8 = 120

    4.2) [8 points]

    The three-out-of-seven code consists of all possible binary words of length 7, containingexactly three 1s. What is the minimum Hamming distance between such code words?

    Solution:

    Let a and b be two distinct code words. If the number of positions where the

    three 1s overlap is 0, for example, a = 1 1 1 0 0 0 0 and b =0000111, then the

    Hamming distance is d(a, b)=6.

    If the number of positions where the three 1s overlap is 1, for example, a = 1 1

    1 0 0 0 0 and b =0011100, then the Hamming distance is d(a, b)=4.

    If the number of positions where the three 1s overlap is 2, for example, a = 1 1

    1 0 0 0 0 and b =0111000, then the Hamming distance is d(a, b)=2.

    Since these are the only three possibilities, then the minimum Hamming distance

    between any two code words in the three-out-of-seven code is 2.

    4.3) [3 points]

    How many errors can three-out-of-seven code correct?

    Solution:

    Since the minimum Hamming distance between any two code words is 2, this code

    can detect up to one error, but cannot correct any errors

  • 8/12/2019 3213 Final Fall2010 Solutions

    8/15

    8

    5. Flow Control [15 points]

    5.1 [5 points]

    Suppose you are required to use the Stop-and-Wait protocol for reliable communication overa 100 Mbps channel with an end-to-end distance of 6000 km. Each packet sent by thesender is 1000 bytes long. Assume that the speed of propagation is 3*105km/sec and ignore

    all other sources of delay other than the propagation delay. ACK packets have negligibletransmission time. What is the utilization of such a channel?

    Solution:

    5.2 [10 points]

    Consider a 1 Mbps channel with a 20 msec one-way propagation delay, i.e. 40 msecroundtrip propagation delay. We want to transfer a file of size 13,500 bytes. Each packet hasa total size of 1625 bytes, including the 125 byte header, i.e. each packet contains 1500bytes of data. When there is data to be transmitted, each packet contains the maximumnumber of bytes. ACK packets are 125 bytes long and there is a processing delay of 1 msecafter a packet is fully received at the receiver until the transmission of the corresponding

    ACK is started.

    Assume that we used Selective Repeatprotocol of window size N=4 for transmission of thisfile. Assume that every 6thpacket crossing the forward channel is lost while ACKs are notlost or corrupted. Assume that the processing delay at the sender after an ACK is received isnegligible.

    How much time is required to complete the transfer of the whole file and receive the finalACk at the sender? Assume the timeout for each packet is set to 50 msec, starting from theend of the transmission of the packet.

    0.2%0.0022,004

    4

    4

    2,0001

    1

    8*1000

    0100,000,000300,000,00

    6,000,0002

    1

    1

    n

    Rt21

    1

    f

    propSW ==

    +

    =

    +

    =

    +

    =

  • 8/12/2019 3213 Final Fall2010 Solutions

    9/15

    9

    Solution:

    Number of segments = ceiling [13,500 / 1,500] = 9

    Packet transmission time = 1625*8 bits / 1 Mbps = 13 msec

    ACK transmission time = 125*8 bits / 1 Mbps = 1 msec

    Timeout = 50 msec

    Transfer is completed in 186 msec.

    Average data transfer rate: 13,500 * 8 bits / 186 msec = 580.6 kbps.

  • 8/12/2019 3213 Final Fall2010 Solutions

    10/15

    10

    6. Ethernet [15 points]

    6.1) [10 points]

    Suppose an Ethernet-type of network that utilizes the following MAC protocol:

    (Note, in step 6, a node randomly selects to back of for either 1, 2 or 3 full slots.Transmissions in the middle of a slot are not permitted.)

    There are three nodes in the link, and each node attempts to send as many packets aspossible.

    What is the probability of a packet being transmitted eventually (as opposed to beingdropped)?

    Solution:

    Since all three nodes attempt to send their packets at the same time, the first

    attempt is always failed due to collision.

    On the second attempt, the nodes randomly pick a number from {1,2,3}. For a

    packet to be sent without collision, there are two possible cases:

    a) a node selects 1, and others select 2 or 3;

    b) a node selects 2, and other select 3.

    According to the algorithm, if the second attempt fails, the packet is dropped.

    Hence, the probability of successful transmission is calculated as:

    P(case A) + P(case B) =

    = 1/3 * (2/3)2 + 1/3 * (1/3)2 = 4/27 + 1/27 = 5/27 = 0.185

  • 8/12/2019 3213 Final Fall2010 Solutions

    11/15

    11

    6.2) [5 points]

    Why is it necessary to pad an Ethernet frame to 64 bytes? Explain in no more than 3-4sentences.

    Solution:

    To allow stations in the collision domain to transmit long enough in order to detecta collision. Namely, to detect a collision, a station must be in the position to be

    sending its own and receiving the interfering signal (i.e. compare the two)

    concurrently.

    In the worst case collision scenario (A and B are at two ends of a network. B

    starts transmitting just a moment before As packet arrives to B), a packet

    transmission time must be equal to the networks roundtrip delay.

    In real world Ethernet networks, this time translates to 64 byte frame size.

    Hence, all Ethernet packets have to be padded to (i.e. extended to) this size

  • 8/12/2019 3213 Final Fall2010 Solutions

    12/15

    12

    7. Bridges [8 points]

    Consider the network of learning bridges shown in the following figure. Assume each bridgeinitially knows nothing about the network, show the forwarding table of the bridges after thefollowing transmissions:

    a) B sends to Cb) D sends to Bc) E sends to F

    For each of these questions (i.e. after each transmissions) give a table for each bridge, eachwith two columns: destination and interface number.

    Solution:

  • 8/12/2019 3213 Final Fall2010 Solutions

    13/15

    13

    8. IP Protocol [12 points]

    8.1 [4 points]

    IP includes an option for Record Route in which, as a packet is forwarded through thenetwork, each router records its identity in a list.Given the constraints imposed by the design of the IP header, what is the largest number of

    router addresses that such an option can record?

    Solution:

    (Max IP header length Mandatory IP header length) = 40 bytes.

    Hence, there are 40 bytes available to any, including this, option.

    First 3-4 bytes of the options are reserved for the option header, leaving us with

    36 bytes available for the option payload router recording in this case.

    As each (router) address occupies 4 bytes, the overall number of addresses that

    can be recorded is 36 / 4 = 9.

    8.3 [8 points]

    An IP packet, with Strict Route option occupying 20 (additional) bytes of its header, is to be

    sent across a link with MTU = 320. Some of the fields of this packets header, beforefragmentation, are given below.

    Total Length= 1000; Identification = 998; Fragmentation Offset = 0; Flags= 0 0 0.

    c.1) How many fragments will be created altogether?

    c.2) Show what the fields Total Length, Identification, Fragmentation Offset, and Flags arefor each created fragment.

    Solution:

    Due to the use of Strict Route option, the size of the IP header in this case for

    the original packet and all subsequently created fragments is 40 byts.

  • 8/12/2019 3213 Final Fall2010 Solutions

    14/15

    14

    The original packet has a total length 1000 bytes, which comprises 20+20=40

    bytes header and 960 bytes payload.

    Now, each new MTU (i.e. fragment) can accommodate 320 bytes total, or 280

    bytes payload. This implies that, in order to sent 960 bytes of the original

    payload, we need 4 fragments.

    Fragment 1:

    Total Length = 320; Identification = 998;

    Fragmentation Offset = 0;

    Flags = 0 0 1.

    Fragment 2:

    Total Length = 320; Identification = 998;

    Fragmentation Offset = 280/8 = 35; Flags = 0 0 1.

    Fragment 3:

    Total Length = 320; Identification = 998;

    Fragmentation Offset = 560/8 = 70; Flags = 0 0 1.

    Fragment 4:

    Total Length = 120 + 40 = 160; Identification = 998;

    Fragmentation Offset = 840/8 = 105;

    Flags = 0 0 0.

  • 8/12/2019 3213 Final Fall2010 Solutions

    15/15