GPRS网络收费流量计算
我正在使用通过 GPRS 进行通信的分布式应用程序。 我使用 UDP 数据包发送业务数据,使用 ICMP ping 来验证连接。 现在我在计算提供商将向我收取费用的流量时遇到问题。 我必须考虑以下因素:
- UDP 有效负载:这是显而易见的。
- UDP开销:UDP报头+IP报头=8+20字节。
- 不带数据的 ICMP 回显请求:IP 标头 + ICMP 负载 = 28 字节。
- ICMP 回显回复:如 3 中
所示。以上意味着对于每个数据包,我需要支付有效负载 + 28 字节的费用,并且对于每个 ping 56 字节的费用。 我是对的还是我遗漏/误解了什么?
I am working with a distributed application communicating over GPRS. I use UDP packets to send business data and ICMP pings to verify connectivity. And now I have a problem with calculating a traffic for which I will be charged by the provider. I have to consider following factors:
- UDP payload: that is obvious.
- UDP overhead: UDP header + IP header = 8 + 20 bytes.
- ICMP echo request without data: IP header + ICMP payload = 28 bytes.
- ICMP echo reply: as in 3.
Above means that for every data packet I am charged for payload + 28 bytes and for every ping 56 bytes. Am I right or I am missing/misunderstanding something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能还需要确定您的 GPRS 网络提供商是否会因在其网络上封装数据包而产生任何开销。
虽然 GPRS 本质上是一个 IP 网络,但它们可能会尝试向您收取链路层流量费用,而不仅仅是向您的实际有用数据收费。
You may also need to establish whether there's any overhead from your GPRS network provider for encapsulating your packets over their network.
Whilst GPRS is fundamentally an IP network, they may try to charge you for link layer traffic, not just your actual useful data.
这还取决于网络中使用的报头压缩方案的类型。 在 IPv4 的情况下,IP、UDP 和 RTP 的开销为 40 字节,在 IPv6 的情况下为 60 字节。 如果使用 IPHC 或 CRTP,它们最多可以压缩 2 个字节。 如果网络使用ROHC,则应将40字节或60字节的开销压缩为1或3字节。 在这种情况下,开销将大大减少。
This also depends on the type of header compression scheme used in the network. There is 40 bytes of overhead of IP, UDP, and RTP in the case of IPv4 and it is 60 bytes in the case of IPv6. If IPHC or CRTP is used, they can compress up to 2 bytes. If ROHC is used by network, it shall compress the overhead of 40 bytes or 60 bytes to 1 or 3 bytes. In that case the overhead will be greatly reduced.
在我之前完成的答案主要与计算实际网络流量的困难有关。 但您必须注意运营商不同的收费政策等。
GPRS 字节收费可能会根据白天时间、地理区域、目的地地址、折扣、费率计划、附加服务、舍入等而有很大差异,只有您的移动运营商知道所有此类计费规则。 如果你想要精确的结果,你必须知道这一切。
考虑到如此大量的信息是非常困难的,并且需要构建自己的“小型计费系统”。
Answers was done before my mostly related to difficulties with calculating real network traffic amount. But you have to be aware of such thing as different charging policies of your operator.
GPRS bytes charging may vary greatly according to day time, Geo region, destination address, discounts, rate plan, additional services, rounding and so on only your mobile operator knows all such billing rules. If you want precise result, you have to know all this.
Taking into account such huge amount of information is very hard, and will require building your own "small billing system".