11、Keepalives【保活】

原文链接:https://datatracker.ietf.org/doc/html/rfc8445#section-11

11、Keepalives【保活】

All endpoints MUST send keepalives for each data session. These keepalives serve the purpose of keeping NAT bindings alive for the data session.
所有端点必须为每个数据会话发送保活消息。 这些保活服务的目的是使 NAT 绑定在数据会话中保持活动状态。

The keepalives SHOULD be sent using a format that is supported by its peer. ICE endpoints allow for STUN-based keepalives for UDP streams, and as such, STUN keepalives MUST be used when an ICE agent is a full ICE implementation and is communicating with a peer that supports ICE (lite or full).
应该使用其对等方支持的格式发送保活。 ICE 端点允许对 UDP 流使用基于 STUN 的保活,因此,当 ICE 代理是完整的 ICE 实现并且正在与支持 ICE(精简或完整)的对等方通信时,必须使用 STUN 保活。

An agent MUST send a keepalive on each candidate pair that is used for sending data if no packet has been sent on that pair in the last Tr seconds.
如果在最后 Tr 秒内没有在该对上发送数据包,则代理必须在每个用于发送数据的候选对上发送一个 keepalive。

Agents SHOULD use a Tr value of 15 seconds. Agents MAY use a bigger value but MUST NOT use a value smaller than 15 seconds.
代理应该使用 15 秒的 Tr 值。 代理可以使用更大的值,但不得使用小于 15 秒的值。

Once selected pairs have been produced for a data stream, keepalives are only sent on those pairs.
一旦为数据流生成了选定的对,则仅在这些对上发送保活。

An agent MUST stop sending keepalives on a data stream if the data stream is removed.
如果数据流被删除,代理必须停止在数据流上发送保活。

If the ICE session is terminated, an agent MUST stop sending keepalives on all data streams.
如果 ICE 会话终止,代理必须停止在所有数据流上发送保活。

An agent MAY use another value for Tr, e.g., based on configuration or network/NAT characteristics.
代理可以为 Tr 使用另一个值,例如,基于配置或网络/NAT 特性。

For example, if an agent has a dynamic way to discover the binding lifetimes of the intervening NATs, it can use that value to determine Tr.
例如,如果代理有一种动态方式来发现介入 NAT 的绑定生命周期,它可以使用该值来确定 Tr。

Administrators deploying ICE in more controlled networking environments SHOULD set Tr to the longest duration possible in their environment.
在更受控制的网络环境中部署 ICE 的管理员应该将 Tr 设置为其环境中可能的最长持续时间。

When STUN is being used for keepalives, a STUN Binding Indication is used [RFC5389].
当 STUN 用于保活时,使用 STUN 绑定指示 [RFC5389]。

The Indication MUST NOT utilize any authentication mechanism.
指示不得使用任何认证机制。

It SHOULD contain the FINGERPRINT attribute to aid in demultiplexing, but it SHOULD NOT contain any other attributes. It is used solely to keep the NAT bindings alive.
它应该包含 FINGERPRINT 属性以帮助解复用,但它不应该包含任何其他属性。它仅用于保持 NAT 绑定活动。

The Binding Indication is sent using the same local and remote candidates that are being used for data. Though Binding Indications are used forkeepalives, an agent MUST be prepared to receive a connectivity check as well.
使用用于数据的相同本地和远程候选者发送绑定指示。虽然绑定指示用于keepalives,代理也必须准备好接收连接检查。

If a connectivity check is received, a response is generated as discussed in [RFC5389], but there is no impact on ICE processing otherwise.
如果接收到连通性检查,则会按照 [RFC5389] 中的讨论生成响应,但不会对 ICE 处理产生影响。

Agents MUST by default use STUN keepalives. Individual ICE usages and ICE extensions MAY specify usage-/extension-specific keepalives.
默认情况下,代理必须使用 STUN 保活。个别 ICE 使用和 ICE 扩展可以指定使用/扩展特定的保活。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值