程序代写代做 Java C CSC8004 Networks Coursework 1 Aims

CSC8004 Networks Coursework 1 Aims
The aim of this assignment is to compare circuit switching and packet switching using some Network simulators written by former students. The applications consider two simple network topologies, shown below as Version 1 and Version 2. You will be asked some questions which will test your understanding of circuit switching and packet switching.
Submission Deadline: Friday 14/2/2019, 14:30
You should write up your answers independently and submit them electronically through NESS as a Word Doc or PDF.
Wherever possible, you should endeavour to explain your answer and not simply give a number, i.e. show working out or reasoning where appropriate, if you used trial and error, say so and show the values used.
Marks
Marks will be awarded for the correctness of the answers and the quality of explanation. This assignment is worth 10% of the total module mark.

Version 1
This version considers a simple 2 node (tandem) network as illustrated below:
A message is to be sent from A to B. The user will specify the length of the message (bits), transmission rate (placement rate) (in bits per second), transfer delay per link (seconds), the set up time for the route (for circuit switch) in seconds, the maximum packet length (bits), the (packet) header length (bits) and the packet routing delay (seconds). (Note: the maximum packet length includes the header.) In the circuit switch case the entire message is placed on the line in a continuous fashion following the set up time for the route at the given transfer rate. In the packet switched case each packet is placed on the line individually following the packet routing delay, again at the rate specified. The overall transmission time is calculated as the time from the start of the set up time to the time the last bit of data arrives at node B: this is calculated for each case and displayed.
Version 2
The Tandem network does not really explore any of the issues of the relative performance of each mechanism, for this we need congestion. Version 2 will study a network with a single point of congestion illustrated below:
Nodes A, B and C send messages to nodes D, E, and F respectively (1 message each), all messages are routed through node G. The input data is the same as in version 1, except that there are 3 messages to define (set-up and routing delays and transmission rates are assumed to be identical for each message). The added complexity here is that, for circuit switched, nothing can be sent unless the network is free, the sending of a message is blocked if a message is in transit. In the packet switched case packets may be sent simultaneously from A, B and C, but you will have to queue packets arriving at G. You can assume that all three messages are ready to transmit

at time t=0. The output gives the overall transmission time for each message and the average transmission time.
Programs
Three programs are available for you to use. All routines can be downloaded from Blackboard.
The first two routines give a visual simulation for version 1 and version 2. You can run these by typingin“java -jar Version1.jar“or“java -jar Version1.jar“ina commandwindowTheotherroutine(NModel)canberunbytyping”java -jar Nmodel.jar”, in a command window. NModel simply performs calculations without the simulation. In this last routine use “View” to switch between topologies and set the parameters.
The visual simulations are useful to understand what is going on. The other routine is quicker to use however both should give the same (correct) results (if not trust the last routine). The program for version 2 does not allow different message lengths; hence you will need to use the other routine for those questions that demand this. The interfaces should be self-explanatory, but the language used is slightly different in each. Play around with all the routines to make sure you understand what is going on before you answer the questions.

Questions Version 1
Inputs
U = set-up time for circuit switch (seconds)
Y = transmission delay per link (seconds) (also called “transfer delay”)
L = message length (bits) >0
R = transmission rate (bits per second) >0 (also called “placement rate”)
H = header size (bits) =>0
P = packet size (bits) >H (note that this is the total packet size, i.e. header + data) X = decision time per packet (also called “packet routing delay”)
1. If L=1000, Y=1, R=4000 and U=1, choose a value of X. What is the total transmission time in the circuit switch network and packet switched network?
2. Take the same inputs as Question 1. If P=125 and H=25, under what values of X would packet switching give better performance than circuit switching? Give your answer to 5 decimal places.
Note:
In circuit switching the total transmission time is the time to set up the circuit plus the time to send all the bits in the message plus the propagation delay, hence,
𝑇 = 𝑈 + 𝑅𝐿 + 𝑌
In packet switching the total transmission time is the number of packets (N) times the decision time per packet plus the time to send all the bits in the message and N headers plus the propagation delay, hence,
𝑇 = 𝑁𝑋 + 𝐿 + 𝑁𝐻 + 𝑌 𝑅
Where N is given by the length of the message (L) divided by the amount of data in a packet (P-H), rounded up to the nearest integer. If P=125 and H=25 (as in question 2) then there would be 10 packets.
The circuit switch case has a fixed overhead, U. The amount of overhead in the datagram case depends on the number of routing decisions to be made (NX) and the amount of extra data to be sent (NH/R). Hence, the datagram approach will be faster if
𝑈 > 𝑁 􏰂 𝑋 + 𝐻𝑅 􏰃
Of course, in this simple tandem network there is no delay at the nodes and so the trade-off here is very simple. In general a datagram will be delayed at every intermediate node it visits.
3. Use the same values as in Questions 1 and 2, and set X such that the total transmission times are equal for each case. Now increase L by 2 bits. Why does the total transmission time increase much more in packet switch than in circuit switch?
4. Using the same values as in Question 3, increase L by a further 2 bits. What is the increase in total transmission times from Question 3 for each kind of network? Why is the increase the same for circuit switch and packet switch in this case?

Version 2
Inputs
As above, except
L1 = length of message sent from A (bits) >0 L2 = length of message sent from B (bits) >0 L3 = length of message sent from C (bits) >0 P and H are assumed equal for each message X and R are assumed equal at each node
U is assume equal for each route
Y is assumed equal for each link
5. If L1= L2= L3=1000, Y=1, R=4000 and U=1, what is the total transmission time for each message in each of the circuit and packet switched cases?
Note:
The circuit switching times are simply three instances of the circuit switching times for version 1 with an extra hop for each message. This is because the three sources will send sequentially. In packet switching the situation is somewhat more complex… if you don’t like maths, then look away now.
The total delay is the maximum delay sending from A, B or C to G (this gives the time the last packet gets to G), plus the queuing delay at G, plus the time to send the last packet from G to its destination. The difficulty is in calculating the queuing delay, to do this in general you need to know how many packets are at G when the last packet arrives. However, in this case all the messages are the same length and all the packets are equal. Therefore we just need to know how long it takes for the first packet to arrive at node G (X+P/R+Y) and then add on the time it takes for G to send all the packets (3N(X+P/R), and finally the transmission time of the last packet from G to its destination (Y). Thus:
􏰂 𝑋 + 𝑅𝑃 + 𝑌 􏰃 + 3 𝑁 􏰂 𝑋 + 𝑅𝑃 􏰃 + 𝑌
Where N is the number of packets sent in each message.
6. Take the same inputs as Question 5. If P=125 and H=25, under what values of X would packet switching give a faster total delivery time for all three messages (i.e. time until last bit of last message arrives) than circuit switching? Give your answer to 5 decimal places.
7. Use the same input values as in Question 6, and set X=0.2. Now increase L1 by 4 bits, L2 by 4 bits and L3 by 2 bits. In the packet switched network, which message has the smallest total transmission time? Explain why.
8. Use the same input values as in Question 7. Again increase L1 by 4 bits, L2 by 4 bits and L3 by 2 bits (from the values in Question 6). In the circuit switched network, which message has the smallest total transmission time? Explain why.
Submission Deadline: Friday 14/2/2019, 14:30