如何获取可用带宽速率?
我们有一个DSL,我们如何计算可用带宽以便我们可以整形数据包,我们可以假设以太网接口上的带宽为100mbps 然而,在DSL设备中,列车速率(带宽速率)根据不同的情况而变化。 我如何获得可用带宽速率(不同)? 有什么方法可以获取可用带宽值吗?
We have a DSL , how can we calculate the available bandwidth so that we can shape the packet, We can assume the bandwidth to be 100mbps on the ethernet interface
However, in DSL devices, the train rate(Bandwidth rate ) is varies according to different situation.
How can i get the available bandwidth rate(from varies)?.
Any method is there for getting the available bandwidth value?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“带宽”不是单台计算机可以确定的。您至少需要指定两个端点。即使您对以太网 100 mbps 的假设也可能是错误的,因为电缆或其他端点可能无法达到完整的传输速率。通常,这是通过纳入网络传输中的服务质量功能来完成的,并且它不是一个很容易做的事情。
在我们的多人游戏(使用 UDP)中,我们使用了数据包对探测< /a> 成功了,即使它不通用,但它是我们尝试过的所有方法中最可靠的。恐怕更详细地描述它超出了这个答案的范围,但是 这个答案用易于理解的术语很好地描述了非常相似的东西:
"Bandwidth" is not something you can determine for a single computer. As a minimum you need to specify both endpoints. Even your assumption of 100 mbps on Ethernet may be wrong, as the cable or the other endpoint may not be capable of the full transfer rate. Usually this is done by Quality of Service functionality incorporated into the network transfer, and it is not an easy thing to do.
In our multiplayer game (using UDP) we have used Packet Pair Probing successfully, and even if it is not universal, it was the most reliable from all methods we have tried. I am afraid it is out of scope of this answer to describe it in more detail, but this answer gives quite good description of something very similar in easy to understand terms:
每次数据包从任何地方注入网络时,可用带宽都会发生变化。它无法通过任何 API 获得。 TCP/IP 已经进行了“数据包整形”。你的目标不明确。
Available bandwidth changes every time a packet is injected into the network from anywhere. It is not available via any API. TCP/IP already does 'packet shaping'. Your objective is unclear.