0% found this document useful (0 votes)
51 views5 pages

CCCN 312 Computer Networks Assignment

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views5 pages

CCCN 312 Computer Networks Assignment

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Kingdom of Saudi Arabia ‫اﻟﻣﻣﻠﻛﺔ اﻟﻌرﺑﯾﺔ اﻟﺳﻌودﯾﺔ‬

Ministry of Education
‫وزارة اﻟﺗﻌﻠﯾم‬
University of Jeddah
College of Science and Computer ‫ﺟﺎﻣﻌﺔ ﺟدّة‬
Engineering ‫ﻛﻠﯾﺔ ﻋﻠوم و ھﻧدﺳﺔ اﻟﺣﺎﺳب‬

CCCN 312 Computer Networks Assignment

Question Number 1 2 3 Total

Allocated 9 8 3 20
Obtained

Name:

ID:
Kingdom of Saudi Arabia ‫اﻟﻣﻣﻠﻛﺔ اﻟﻌرﺑﯾﺔ اﻟﺳﻌودﯾﺔ‬
Ministry of Education
‫وزارة اﻟﺗﻌﻠﯾم‬
University of Jeddah
College of Science and Computer ‫ﺟﺎﻣﻌﺔ ﺟدّة‬
Engineering ‫ﻛﻠﯾﺔ ﻋﻠوم و ھﻧدﺳﺔ اﻟﺣﺎﺳب‬

Question 1: [__/ 9]
Consider the arrival of nine packets to an output link at a router during the time interval
[0, 5]. Time is divided into "slots," beginning at t = 0, 1, 2, 3, and so on. Packets can arrive
at any point during a slot, and multiple packets may arrive within a single slot. At the
start of each time slot, the packet scheduler selects one packet from the queued
packets (if any) for transmission, using a round-robin scheduling method. Each packet
requires exactly one slot to transmit, meaning that a packet selected for transmission at
time t will complete its transmission at t + 1. At that point, another packet will be
chosen for transmission from those queued.

As mentioned earlier, packet scheduling employs a round-robin method, prioritizing


three traQic classes (1, 2, 3), with lower classes receiving higher transfer time priority.
Based on this scenario answer the following questions:
1. At t=1, which packet is sent out? Give the packet number.

2. At t=2, which packet is sent out? Give the packet number.

3. At t=3, which packet is sent out? Give the packet number.

4. At t=4, which packet is sent out? Give the packet number.

5. At t=5, which packet is sent out? Give the packet number.

6. At t=6, which packet is sent out? Give the packet number.

7. At t=7, which packet is sent out? Give the packet number.


Kingdom of Saudi Arabia ‫اﻟﻣﻣﻠﻛﺔ اﻟﻌرﺑﯾﺔ اﻟﺳﻌودﯾﺔ‬
Ministry of Education
‫وزارة اﻟﺗﻌﻠﯾم‬
University of Jeddah
College of Science and Computer ‫ﺟﺎﻣﻌﺔ ﺟدّة‬
Engineering ‫ﻛﻠﯾﺔ ﻋﻠوم و ھﻧدﺳﺔ اﻟﺣﺎﺳب‬

8. At t=8, which packet is sent out? Give the packet number.

9. At t=9, which packet is sent out? Give the packet number.

Question 2: [__/ 8]
In the scenario described, there are two TCP clients that communicate with a TCP
server using TCP sockets. The figure illustrates the Python code used to create a single
listening socket on the server (the listening socket itself is not depicted graphically).
Additionally, the code for the client sockets is also provided. The three sockets shown
on the server were created because the server accepted connection requests through
the listening socket—one connection from the client on the left and two connections
from the client on the right.

1. What is the source port # for packet D?

2. What is the destination port # for packet D?

3. What is the source port # for packet C?

4. What is the destination port # for packet C?


Kingdom of Saudi Arabia ‫اﻟﻣﻣﻠﻛﺔ اﻟﻌرﺑﯾﺔ اﻟﺳﻌودﯾﺔ‬
Ministry of Education
‫وزارة اﻟﺗﻌﻠﯾم‬
University of Jeddah
College of Science and Computer ‫ﺟﺎﻣﻌﺔ ﺟدّة‬
Engineering ‫ﻛﻠﯾﺔ ﻋﻠوم و ھﻧدﺳﺔ اﻟﺣﺎﺳب‬

5. What is the source port # for packet A?

6. What is the destination port # for packet A?

7. What is the source port # for packet B?

8. What is the destination port # for packet B?

Question 3: [__/ 3]
Consider a datagram network that uses 8-bit host addresses. Suppose a router
employs longest-prefix matching and has the following forwarding table:

1. Suppose a datagram arrives at the router, with destination address 10101000. To


which interface will this datagram be forwarded using longest-prefix matching?
Kingdom of Saudi Arabia ‫اﻟﻣﻣﻠﻛﺔ اﻟﻌرﺑﯾﺔ اﻟﺳﻌودﯾﺔ‬
Ministry of Education
‫وزارة اﻟﺗﻌﻠﯾم‬
University of Jeddah
College of Science and Computer ‫ﺟﺎﻣﻌﺔ ﺟدّة‬
Engineering ‫ﻛﻠﯾﺔ ﻋﻠوم و ھﻧدﺳﺔ اﻟﺣﺎﺳب‬

2. Suppose a datagram arrives at the router, with destination address 11100111. To


which interface will this datagram be forwarded using longest-prefix matching?

3. Suppose a datagram arrives at the router, with destination address 01011111. To


which interface will this datagram be forwarded using longest-prefix matching?

You might also like