ZZ from http://community.csdn.net/Expert/topic/4904/4904585.xml? Temp = 1.748294e-02
Note: I wrote a lot, but I didn't save it, and I didn't publish it again. The results ...... Too lazy to write
========================================================== ========================================================== =
Subject: How can I obtain or calculate the bandwidth of any two nodes in the network?
Author: rvvd (rvvd) blog
Level 1:
Reputation: 100
Community: Special Development/technology/Project Network Communication
Problem count: 20
Replies: 13
Posting time: 22:17:39
Thank you for your reference!
========================================================== ========================================================== =
Metaza () reputation: 100 blog 19:41:27 score: 0
Fluke should have it. I think I have never seen it before.
========================================================== ========================================================== =
Taosiming (Lang cangyun) () reputation: 100 blog 21:19:08 score: 0
Int m_ipwsize; // size of probe history window size
Int getbandwidth ()
{
// Sorting
Int temp;
For (INT I = 0, n = (m_ipwsize> 1) + 1; I <n; ++ I)
For (Int J = I, m = m_ipwsize; j <m; ++ J)
If (m_piprobewindow [I]> m_piprobewindow [J])
{
Temp = m_piprobewindow [I];
M_piprobewindow [I] = m_piprobewindow [J];
M_piprobewindow [J] = temp;
}
// Read the median value
Int Median = (m_piprobewindow [(m_ipwsize> 1)-1] + m_piprobewindow [m_ipwsize> 1])> 1;
Int COUNT = 1;
Int sum = median;
Int upper = median <3;
Int lower = median> 3;
// Median Filtering
For (int K = 0, L = m_ipwsize; k <L; ++ K)
If (m_piprobewindow [k] <upper) & (m_piprobewindow [k]> lower ))
{
++ Count;
Sum + = m_piprobewindow [k];
}
Return (INT) Ceil (1000000.0/(double (SUM)/double (count )));
}
========================================================== ========================================================== =
Guomin (sensitive) () reputation: 100 blog 11:02:26 score: 0
Use the dumbest method. Transfer a file between two points, and then calculate the average or stable value.
========================================================== ========================================================== =
Guomin (sensitive) () reputation: 100 blog 11:13:32 score: 0
What does the taosiming code mean? Maybe it's a new hand. You can't understand it...
========================================================== ========================================================== =
F_acme (canghai yixiao) () reputation: 100 blog 11:13:46 score: 0
Taosiming (Lang cangyun ):
Can you explain it?
What do m_piprobewindow mean?
========================================================== ========================================================== =
Taosiming (Lang cangyun) () reputation: 100 blog 13:09:40 score: 0
This code is not informative. For details, refer to the pathrate source code.
========================================================== ========================================================== =
Troyleescong () reputation: 100 blog 1:44:20 score: 0
Send a UDP packet of a certain length and set the "Do not fragment" flag bit in the IP header. If the length exceeds the bandwidth, the router Automatically splits the packet, however, because the "Do not fragment" flag bit is set, the router will send an ICMP packet to tell you to fragment and tell you the bandwidth. In this way, you increase the TTL value from 1 and send UDP packets one by one until your UDP packets are sent to the destination.
For details, refer to "TCP/IP details Volume 1: Protocol".
========================================================== ========================================================== =
Benjiam (tiger fight tonight) () reputation: 100 blog 15:24:54 score: 0
Ls dead don't realize
I don't know much about the code.
The bandwidth is related to the RTT.
========================================================== ========================================================== =
Saoyu (braised fish) () reputation: 100 blog 22:16:49 score: 0
The bandwidth is not fixed. It depends on the QoS setting value of the device in the network. It cannot be calculated by a single program.
========================================================== ========================================================== =
Taosiming (Lang cangyun) () reputation: 100 blog 15:42:05 score: 0
Basic Idea: Use Packet Pair to test the end-to-end bandwidth. After multiple tests, the receiver uses an array or list to store the test time difference. Sort and take the median value, and then remove the extreme data on both sides. Take the values of 8 times and 1/8 median as valid values, and take the average value once. Then get the time difference. The Unit is subtle.
In fact, this is the multi-peak estimation of Packet Pair.
========================================================== ========================================================== =
Guomin (sensitive) () reputation: 100 blog 21:54:39 score: 0
Could it be slow to ask the upstairs? I haven't figured out any good algorithms for a long time.
========================================================== ========================================================== =
Taosiming (Lang cangyun) () reputation: 100 blog 13:47:21 score: 0
Pathneck and pathrate are basically the same method. It will take several minutes to get it. You can also make improvements. However, it takes several minutes to obtain accurate end-to-end bandwidth!