Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Encs3320 Assignment1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Birzeit University

Department of Electrical and Computer Engineering


Second Semester 2023/2024
ENCS3320-Computer Networks
Assignment-Chapter 1
Student name (Arabic):________________________‫الشامي__قص‬
‫___________ي‬ID___________________
Q#1: True or False
a. Category 5 cables supports 10 Gbps : False
b. Propagation delay depends on the distance between the sender and receiver :True
IXP connects several ISPs : True
c. TDM and FDM can be used in circuit switching :True

Q#2: Consider store-and-forward routers. Assume sending a file of size 5 Kbyte from A to C.
Assume the packet size L=1000 Byte, data rate R=10 Mbps, and speed of light is 2.5 X10^8 m/s.
Assume each packet should contain 40-byte header. The distance between and two nodes is 200
km. Neglect processing and queueing delay
How long does it take to send the file from A to D.

A B C D
Answer:

Packet size:

1. Packet size = L = 1000 Bytes


2. Header size = 40 Bytes
3. Data size per packet = 1000 - 40 = 960 Bytes
2.

File size:

3.

1. File size = 5 Kbytes = 5 * 1024 = 5120 Bytes

4.

Number of packets:

5.
1. Number of packets = File size / Data size per packet
2. Number of packets = 5120 / 960 = 5.33 packets (rounded up to 6 packets)

6.

Transmission time:

7.

1. Data rate = R = 10 Mbps = 10 * 10^6 bps


2. Transmission time per packet = (Packet size * 8) / Data rate
3. Transmission time per packet = (1000 * 8) / (10 * 10^6) = 0.0008 s

8.

Propagation delay:

9.

1. Distance between nodes = 200 km


2. Speed of light = 2.5 * 10^8 m/s
3. Propagation delay = Distance / Speed of light
4. Propagation delay = (200 * 10^3) / (2.5 * 10^8) = 0.0008 s

10.

Total time:

11.

1. Total time = (Number of packets * Transmission time per packet) +


(Number of packets * Propagation delay)
2. Total time = (6 * 0.0008) + (6 * 0.0008) = 0.0096 s + 0.0048 s = 0.0144 s

Therefore, it takes approximately 0.0144 seconds (or 14.4 milliseconds) to send the 5
Kbyte file from A to C using store-and-forward routers....
1.Calculate the total transmission time for the file.
2.Calculate the total propagation delay for the file.
3.Add the transmission time and propagation delay to get the total time

Given:

File size = 5 Kbyte = 5000 bytes


Packet size (including header) = L = 1000 bytes + 40 bytes = 1040 bytes
Data rate = R = 10 Mbps = 10 * 10^6 bits per second
Speed of light = c = 2.5 * 10^8 m/s
Distance between nodes = 200 km = 200,000 meters

Total transmission time: Transmission time=File size Datarate


Transmission time=Data rat eFile size Transmission time=5000 bytes10×106 bits/s
Transmission time=10×106 bits/s5000 byte Transmission time=5000×810×106 seconds
Transmission time=10×1065000×8 seconds Transmission time=0.004 seconds
Transmission time=0.004 seconds

Total propagation delay:


Propagation delay=DistanceSpeed of lightPropagation delay=Speed of lightDistance
Propagation delay=200,000 meters2.5×108 m/sPropagation delay=2.5×108 m/s200,000
meters Propagation delay=200,0002.5×108 secondsPropagation delay=2.5×108200,000
SecondsTransmission delay=0.0008 secondsPropagation delay=0.0008 seconds

Total time: Total time=Transmission time+Propagation delay


Total time=Transmission time+Propagation delay
Total time=0.004 seconds+0.0008 seconds
Total time=0.004 seconds+0.0008 seconds Total time=0.0048 seconds
Total time=0.0048 seconds

So, it takes approximately 0.0048 seconds to send the file from A to D.

Q#3: Assume several users are sharing a 20Mbps link. Also assume that each user needs 2Mbps
when sending, but each user sends only 18% of the time.
A- When circuit switching is used, how many users can be supported?

Answer::

Given:

 Total bandwidth = 20 Mbps


 Bandwidth required per user = 2 Mbps

The number of users that can be supported is calculated as:


Number of users=Total bandwidth Bandwidth required per user
Number of users=Bandwidth required per userTotal bandwidth

Number of users=20 Mbps2 MbpsNumber of users=2 Mbps20 Mbps

Number of users=10Number of users=10

So, when circuit switching is used, the link can support 10 users.

B- Now assume packet switching is used


1- Will there be a queuing delay when 8 users are sending at the same time? explain
briefly!
Answer:

Given:
 Total link bandwidth = 20 Mbps
 Bandwidth required per user when sending = 2 Mbps

If 8 users are sending at the same time:


Total required bandwidth=8×2 Mbps=16 Mbps
Total required bandwidth=8×2 Mbps=16 Mbps

Since the total required bandwidth (16 Mbps) is less than the available bandwidth
(20 Mbps), there will not be a queuing delay because the link can handle the
combined load of the 8 users simultaneously.

2- Assume 20 users are sharing the link, give a formula for the probability that more
than 12 users are sending data.
Answer:

Given:

 Number of users (trials), X=20n=20


 Probability that a user is sending data (success), X=0.18p =0.18
 We are interested in the probability of more than 12 users sending data.

Let X be the random variable representing the number of users sending data. X
follows a binomial distribution: X∼Binomial(n,p).

We want to find P (X >12).

The cumulative probability P (X ≤ k) can be calculated using the cumulative


distribution function (CDF) of the binomial distribution.

P (X ≤ 12) = ∑k=012(k20)p K(1−p)20−k

Thus, the formula for the probability that more than 12 users are sending data is:
P (X >12)=1−∑k=012(k20)(0.18)k(0.82)20−k

Where

(k20) is the binomial coefficient: (k20)=k!(20−k)!20!


You can use this formula to compute the exact probability. For practical purposes,
this calculation is typically done using statistical software or a calculator that
provides the binomial distribution's CDF.

You might also like