fall 2007 midterm solutions

Upload: zhennan-wang

Post on 14-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Fall 2007 Midterm Solutions

    1/7

    ECSE 414 Intro to Telecom Networks Fall 2008

    Midterm 2008 Solutions

    Question 1 [30 marks]

    a) One advantage of a layered architecture is that it allows for modularity: different layerscan be implemented in a number of ways so that, for example, we can have both wirelessand wireline link-layer protocols (802.11 and Ethernet) operating on the same networktransparently.

    Another advantage is that, because of this modularity, it is possible to easily upgrade ormodify the protocol at one layer in the stack without affecting protocols at other layers,as long as the same services are offered in the upgrade.

    Finally, in general, layered architectures are a natural way of building complex, scalablesystems by applying the divide and conquer principle. Each layer only needs to focuson solving one subproblem in the overall challenge of building a large-scale networked

    system.

    b) From the top down: application layer, transport layer, network layer, link layer, physicallayer.

    c) In circuit switching, resources are reserved between the source and destination before anydata is ever transferred. This is typically done via Time Division Multiplexing (TDM) orFrequency Division Multiplexing (FDM). Because resources are reserved, circuit switchingguarantees a minimum quality of service. In packet switched networks, resources are notreserved. Instead, packet switching employs statistical multiplexing, allocating resources tousers on demand, on a packet-by-packet basis. Consequently, packet switching does not offerperformance guarantees.

    d) Flow control throttles the rate at which the sender transmits based on the size of the receiversavailable buffer. Thus, flow control ensures the sender doesnt overwhelm the receiver. Con-gestion control throttles the senders rate based on the amount of congestion in the network(loss and delay). Thus, congestion control ensures the sender doesnt overwhelm the networksavailable resources.

    e) Any time a host needs to query the DNS to get the IP address for a particular domain,it contacts its local name server, and then the local name server either replies directly (ifit has the mapping cached) or queries the rest of the DNS system to find the mapping.

    The authoritative name server is responsible for informing the rest of the world aboutmappings for its local domain. For example, the mcgill.ca authoritative name server

    maintains the latest mappings and responds to requests for any domain name ending inmcgill.ca (e.g., www.ece.mcgill.ca).

    Top-level domain name servers maintain a list of authoritative name servers for eachdomain within their specific suffix (e.g., the .com top-level server keeps a list of au-thoritative name servers for each domain name ending in .com).

    1

  • 7/29/2019 Fall 2007 Midterm Solutions

    2/7

    f) The bandwidth-delay product is equal to the bandwidth (or rate) of an end-to-end connectionmultiplied by the round-trip-time delay of the connection. Its units are bits (bits-per-second seconds = bits), and it corresponds to the maximum number of bits that are on the wirefor that connection at any given instant. Equivalently, its the amount of data in the pipe.

    g) Intuitively, Stop-and-Wait only sends one packet at a time, and waits for an acknowledgement

    for that packet before transmitting the next packet in sequence. As the bandwidth-delayproduct increases, that means the maximum number of bits that could be sent at any giveninstant is increasing, however, the number of bits Stop-and-Wait is transmitting remainsconstant (only one packets worth). Consequently, as the bandwidth-delay product increases,the connection sits idle for a larger fraction of time. Stop-and-Wait waits for a reply when itcould be transmitting more packets.

    More precisely, recall the expression for the efficiency of Stop-and-Wait (Lecture 7, slide 25):

    0 =1

    nheadernseg

    1 +nacknseg

    +2(tprop+tproc)R

    nseg

    .

    The bandwidth-delay product, 2(tprop+tproc)R, appears in the denominator of the expression,from which it is clear that increasing the bandwidth-delay product decreases efficiency.

    h) Stop-and-Wait needs exactly one bit because it only allows one packet to be in flight at anygiven instant in time. With only one packet in flight, there are three congestion scenariosthat could arise: (i) the data packet could be dropped on the way from the sender to receiver;(ii) the ACK could be dropped on the way from the receiver back to the sender; (iii) bothdata and ACK packets could be transmitted successfully, but the timer could expire beforethe ACK arrives at the sender.

    We need at least one bit to handle cases (ii) and (iii). Suppose packet 0 is successfullyreceived, but ACK0 is dropped. The receiver will be expecting packet 1 but the sender will

    retransmit packet 0 when its timer expires. Thus, we need one bit so that the receiver knowsit is receiving a duplicate instance of packet 0.

    We do not need more than one bit because there is only ever one packet in flight, so either thereceiver receives the packet it is expecting (the next in sequence), or it receives a duplicate ofthe one it previously received in sequence. The sender does not advance to the next packet,so two sequence bits for ACKs are sufficient for similar reasoning.

    i) Multimedia applications are loss-tolerant: for example, in a streaming audio application,if one data packet is lost it will only temporarily degrade the playback quality.

    Multimedia applications are also rate sensitive: In a streaming multimedia application,if packets do not arrive within an acceptable period of time (because they are lost orheavily delayed), then there is no point in retransmitting them because they will arriveafter the time when that data was needed to construct the playback signal (audio orvideo).

    For streaming applications over TCP, retransmitting packets when they are droppedor heavily delayed also delays the transmission of future packets (assuming a selectivebuffering scheme is not being used), and thus further degrades the overall quality ofplayback.

    2

  • 7/29/2019 Fall 2007 Midterm Solutions

    3/7

    j) The UDP checksum cannot detect pairs of bit-errors that affect the same bit-location in twodifferent words. For example, suppose we are applying the UDP checksum to 8-bit words. Ifwe transmit the 11110000 10101010 and receive 10110000 11101010, the UDP checksum willnot properly detect that there was an error in transmission.

    k) Additive-Increase-Subtractive-Decrease (AISD) congestion control does not guarantee fair-

    ness. For example, suppose two connections share a link such that congestion is detectedwhen the sum of their two windows exceeds 10. If one connection starts with W1 = 5 and theother connection starts with W2 = 3, then they will oscillate between (W1, W2) = (5, 3) and(6, 4), and the first connection will always get a larger share of bandwidth. In the W1-W2plane, AISD only moves the operating point parallel to the fair diagonal line. On the otherhand, AIMD always moves the operating point towards the fair diagonal line.

    l) Since di = 10Mbps for all i = 1, . . . , N , dmin = 10Mbps. We also know that us = 1Mbps.Thus, us < dmin. Inverting the inequality gives 1/us > 1/dmin, and therefore

    Fus

    > Fdmin

    .

    Next, observe that since us = ui, we haveNF

    us+P

    N

    i=1ui

    = NF(N+1)us