You are on page 1of 13

Cairo University

Faculty of Engineering
Dept. of Electronics and Comm. Eng.

4th Year 2013-14


Final Exam
Jan. 2014

ELC 403A Computer 4(A)


(Computer Networks)
Answer ALL Questions

Time Allowed: 2 Hours

SOLUTION OF A QUESTION MAY BE CONTINUTED ON THE BACK OF THE SAME PAGE

Question #1 (16 points)

a) Circle the correct answer:


1. The NAT protocol:
2. Fragments reassembly takes place at:
i) translates host names to addresses
i) the source host
ii) translates LAN host addresses to
ii) the routers only
WAN-side address
iii) assigns addresses to hosts
iii) the routers and final destination
iv) translates between layers protocols
iv) the final destination only
b) Draw a schematic diagram showing the main parts of packet-based networks, e.g., the
Internet. Specify the function of each part.
c) Consider K users sharing a transmission link with 450 kbps bit rate. Each user
is active 5% of the time and generates traffic at 150 kbps bit rate, when active.
i. What is the maximum number of users that can share the link using circuit- switching?
ii. Assume 6 users are sharing the link using packet switching, what is the probability of
more than 3 users are actively using the link at the same time. Discuss the result in light of (i)
above.
answer:
i. #users = 450/150 = 3
ii. P(x>3) = 4C6*P^4*(1-P)^2 + 5C6*P^5*(1-P)^1 + 6C6*P^6
= 4C6*(.05)^4*(1-(.05))^2 + 5C6*(.05)^5*(1-(.05))^1 + 6C6*(.05)^6

Question #2 (24 points)

a) Circle the correct answer:


1. Statistical multiplexing means:
2. The DHCP protocol is used to:
i) on-demand bandwidth assignment
i) assign address blocks to ISPs
ii) dedicated resources
ii) translates IP addresses
iii) time division multiplexing
iii) assign address spaces to subnets
iv) guaranteed performance
iv) assign IP addresses to hosts
b) For packets of size L bits and a routers outgoing link with bit rate R bps, what is the
average queuing delay for the first K packets in the following cases (assume infinite buffer
size and the first packet finds an empty queue):
i. Periodic packet arrival process where one packet arrives per 2L/R sec.
ii. Periodic packet arrival process where one packet arrives per L/2R sec.
c) Suppose an organization is assigned a block of IP addresses 212.29.16.0/20:
i. What is the maximum number of hosts that can be supported by the organization?
ii. Partition the above address space among 12 departments showing the IP address block
allocated to each department as follows: Four large departments each can support up to 512
hosts and eight small departments each can support up to 256 hosts.

d) For the shown network:


i. If it is a VC network, assume there is an
ongoing session between H1 and H3 and a
session between H1 and H4. Write down the
forwarding table at router A, such that the
traffic for both sessions is forwarded through
interface 2.
ii. If it is a VC network, assume there are only two ongoing sessions between H2 and H4.
Write down the forwarding table at router D, such that the traffic for one session is forwarded
through interface 2 and for the other is forwarded through interface 4.
iii. If it is a datagram network with the forwarding table below at router A:
Destination Address Range
11101111 00010111 00010*** ********
11101111 00010111 00011000 ********
11101111 00010111 00011*** ********
Otherwise

Output Interface
1
2
3
4

To which output interfaces will datagrams with the following destination addresses be
directed?
1. Destination Address: 239.23.24.170 24(dec)=00011000(bin) => Output Interface 2
2. Destination Address: 239.23.22.161 22(dec)=00010110(bin) => Output Interface 1
3. Destination Address: 238.23.22.160 238(dec)=11101110(bin) => Output Interface 4

Question #3 (17 points)


a- (8 points) For the shown graph, find the shortest paths from
node 6 to all nodes using Dijkstras algorithm. Show all steps of
the algorithm.

10
2

3
2

2
3

b- (9 points) Comment briefly on the following statements


i) Host A is sending host B a large file over a TCP connection. Assume host B has no data to send A. Host B will
not send ACKs to host A because host B cannot piggyback the acknowledgements on data.

ii) Consider a receiver in a selective repeat protocol with 4-bits sequence number and window size 4. If the
receiver has rcvbase equal to 14 and receives a segment with sequence number 3, then it shall send ACK(3) to the
sender.

iii) In a network such as the Internet the shortest path between router A and router B is always the same as the
shortest
path
between
router
B
and
router
A
but
with
reversed
nodes
order.

Question #4 (19 points)


a- (10 points) Consider a TCP connection between hosts A and B using SR sliding window protocol with
window size W equal to 4. Each segment transmission time is equal to 1 msec, ACK transmission time is
negligible, one way propagation delay is equal to 1 msec, and timeout period equal to 9 msec (calculated from
instant transmitter starts segment transmission). The transmission starts with segment 0. Assume the first
transmissions of segments 2 and 5 are dropped and the ACK of the first transmission of segment 6 is lost.
When a segment previously transmitted is retransmitted, its timeout timer is reset. When the sender receives
two (2) duplicate ACKs, it does not wait for the timer to expire and starts retransmitting immediately.
i) Draw a diagram using the unfinished figure below showing the segment/ACK transmission occurring
between the sender and receiver during the interval [0, 20] msec. To ease the solution steps, you may also
show the available window sequence numbers at the sender whenever it changes due to receiving an
ACK.
ii) Find the total rate of transmissions in segments/sec between A &B in the specified interval.
iii) Find the effective rate of transmission which is equal to total number of segments sent by A and known to
be received at the receiver.
Time
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

SEG 0

b- (9 points) A sliding window protocol is used over a 100 Mbps path with RTT of 500 msec and the maximum
segment lifetime is 30 seconds.
i) How many bits should the advertised window field be?
assume 100% utilization
W = #pkt_in_window * #Bytes_in_pkt
RTT < W/(R/8)
W = R * RTT / 8 = 100*10^6*500*10^-3/8
#in advertised window = log2(W)

ii) How many bits should the sequence number field be?
seq. no. > no. of bytes sent during life time
seq. no. > Tout * R / 8
seq. no. bits = log2(Tout * R / 8) = log2(30*100*10^6/8)

iii) If for the above setup TCP is used and at some point, the EstimatedRTT is 600 msec and all
subsequent RTTs are equal to 700 and initial deviation is equal to 100, calculate the estimate of the
timeout interval after 2 samples are received. Take alpha = 0.125 and beta = 0.25.
EstimatedRTT = (1- )*EstimatedRTT + *SampleRTT
DevRTT = (1-)*DevRTT +*|SampleRTT-EstimatedRTT|
1)
EstimatedRTT(1) = (1- .125)*600 + .125*700
DevRTT(1) = (1-.25)*100 +.25*|700-600|
2)
EstimatedRTT(2) = (1- .125)*EstimatedRTT(1) + .125*700
DevRTT(2) = (1-.25)*DevRTT(1) +.25*|700-EstimatedRTT(1)|
TimeoutInterval = EstimatedRTT(2) + 4*DevRTT(2)

You might also like