Download Midterm Exam

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Internet protocol suite wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

I²C wikipedia , lookup

IEEE 802.11 wikipedia , lookup

Serial port wikipedia , lookup

IEEE 1355 wikipedia , lookup

CAN bus wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
College of Computer and Information Sciences
Department of Computer Engineering
CEN444 – Computer Networks
Final Exam – Second Semester 1434/1435
Student Name
ID
Time Allowed: 3.0 Hours. – Closed Book, Closed Notes.
Problem
1
2
3
4
5
6
7
8
Total
Score
Score/Points
10
10
10
10
10
10
10
10
80
40
Problem 1 (10 points)
1. (5 pts) An image is 1920 x 1280 pixels with 4 bytes/pixel. Assume the image is
uncompressed. How long does it take to transmit it over a 4-Mbps modem channel?
The total amount of bits to send = 1920 × 1280 × 4 × 8 = 78643200 bits.
78643200
Time to transmit = 4×106 = 19.6608 sec.
2. (5 pts) If an airplane can carry a box of 100 hard drives. These hard drives each
contain 500 gigabytes. The airplane can travel at 1800 km/hour. For what range of
distances does the airplane have a higher data rate than a transmission line whose data
rate is 625 Gbps?
The airplane can carry 100 × 500 = 50000 gigabytes, or 50000 × 8 = 400000
gigabits.
1800
A speed of 1800 km/hour = 60×60 = 0.5 km/sec.
𝑥
The time to travel distance 𝑥 km is 0.5 = 2𝑥 sec.
Data rate = data size / travel time = 400000/2𝑥 Gbps = 200000/𝑥 Gbps.
200000
Data rate higher than 625 Gbps means 200000/𝑥 > 625, i.e. 𝑥 < 625 = 320 km.
Thus, at x < 320 km, the airplane has a higher rate than the communication line.
Page 1 of 9
Problem 2 (10 points)
1. (5 pts) If the received codeword using Hamming code is: 01 11 10 10 11 00 10.
Find which bit is in error.
Received codeword =
0 1 1 1 1 0 1 0 1 1 0 0 1 0
1
2
3
4
5
6
7
8
9
10 11 12 13 14
Received check bits 0110.
Calculated check bits 1111.
Error syndrome 0110 xor 1111 =
1001.
Bit 9 is in error.
Correct string is:
0111 1010 0100 10
Data bits
Pos Value
3
1
5
1
6
0
7
1
9
1
10
1
11
0
12
0
13
1
14
0
Rec
Calc
Syn
Check bits
1
2
x
x
x
x
x
x
x
x
x
x
x
0
1
1
x
1
1
0
4
8
x
x
x
x
x
x
1
1
0
x
x
x
x
x
x
0
1
1
2. (5 pts) Suppose that data is transmitted in blocks of sizes 1500 bits. What is the
maximum error rate under which error detection and retransmission mechanism (1
parity bit per block) is better than using Hamming code? Assume that bit errors are
independent of one another and no bit error occurs during retransmission.
.
From Eq. (3-1), 1500 + 𝑟 + 1 ≤ 2𝑟 , minimum 𝑟 = 11
Hamming code requires 11 check bits for each block.
Total bits transmitted per block is 1511 bits.
Let 𝑥 = error rate per bit.
Total bits transmitted per block is 1501 + 1500𝑥 × 1501 bits.
Find the maximum value of 𝑥 that makes 1501 + 1500𝑥 × 1501 < 1511.
Solving for 𝑥 we get: 𝑥 < 4.44 × 10−6 .
Page 2 of 9
Problem 3 (10 points)
1. (5 pts) A channel has a bit rate of 32 kbps and a propagation delay of 270 msec. For
what range of frame sizes does stop-and-wait give an efficiency of at least 40%?
𝑤
Link utilization ≤ 1+2𝐵𝐷,
2𝐵𝐷 = 2 ×
For stop-and-wait, 𝑤 = 1
𝑤
link utilization ≤ 1+2𝐵𝐷.
We want 0.4 ≤
1
1+
17280
frame size
32 × 270
17280
=
frame size frame size
17280
17280
. i.e. 2.5 ≥ 1 + frame size , 1.5 ≥ frame size
Frame size ≥ 11520 bits
2. (5 pts) Frames of 4000 bits are sent over a 4-Mbps channel using a geostationary
satellite which is 36000 km away. Signal speed is the speed of light. Using go-back-N
protocol, how many bits should the sequence numbers be to allow 100% link
utilization?
𝑤
=1
1 + 2𝐵𝐷
36000 km
𝐵 = 4 × 106 bps, 𝐷 = 300000 km/sec = 0.12 sec
𝑤 = 2𝐵𝐷 + 1 = 2 ×
4×106 ×0.12
4000
+ 1 = 241 frames.
For go-back-N, if there are MAX_SEQ + 1 distinct sequence numbers, up to
MAX_SEQ frames can be outstanding.
For 𝑤 = 241 frames, we need at least distinct 242 sequence numbers.
Number of bits required is ⌈log 2 242⌉ = 8 bits.
Page 3 of 9
Problem 4 (10 points)
Choose the best answer.
1.
Bluetooth is an example of
(a) Personal Area Network
(c) Metropolitan Area Network
Answer
a
(b) Local Area Network
(d) Wide Area Network
2.
A _ is a set of rules governing the format and meaning of the
packets, or messages that are exchanged by the peer entities within
a layer.
(a) model
(b) interface
(c) protocol
(d) service
c
3.
The __ layer of the OSI model is missing from the TCP/IP model:
(a) application
(b) session
(c) transport
(c) internet
b
4.
The __ service primitive blocks waiting for an incoming message.
(a) LISTEN
(b) CONNECT
(c) ACCEPT
(d) RECEIVE
d
5.
Using bit stuffing, if the original data is 80 bytes, all of them are the
flag pattern (01111110). The size of the frame after stuffing will be:
(a) 100 bytes
(b) 160 bytes
(c) 90 bytes
(d) 180 bytes
c
6.
The minimum Hamming distance between the codewords:
000000, 000011, 001100, 001111 is
(a) 1
(b) 2
(c) 3
(d) 4
b
7.
Better protection against burst errors can be provided by computing
the parity bits over the data in a different order than the order in
which the data bits are transmitted. This is called __.
(a) pipelining
(b) piggybacking
(c) jamming
(d) interleaving
d
8.
In sliding window protocols, the lower edge of sender’s window is
advanced when:
(a) packet arrives from network layer (b) transmission timer goes
off
(c) acknowledgement comes in
(d) frame is discarded
c
9.
In __, a bad frame received is discarded, but any good frames
received after it are accepted and buffered.
(a) utopia
(b) selective repeat
(c) go-back-n
(d) stop-and-wait
b
10. Physical layer protocol most commonly used over the wide-area
optical links that make up the backbone of communications
networks.
(a) SONET
(b) SLIP
(c) PPP
(d) HDLC
a
Page 4 of 9
Problem 5 (10 points)
1. (5 pts) Consider the arrangement of learning bridges shown in the figure below.
Assuming all are initially empty, give the forwarding tables for each of the bridges B1
to B4 after the following transmissions:
a. A sends to C.
b. C sends to A.
c. D sends to C.
Identify ports with the unique neighbor reached directly from that port; that is, the ports
for B1 are to be labeled “A” and “B2.”
Solution:
B1
address port
A
A
C
B2
B2
address port
A
B1
C
B3
D
B4
B3
address port
A
B2
C
C
D
B2
B4
address port
A
B2
D
D
Page 5 of 9
2. (5 pts) Compute the frame arrival rate, 𝜆 in terms of frames/sec if the mean time
delay, 𝑇 = 3 msec, to send a frame onto a channel of capacity 𝐶 = 200 Mbps. If the
channel is busy when a frame arrives, it waits its turn in an M/M/1 queue. Assume that
frames vary in length with an average length of 1/𝜇 = 8,000 bits.
Solution:
1
𝑇 = Cμ−λ
⇒ 3 × 10−3 =
1
1
200 × 106 × 8000 − λ
1
1
⇒ 200 × 106 ×
−λ=
8000
3 × 10−3
1
1
⇒ 200 × 106 ×
−
=λ
8000 3 × 10−3
⇒ λ = 24666.67 frames / sec
Page 6 of 9
Problem 6 (10 points)
1. (5 pts) Why dynamic channel allocation is needed rather than just having static
channel allocation?
Solution:
In static allocation the channel is divided into 𝑁 equal-sized portions.
It has the following problems:
1- For few users (<𝑁): large piece of valuable spectrum will be wasted.
2- For more users (>𝑁): some will be denied permission, even if some of the users
who are assigned a frequency band hardly ever transmit or receive anything.
Even if number of users is (𝑁), dividing single channel into a number of static subchannels is inherently inefficient.
2. (5 pts) A large population of ALOHA users manages to generate 10 requests/sec,
including both originals and retransmissions. Time is slotted in units of 10 msec. What
is the expected number of transmission attempts needed?
Solution:
With G = 0.1, the expected number of transmissions is e0.1 = 1.1052.
Page 7 of 9
Problem 7 (10 points)
1. What is the maximum cable length of a contention slot = 110µs in CSMA/CD for
signal propagation speed = 82% of the speed in vacuum?
Solution:
2τ = 110 × 10-6 sec
τ = 55 × 10-6 sec
propagation speed = 0.82 × 3 × 108 m
max cable length = 55 × 10-6 sec × 0.82 × 3 × 108 m = 13530m
2. (5 pts) In the below figure any two adjacent nodes are within their transmission
ranges. Let’s assume that MACA is being used. A transmits an RTS to B and B is
transmitting a CTS back. At the same time when B is transmitting, D sends an RTS to
C. Would this cause a problem? Explain your answer.
Solution:
There will be collision at C hence will not be aware of both D's RTS and B's CTS. If D
sends another RTS, C can reply back by CTS because C is not aware of A to B
transmission. As a result of this, it will be collision at B between C's CTS and A's data
transmission to B. As a result, failed transmission from A to B.
Page 8 of 9
Problem 8 (10 points)
1. (5 pts) In which layer do each of the following devices work:
Repeaters, Hubs, Bridges, Switches, and Routers.
Solution:
Repeaters : physical layer
Hubs: physical layer
Bridges : datalink layer
Switches : datalink layer
Routers : network layer
2. (5 pts) Briefly describe the difference between store-and-forward and cut-through
switches.
Solution:
Store-and-forward switches store entire frames before forwarding them. After a
frame comes in, checksum can be verified. If the frame is damaged, it is
discarded immediately.
In cut-through switching, it is possible to start forwarding as soon as the
destination header field has come in, before the rest of the frame has arrived.
This design reduces latency and the number of frames that bridge must buffer. It
is usually handled in hardware.
Page 9 of 9