Download - Assignment - GUC
Faculty of Information Engineering & Technology
The Networks Department
Course: Communication Networks [NETW501] Dr. –Ing. Maggie Mashaly
Eng. Mariham Wasfy
Eng. Yomna Atef
Assignment Deadline Sunday 24/05/2020 at 11:59 PM
(Please submit a PDF file including your clear answers)
Name : ___________________________________________________________________
ID : ___________________________________________________________________
Group : ___________________________________________________________________
Part 1: Answer the Following Questions:
1. The performance of a client-server system is influenced by two network factors: the
bandwidth of the network (how many bits/sec it can transport) and the latency (how many
seconds it takes for the first bit to get from the client to the server). Give an example of a
network that exhibits high bandwidth and high latency. Then give an example of one with
low bandwidth and low latency.
2. A factor in the delay of a store-and-forward packet-switching system is how long it takes to
store and forward a packet through a switch. If switching time is 10 μsec, is this likely to be
a major factor in the response of a client-server system where the client is in New York and
the server is in California? Assume the propagation speed in copper and fiber to be 2/3 the
speed of light in vacuum.
3. If the unit exchanged at the data link level is called a frame and the unit exchanged at the
network level is called a packet, do frames encapsulate packets or do packets encapsulate
frames? Explain your answer.
4. A bit string, 0111101111101111110, needs to be transmitted at the data link layer. What is
the string actually transmitted after bit stuffing?
5. Consider the delay of pure ALOHA versus slotted ALOHA at low load. Which one is less?
Explain your answer.
6. Two networks each provide reliable connection-oriented service. One of them offers a reliable
byte stream and the other offers a reliable message stream. Are these identical? If so, why is
the distinction made? If not, give an example of how they differ.
7. An image is 1024 x 768 pixels with 3 bytes/pixel. Assume the image is uncompressed. How
long does it take to transmit it over a 56-kbps modem channel? Over a 1-Mbps cable modem?
Over a 10-Mbps Ethernet? Over 100-Mbps Ethernet?
8. Data link protocols almost always put the CRC in a trailer rather than in a header. Why?
9. Consider the interconnected LANs shown in figure below. Assume that hosts a and b are on
LAN 1, c is on LAN 2, and d is on LAN 8. Initially, hash tables in all bridges are empty and
the spanning tree shown in Figure (b) is used. Show how the hash tables of different bridges
change after each of the following events happen in sequence, first (a) then (b) and so on.
i. (a) a sends to d.
ii. (b) c sends to a.
iii. (c) d sends to c.
iv. (d) d moves to LAN 6.
v. (e) d sends to a.
10. One consequence of using a spanning tree to forward frames in an extended LAN is that some
bridges may not participate at all in forwarding frames. Identify three such bridges in the
previous question. Is there any reason for keeping these bridges, even though they are not used
for forwarding?
11. In some networks, the data link layer handles transmission errors by requesting damaged
frames to be retransmitted. If the probability of a frame’s being damaged is p, what is the mean
number of transmissions required to send a frame? Assume that acknowledgements are never
lost.
12. Suppose that x bits of user data are to be transmitted over a k-hop path in a packet-switched
network as a series of packets, each containing p data bits and h header bits, with x >>p + h.
The bit rate of the lines is b bps and the propagation delay is negligible. What value of p
minimizes the total delay?
13. Compare the delay in sending an x-bit message over a k-hop path in a circuit-switched network
and in a (lightly loaded) packet-switched network. The circuit setup time is s sec, the
propagation delay is d sec per hop, the packet size is p bits, and the data rate is b bps. Under
what conditions does the packet network have a lower delay?
14. Two CSMA/CD stations are each trying to transmit long (multiframe) files. After each frame
is sent, they contend for the channel, using the binary exponential backoff algorithm. What is
the probability that the contention ends on round k, and what is the mean number of rounds per
contention period?
15. Consider the subnet of figure below. Distance vector routing is used, and the following vectors
have just come in to router C: from B: (5, 0, 8, 12, 6, 2); from D: (16, 12, 6,0, 9, 10); and from
E: (7, 6, 3, 9, 0, 4). The measured delays to B, D, and E, are 6, 3,and 5, respectively. What is
C's new routing table? Give both the outgoing line to use and the expected delay.
A
time 0 t/2 t 3t/2 2t 5t/2 3t 7t/2 4t 9t/2 5t 11t/2 6t
B
C
D
Central Station
Part 2: Answer the Following Problems:
Topic 1: Static and Dynamic MAC a) Consider the network shown below where terminals A, B, C, and D are communicating over a bus
with a central station. The transmission time for all packets is t units.
A B C D
t t t
Central Station 1.5t
i. Provided that terminals A, B, C, and D start their transmissions at tA = 2.25t, tB = 0.5t, t c=
2t and tD = 0 respectively. Assuming that A, C implement 1- persistent CSMA/CD and B, D
implement Non-persistent CSMA/CD. Show the transmission and reception activity for the
four stations and the central station reception activity in the plot below until 6t. (Assume the
timeout is 3t and backoff interval is equal to 1.5t for all terminals. Assume a collision if overlap interval is
greater than zero).
A
time 0 t/2 t 3t/2 2t 5t/2 3t 7t/2 4t 9t/2 5t 11t/2 6t
B
C
H
ii. Indicate which of the four packets will be received correctly and which will suffer from
collision?
iii. What is the throughput of the network in the 6t period?
b) Consider the network shown below where terminals A, B, C, and H are communicating over a
bus. The distance between stations A and B is 2d meters. The distance between stations A
and H is d meters. The distance between stations H and C is 3d meters. The propagation
delay between stations A and C is t sec. The transmission time for all packets is t units.
Frames arrive at the four stations A, B, C and H at times tA = 0, tB = 3t/4, tC = 5t/2 and tH = 11t/4
respectively. If we assume that the stations A, C, H apply 1-persistent CSMA/CD while station
B applies Non-Persistent CSMA. Show the transmission activity for the four stations in the plot
below until 6t. (Assume that if collision is detected or occurs for terminals A & C the back-off window size is 2
slots while if collision is detected or occurs for terminal B & H the back-off window size is 1 slot).
A C B
H
d
2d
3d
c) The configuration below shows an extended LAN with nodes A, C, D, G. B1 is a bridge and H1 is
a hub. Frames arrive at the four stations A, C, D and G at times tA = 0.5t destined to D, tC = t
destined to D, tD = 1.75t destined to G, tG = 3.75t destined to A respectively. All Frames
require transmission time of t. If we assume that the stations A, C, D, G, B1 apply 1-Persistent
CSMA/CD. (Assume that if collision is detected or occurs for nodes A, C, D, G and bridge B1, the backoff
window size is greater than 6t. For a collision to occur two frames MUST overlap for a time that is GREATER
THAN ZERO).
Show the transmission activity for the four stations and B1 until 6t.
H1
B1
LAN 1 LAN 2
LAN 3 LAN 4
A
C
D G
t sec
t/2 sec 2T sec
t sec t/2 sec
t sec
t/2 sec 2t sec
t sec
A
time 0 t/2 t 3t/2 2t 5t/2 3t 7t/2 4t 9t/2 5t 11t/2 6t
C
D
G
B1
d) Assume round robin polling applied for 4 users A, B, C and D. Each user is allowed to transmit
only 2 frames per poll except for C which is allowed to send 3 frames per poll. Assume at t =
0 the polling order starts with station A followed by B, C, and D. If stations A, B, C and D need
to transmit 9, 7, 5 and 6 frames respectively. Assume frame size is 1500 BYTES. Assume the
time used to send a polling message is negligible as well as the propagation time. Calculate
the minimum transmission rate required for station B to be able to complete transmission of
all its frames before 312 ms?
Topic 2: ARQ Protocols a) In the figure shown below, frames are generated at node A and sent to node C through node B.
Determine the time required to transfer a message of size 11700 bytes from A to C based on the
following: • The data rate between A and B is 80 kbps
• The data rate between B and C is 100 kbps
• The propagation delay is 10 µsec/mile for both lines
• All data frames are 1000 bits long; ACK frames are separate frames of length 64 bits.
• Between A, B and C Stop-and-Wait ARQ is used.
• There are NO errors
2000 miles
A B C
1000 miles
Sender
Receiver
Time 0 1 2 3 4 5 6 7 8 9 10 11 12
b) Consider a link that uses GO Back 3 with a sending window size of WS = 3. Suppose that frames
use a time-out value of 3 units. Also assume that ACK transmission time and the processing
time are negligible. The figure below shows the operation of the ARQ protocol during the
sending of M frames.
i. What is the minimum number of bits that should be used for sequencing?
ii. Insert the appropriate messages in the white boxes in the below figure.
iii. Show the sending window state at time instants shown in the below table. (Note: use to represent frame sequences that are allowed to be sent. Use to represent outstanding
window frames. t = k+ means the instant right after t = k)
t=0+ t=1+ t=2+ t=3+ t=4+ t=5+ t=6+ t=7+ t=8+ t=9+ t=10+ t=11+ t=12+
Fr_0
Fr_1
Fr_2
Fr_3
iv. How many frames are successfully forwarded to the upper layer?
Fr0
c) Consider a link that uses Selective Repeat ARQ with a sending window size of WS = 4 and
receiving window size of WR = 2. Suppose that frames use a time-out value of 4 units. Also
assume that ACK transmission time and the processing time are negligible. The figure below
shows the operation of the ARQ protocol during the sending of M frames.
i. What is the minimum number of bits that should be used for sequencing?
ii. Insert the appropriate messages in the white boxes in the figure below.
iii. Show the sending window state at time instants shown in the table below. (Note: use to
represent frame sequences that are allowed to be sent. Use to represent outstanding frames. t = k+
means the instant right after t = k).
t=0+ t=1+ t=2+ t=3+ t=4+ t=5+ t=6+ t=7+ t=8+ t=9+ t=10+
Fr 0
Fr 1
Fr 2
Fr 3
iv. Show the receiving window state at time instants shown in the table below. (Note: use to
represent frame sequences that are allowed to be sent. Use to represent outstanding frames. t = k+
means the instant right after t = k).
t=2+ t=3+ t=4+ t=5+ t=6+ t=7+ t=8+ t=9+ t=10+ t=11+ t=12+
v. How many frames are forwarded successfully to the upper layer?
LAN 1
B2
B5
LAN 2
LAN 3
(1)
(2)
(3)
(2)
LAN 4
LAN 5
LAN 6
B4
B6
B1
B3
(1)
(2)
(1)
(1)
(2)
(2)
(1)
(3)
(1)
(2)
Topic 3: Switching and Routing a) Six stations (S1-S6) are connected to an extended LAN through transparent bridges (B1 and B2),
as shown in the figure below. Initially the forwarding tables are empty. Fill in the below tables
with appropriate entries, after the frames listed below have been completely transmitted.
S2 transmits to S1,
S5 transmits to S4,
S3 transmits to S5,
S1 transmits to S2,
S4 transmits to S3.
b) Generate the spanning tree for the network shown in the figure below. Assume the cost is the
number of LANs in the path to the root bridge. Draw the resultant spanning tree by marking
on the figure below, the root bridge and in the table below insert letter R to indicate a root
port, letter D to indicate a designated port or insert letter X otherwise.
B1 B2 B3 B4 B5 B6
Port (1)
Port (2)
Port (3)
B1 B2
Station Port Station Port
S3
S2 B1
S1
(1)
(2)
B2 (2)
(1)
(3)
S5 S6 S4
c) Given the packet switching network shown below. Use the Dijkstra routing algorithm to
compute shortest path from node “E” to all nodes of the network.
Step
(Iteration) N A B C D F
Initial {E}
1
2
3
4
5
d) The number shown next to each link of the network shown below is the probability of the
link working in correctly. It is assumed that links fail independently of each other. Apply the
Bellman ford algorithm to find the best path to destination “C” where for each any given
destination the best path used is the one which the probability that all the links will stay
intact is MAXIMAL.
Iteration A B D E F
Initial (-1,∞) (-1,∞) (-1,∞) (-1,∞) (-1,∞)
1
2
3
4
5
6
7
Best of luck.
Stay home, Stay safe.