Starting from:
$30

$24

Computer Networks Assignment 1 Solution




Instructions : You have to upload the code along with the output graphs for this assignment in a tar le using the lab submission website on or before 20.01.2019. The le name should be assign1.tgz.




Problem 1. Write a program to simulate the functioning of a switching network(shown in gure 1) consisting of a source that are connected to a sink through a switch. You have to create the following objects:




Source : The source must have an id that is automatically assigned. It must have a constant packet sending rate and will be connected to the switch through a link that must have a given bandwidth.




Switch : The task of the switch is to service the arriving packets from the source to the input port and dispatch the same to the sink through a common output port. Although the link from the input port to the output port has in nite bandwidth but the link to the sink has a given nite bandwidth. The switch operates using packet switched technology. In packet switched mode, the switch uses a single queue at the output port. Packets arriving from the source are inserted in the queue in order of their arrival and dispatched to the sink by dequeuing one at a time.




Switch : Each packet must have a source id and a time stamp when it is generated. The packets have same given size that is provided by the user.




You are free to create additional objects if you want. assume that the queues are in nitely large and all components follow a common global time.The simulation will run for a xed given duration of time.




You have to record the following as output:










t




Figure 1: A switching network












Figure 2: A switching network







The average delay of the source with respect to di erent packet sending rates.




Assume that the size of the queue of the switch is xed. The packet loss rate at the switch with respect to di erent packet sending rates of the source.




If the number of sources is now increased to 3 where each source has a distinct link to the switch, however the link from the switch to the sink is shared between the sources as shown in gure 2, then record the following.




The average delay of each of the sources with respect to di erent packet sending rates.




Assume that the size of the queue of the switch is xed. The packet loss rate at the switch with respect to di erent packet sending rates of each of the sources.



































































































2

More products