文档介绍:华中科技大学
硕士学位论文
一种利用TURN穿越对称型NAT方案的设计与实现
姓名:闵江
申请学位级别:硕士
专业:通信与信息系统
指导教师:杜旭
20080528
华中科技大学硕士学位论文
摘要
为了在 IPv6 广泛投入使用之前缓解 IPv4 地址空间短缺的问题,NAT 技术被提
出。一些标准的应用协议和通用标准协议,同 NAT 配合工作得很好。然而有些服务
依赖于端到端的数据包,例如 SIP 消息体中包含后继的 RTP 媒体流互通所需要的 IP
以及端口信息,这样就会使得使用 SIP 作为信令传输的网络应用程序在经过 NAT 后
无法正常工作。因此,对于 NAT 的穿越是迫切需要解决的问题。
而现有的几种穿越方式都有其局限性。如 ALG 方式要求现有的 NAT 设备需升
级支持相应协议,STUN 则无法穿越对称型 NAT。关于对称型 NAT 的穿越,业界既
无标准协议可循也没有成熟的技术可供参考,这使得对对称型 NAT 的穿越,成为当
今的一个难点。
本文针对在 IP 上承载语音和视频的协议的控制通道/媒体通道无法穿越对称
NAT 与公网进行互通的问题,设计并完成对称 NAT 的一种穿越方式,主要使用 TURN
技术。利用 TURN 服务器的中转,TURN 客户端穿越对称 NAT,与外部主机进行正
常通信。另外,本文更提出了一种将 STUN 方式与 TURN 方式相结合的 NAT 穿越方
案,既解决了所有类型 NAT(包括对称型 NAT)的穿越问题,又降低了 TURN 服务
器的负荷,同时也无需 NAT 的任何修改。与传统穿越技术相比,其最大的特点是不
仅可以穿越一般类型的 NAT,而且可以穿越安全系数很高的对称性的 NAT。该方案
已成功应用于基于嵌入式 Linux 平台的 Vo I P 网关中。
关键词:网络地址转换; 对称型 NAT; TURN; 基于 IP 的语音; 会话初始协议
I
华中科技大学硕士学位论文
Abstract
In order to resolve the problem of the shortage of IPv4 addresses before IPv6 widely
used, NAT technology has been proposed. Some standard application protocols work
well with NAT. However, some end-to-end services rely on data packets, such as SIP in
which the message body contains the IP and port information needed by the following
RTP media stream. This will cause work application programs using SIP as the
signaling not to work properly. Therefore, the NAT traversing problem is the one which
needs to be solved urgently.
There exists several NAT traversing methods, but each has its limitation. For example,
ALG requires that the existing NAT equipments must support the corresponding software
update. The STUN method can not traverse symmetric NAT. For the traversing of
symmetric NAT, there are neither standard protocols nor mature technologies. This makes
the traversing of symmetric NAT to be a difficult today.
The control/media channel carrying voice/video protocols based on IP faces the
challenge in traversing symmetric NAT. This issue deals with this problem, and introd