Você está na página 1de 15

1

Department of Computer Science and Engineering




CSE 3213: Communication Networks (Fall 2010)

Instructor: N. Vlajic
Date: 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 are
allowed.

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

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







FIRST NAME: ___________________________

LAST NAME: ___________________________

STUDENT #: ___________________________

Question Points
1 / 15
2 / 10
3 / 10
4 / 15
5 / 15
6 / 15
7 / 8
8 / 12
Total / 100


2
1. Multiple Choice [15 points]


Circle the letter beside the choice that is the best answer for each question. For each
question 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 (P
1
and P
2

respectively). The attenuation of the channel is calculated to be 1 dB. This means:
(a) P
1
= 1 W
(b) P
1
= P
2

(c) P
1
> P
2

(d) P
1
< P
2



(1.3) Consider a noiseless channel with a bandwidth of 4 kHz. If we want to transmit 24
kbps 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 signal
using ASK and carrier frequency of 6 MHz, the bandwidth needed for effective transmission
of 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 full 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


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 per
frame time is given by the function F(X). Which of the following statements are correct about
the 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 a
transmission 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 frame
is ___________ 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

4
2. Potpourri [10 points]

2.1) [5 points]
Consider a circuit-switched network with an aggregate (core network) bandwidth of 10 Mbps
as show in the figure below. How many users can the network support simultaneously if half
of 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

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


6
3. Channel Capacity and PCM [10 points]

The analog waveform

( ) ( ) 4 2000t 20sin 3 1000t 10cos x(t) + + + =

is uniformly sampled for digital transmission.

3.1 [3 points] Determine the maximum allowable time interval between two
consecutive sample values that will ensure perfect reconstruction of the analogue
signal.

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 above
signal.

3.3 [5 points] The PCM data stream of (b) is transmitted through a noisy channel with
a 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: f
max
= 2000/2 or 1000/ Hz.
Applying Nyquist sampling theorem, minimum sampling rate = 2 1000/ = 2000/
samples/s. Hence, maximum sampling interval is T
sample
= /2000 = 1.571 ms.

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

(c) Using the Shannons channel capacity theorem,
SNR) (1 log B C
2
+ =
where C = 16000/ bits per second and SNR on a linear scale = 10
2
= 100.
Substituting the above values, we get
(101) log
16000
B or 100), (1 log B 16000/
2
2

= + = ,
which gives a value of B = 764.9138 Hz.


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 code
word. What is the number of invalid code words in case of such a scheme?

Solution:

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

Number of possible codewords = 2
7
= 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, containing
exactly 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
5. Flow Control [15 points]

5.1 [5 points]
Suppose you are required to use the Stop-and-Wait protocol for reliable communication over
a 100 Mbps channel with an end-to-end distance of 6000 km. Each packet sent by the
sender is 1000 bytes long. Assume that the speed of propagation is 3*10
5
km/sec and ignore
all other sources of delay other than the propagation delay. ACK packets have negligible
transmission 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 msec
roundtrip propagation delay. We want to transfer a file of size 13,500 bytes. Each packet has
a total size of 1625 bytes, including the 125 byte header, i.e. each packet contains 1500
bytes of data. When there is data to be transmitted, each packet contains the maximum
number of bytes. ACK packets are 125 bytes long and there is a processing delay of 1 msec
after a packet is fully received at the receiver until the transmission of the corresponding
ACK is started.

Assume that we used Selective Repeat protocol of window size N=4 for transmission of this
file. Assume that every 6
th
packet crossing the forward channel is lost while ACKs are not
lost or corrupted. Assume that the processing delay at the sender after an ACK is received is
negligible.

How much time is required to complete the transfer of the whole file and receive the final
ACk at the sender? Assume the timeout for each packet is set to 50 msec, starting from the
end of the transmission of the packet.
0.2% 0.002
2,004
4
4
2,000
1
1
8 * 1000
0 100,000,00
0 300,000,00
6,000,000
2
1
1
n
R t 2
1
1
f
prop
SW
= =
+
=

+
=

+
=

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.


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 as
possible.

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

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



11
6.2) [5 points]
Why is it necessary to pad an Ethernet frame to 64 bytes? Explain in no more than 3-4
sentences.

Solution:

To allow stations in the collision domain to transmit long enough in order to detect
a 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



12
7. Bridges [8 points]

Consider the network of learning bridges shown in the following figure. Assume each bridge
initially knows nothing about the network, show the forwarding table of the bridges after the
following transmissions:
a) B sends to C
b) D sends to B
c) E sends to F

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


Solution:



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 the
network, 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, before
fragmentation, 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 are
for 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.


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.

15

Você também pode gostar