calculate transmission delay of network - networking

I have N packets of size L Mbits and I want to send them from A to B, in between there are two routers and each link has different transmission rate(e.g A to router1 link is 3Mbps, router1 to router2 5Mbps and router2 to B 8Mbps), so How to calculate transmission delay?

R -> rate of transfer of each link in Mbps
For every link Li:
transmission delay of 1st packet=L0/R+L1/R....+Ln/R
in a loop consider,
For every N packet the transmission delay will be (N-1)Li/R+Li/R
and calculate the remaining part
here for you example trans_delay of 1st packet= (M/3+M/5+M/8)
and the rest u can apply the formula above

Related

Finding throughput when Rx and Tx values are given

I have been trying to analyse throughput in the DPDK l2fwd application. I get the Rx and Tx values, from this how can I find the throughput?
Be default l2fwd statistics get updated every 10 seconds. So we need to get delta between current and previous Rx values and divide it by 10, i.e.:
Avg_Throughput = (Rx_curr - Rx_prev)/10 (PPS)
We will get an average throughput in packets per second (PPS).
To get the throughput in bits per second, we also need a frame size times 8 bit:
Avg_Throughput = (Rx_curr - Rx_prev) * Frame_Sz * 8 / 10 (bit/s)
The result will be in bits per second.
Overall, the l2fwd is not designed to measure the throughput. It is easier to measure the throughput using packet generator, which usually just shows the value.

why if i put a large TCP window in iperf returns me a wrong measurement?

I want to know how about when I put a huge TCP window in iperf,eg 64MB, not give me errors, but gives me wrong measurement for example 54Mbits/sec in bandwindth and my connection upload is only 1 Mbps. Is it bug of iperf?
i put in command this: iperf -w 64MB -c IPaddress -p and_the_port
and i received this:
Interval Transfer Bandwidth
0.0-10.1sec 65.0MBytes 54.2 Mbits/sec
which is wrong because my connection is:
Bandwidth(Up/Down)[kbps/kbps]: 1.023/15.000
Your TCP window size looks to be way too large for your bandwidth. The TCP window size should be just large enough to accommodate the so-called "Bandwidth Delay Product," which is the highest bandwidth of your channel multiplied by the round trip delay time. You should be able to get the round trip time from the BW test you performed.
Ex. 10 Mbps * 98 mS = 0.98 Mbits

Determining a formula for a packet switching network?

Let's say we have a packet of length L bits. It is transmitted from system A through three links to system B. The three links are connected by two packet switches. di, si and Ri are the length, propagation speed and transmission rate for each link, i, in the example network. Each packet switch delays each packed by dproc (processing time).
Lets also say that there are no queuing delays; so how would i go about writing a formula for computing the end-to-end delay for a packet of length L on this theoretical network?
This is what i have so far:
End-End Delay = L/R_1 + L/R_2 + L/R_3 + d_1/s_1 + d_2/s_2 + d_3/s_3 +2(d_proc)
Is this correct, if not, what is the correct formula and why so?
Yes, your formula is correct, assuming that the processing time of each switch is the same. Also, is calculating actual delay be sure to use same dimensions for units - bits and bits/s for size and transfer rate and meters and meters/s for propagation. Take note that if the switches are connected by the fiber-optic links you will have to divide speed of light by the diffraction rating of the fiber in calculations.

Sliding window protocol, calculation of sequence number bits

I am preparing for my exams and was solving problems regarding Sliding Window Protocol and I came across these questions..
A 1000km long cable operates a 1MBPS. Propagation delay is 10 microsec/km. If frame size is 1kB, then how many bits are required for sequence number?
A) 3 B) 4 C) 5 D) 6
I got the ans as C option as follows,
propagation time is 10 microsec/km
so, for 1000 km it is 10*1000 microsec, ie 10 milisec
then RTT will be 20 milisec
in 10^3 milisec 8*10^6 bits
so, in 20 milisec X bits;
X = 20*(8*10^6)/10^3 = 160*10^3 bits
now, 1 frame is of size 1kB ie 8000 bits
so total number of frames will be 20. this will be a window size.
hence, to represent 20 frames uniquely we need 5 bits.
the ans was correct as per the answer key.. and then I came across this one..
Frames of 1000 bits are sent over a 10^6 bps duplex link between two hosts. The propagation time is
25ms. Frames are to be transmitted into this link to maximally pack them in transit (within the link).
What is the minimum number of bits (l) that will be required to represent the sequence numbers distinctly?
Assume that no time gap needs to be given between transmission of two frames.
(A) l=2 (B) l=3 (C) l=4 (D) l=5
as per the earlier one I solved this one like follows,
propagation time is 25 ms
then RTT will be 50 ms
in 10^3 ms 10^6 bits
so, in 50 ms X bits;
X = 50*(10^6)/10^3 = 50*10^3 bits
now, 1 frame is of size 1kb ie 1000 bits
so total number of frames will be 50. this will be a window size.
hence, to represent 50 frames uniquely we need 6 bits.
and 6 is not even in the option. Answer key is using same solution but taking propagation time not RTT for calculation. and their answer is 5 bits. I am totally confused, which one is correct?
I don't see what RTT has to do with it. The frames are only being sent in one direction.
Round-Trip-Time means that you have to take into account the ACK (acknowledgement message) you must receive that tells you the frames you are sending are being received by on the other side of the link. This 'time' window is the period where you get to send the remaining frames that the window allows you to send before you anticipate an ACK.
Ideally you want to be able to transmit continuously, i.e not having to stop at the window frame limit to wait for an ACK (which is essentially turns into a stop-and-wait situation if you have to stop and wait for the ack. The solution to this question is: the minimum number of frames that will be transmitted from the moment the first frame is transmitted to the moment you get an ack. (also known as the size for a large window)
Your calculations look to be correct in both cases and it would be safe to assume the answer choices for the second question are wrong .
Here its duplex channel so YOUR RTT= Tp hence they have considered Tp
Now you will get X = 25*10³
So total bits of window will be 5..

Calculating packet size in datagram network

In a datagram network a packet travels from node A to D on the following route: A → B → C → D. Each link has data rate of 1 Mbps. The total end-to-end delay (from A to D) is 0.4 s. The total waiting time on the route is 0.25 s and the total propagation delay is 0.12 s. What is the packet length expressed in bits ? I'm not sure how exactly to find this. Can anyone help?
From the point of view of the units, subtract all the latencies from the total time so that what you have left is attributable to the bandwidth. Multiply the result in seconds by the bandwidth in bits/second and the result is in bits. However I'm not convinced this is really a valid procedure.

Resources