Muhammad Fawad

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Computer Network Class

Assignment # 01

Name : Muhammad Fawad


Dept. : BS AI (3rd Semester)
Reg.No. : BSAI-23S-0022
Q1) A network has a 2 km link, an intermediate switch and then a 10 km link (propagation speed is
2x108m/sec). The waiting time at the intermediate switch is 20ms. The sender transmits at 1 Mbps and
the intermediate switch transmits at 10 Mbps. Calculate the (a) average end-end throughput and (b) total
end-to-end delay if the file of size bbnnnn bytes is sent from the source to destination, where bbnnnn
are the 6 digits of your Reg#. Assume that processing delay is zero.
Given
File size: 230022 bytes.
Link 1: 2km = 2000 m.
Link 2: 10km = 10000m.
Propagation speed: 2 x 108 m/sec.
Sender speed: 1Mbps = 1 x 106.
Switch speed: 10 Mbps =10 x 106.
Switch delay(S1): 20msec = 0.02 sec.

To Find:
1. Total end-to-end delay.
2. Average end-to-end throughput.

Solution:

Total delay = Transmission Delay + Propagation Delay + Switch delay

𝐹𝑖𝑙𝑒 𝑠𝑖𝑧𝑒 23022∗8 1840176


Transmission Dealy (T1), (Sender to Switch) = = = = 1.840176𝑠
𝑠𝑒𝑛𝑑 𝑠𝑝𝑒𝑒𝑑 1∗106 1000,000

𝐹𝑖𝑙𝑒 𝑠𝑖𝑧𝑒 23022∗8 1840176


Transmission Dealy (T2), (Switch to Receiver) = 𝑠𝑤𝑖𝑡𝑐ℎ 𝑠𝑝𝑒𝑒𝑑 = 10∗106
= 10,000,000
= 0.1840176𝑠

𝐿𝑖𝑛𝑘 1 2000
Propagation Delay(P1), (Sender to Switch) = 𝑃𝑟𝑜𝑝𝑎𝑔𝑎𝑡𝑖𝑜𝑛 𝑠𝑝𝑒𝑒𝑑 = 2∗108 = 0.00001𝑠

𝐿𝑖𝑛𝑘 2 5000
Propagation Delay(P2), (Switch to Receiver) = 𝑃𝑟𝑜𝑝𝑎𝑔𝑎𝑡𝑖𝑜𝑛 𝑠𝑝𝑒𝑒𝑑 = 2∗108 = 0.00005𝑠

Total delay = T1 + T2 + P1 + P2 + S1

=1.840176 + 0.1840176 + 0.00001 + 0.00005 + 0.02 = 2.0442536s

Total delay = 2.0442536s

𝑭𝑰𝒍𝒆 𝒔𝒊𝒛𝒆 230022


Throughput = 𝑻𝒐𝒕𝒂𝒍 𝒅𝒆𝒍𝒂𝒚 = 2.0442536
= 112553.06 𝑏𝑦𝑒𝑠/𝑠𝑒𝑐

112553.06
= 112553.06 𝑏𝑦𝑒𝑠/ sec = 106
= 0.9005 𝑀𝑏𝑝𝑠

Throughput = 0.9005 Mbps


Q2) Suppose you have a large file of bbnnnn MB of data (where bbnnnn are the 6 digits of your Reg#).
The file needs urgent transfer from one city to another city. Assume that between the two cities, you
have a n-Mbps dedicated link available for data transfer (where ‘n’ is the last digit of your Reg#. If it is
0, assume link speed of 10 Mbps). Will you prefer data transfer over this provided link, OR you will
prefer another option of a one-day parcel delivery option, provided by a courier service? Explain, and
give proper reasoning.
Given:
File size: 230022MB.
Net speed to: 2Mbps.

Find:
Time delay.
Solution:

𝑭𝒊𝒍𝒆 𝒔𝒊𝒛𝒆 22022∗8∗106 18401176000000


Time delay = 𝑵𝒆𝒕 𝒔𝒑𝒆𝒆𝒅 = 2∗106
= 2000000
= 920088𝑠 = 10.6 days

It will take almost 20 days to transfer this file over a network. Therefore, we will use the one-
day parcel delivery option as it is much faster.
Q3) Why are all the layers of TCP/IP protocol suite not present on the intermediate nodes such as
routers and switches? Support your answer with logical reasoning.
Answer
Routers and switches handle packet forwarding and routing, focusing on physical and data link layer
operations. They facilitate communication within and between networks by forwarding data based on
MAC and IP addresses. They do not implement protocols such as TCP or UDP, which manage functions
like flow and error control. Instead, these functions are handled by end devices like computers and
servers. Routers are responsible for making forwarding decisions based on destination IP addresses and
maintaining routing tables. Switches operate at the data link layer, forwarding packets based on MAC
addresses within a single network segment. This it the reason these devices do not have all the layers
of TCP/ IP model.

Q4) As a student, you have used the Internet services on campus at park Road. Identify edge and access
components/parts in Park Road network, as well as the access technologies being used. I will apricated
to you if you answer this question with suitable diagram.
Answer:
Edge/access components:

• Computer
• Laptop
• Mobile
• Printers
• Scanner
• Cameras
• Routers & Switch
• Firewalls
Access technology

• Ethernet
• Wi-fi
Diagram

Q5) Use traceroute command for any destination of your choice and give the screenshot of the response
to your command. Also, give the values for delays for the first and second router along the path.
Answer
Q6) Consider an application that transmits data at a steady rate (for example, the sender generates an
N-bit unit of data every k time units, where k is small and fixed). Also, when such an application starts,
it will continue running for a relatively long period of time. Answer the following questions. Briefly
justifying your answer:
a) Would a packet-switched network or a circuit-switched network be more appropriate for this
application? Why?
Answer
The Circuit-switched network will work better the packet-switched network because it offers a
dedicated path for steady data transmission without interruptions, making it more reliable for long-term
usage compared to a packet-switched network.
b) Suppose that a packet-switched network is used and the only traffic in this network comes from such
applications as described above. Furthermore, assume that the sum of the application data rates are less
than the capacities of each link. Is some form of congestion control needed? Why?
Answer
Yes, congestion control is still needed in a packet-switched network, even if the application data rates
are below the capacities of the links. It helps prevent issues like packet loss, that can occur due to traffic
or network problems. Congestion control ensure smooth and reliable data transmission.

You might also like