Professional Documents
Culture Documents
04 单位代号 10183
密 级 公 开 研究生学号 2005522074
吉 林 大 学 硕 士 学 位 论 文
SCTP 主路径自动切换的研究
The Research on Auto-handoff for the SCTP Primary Path
作者姓名 胡文静
专 业 通信与信息系统
导 师
职 称 李 玲 副教授
学位类别 : 工学硕士
论文起止年月 2006 年 3 月至 2007 年 4 月 www.docin.comwww.docin.com 吉林大学硕士学位论文原创性
声明
本人郑重声明所呈交的硕士学位论文是本人在指导教
师的指导下独立进行研究工作所取得的成果。除文中已经注明
引用的内容外本论文不包含任何其他个人或集体已经发表或撰
写过的作品成果。对本文的研究做出重要贡献的个人和集体均
已在文中以明确方式标明。本人完全意识到本声明的法律结果由
本人承担。
学位论文作者签名
日期 年 月 日 www.docin.comwww.docin.com 《中国优秀博硕士学位论文全文数据库》投稿
声明 研究生院
本人同意《中国优秀博硕士学位论文全文数据库》出版章程
的内容愿意将本人的学位论文委托研究生院向中国学术期刊
光盘版电子杂志社的《中国优秀博硕士学位论文全文数据库》
投稿希望《中国优秀博硕士学位论文全文数据库》给予出版
并同意在《中国博硕士学位论文评价数据库》和 CNKI 系列数据
库中使用同意按章程规定享受相关权益。
论文级别□硕士 □博士
学科专业 通信与信息系统
论文题目 SCTP 主路径自动切换的研究
作者签名 指导教师签名
年 月 日
作者联系地址邮编 吉林长春南湖大路 5372 号吉林大学
南湖校区5 公寓 201 寝 130012
作者联系电话13596428442www.docin.comwww.docin.com
作者姓名
胡文静 论文分类号 TN915.04
保密级别 公开 研究生学号 2005522074
学位类别 工学硕士
授予学位单
位
吉 林 大 学
专业名称 通信与信息系统
培养单位
院、所、中
心
通信工程学院
研究方向 宽带通信 学习时间
2005 年 9 月
至 2007 年 6 月
论文中文题目 SCTP 主路径自动切换的研究
论文英文题目 The Research on Auto-handoff
for the SCTP Primary Path 关键词 SCTP NS 主路径 自动切换
姓 名 李玲 职称 副教授
导师情况
学历学位 硕士 工作单位
吉林大学
通信工程学院
论文提交日期 2007 年 4 月 23 日答辩日期 2007 年 6 月 9 日
是否基金资助项
目
否 基金类别及编号
如已经出版请填写以下内容
出版地城
市名、省名
出版者机构名
称
出版日期
出版者地址包括邮
编
www.docin.comwww.docin.com 内容提要 SCTP 被预言为取代 TCP 的传输层协议。本文针对当 SCTP
主路径性能恶化时即主路径时延大于辅助路径时延时数据仍
在恶劣的主路径上传输这一问题提出主路径自动切换 3 种递进
改进方案。在 NS 环境下修改 SCTP 的 C++代码实现 3 种方
案方案一基本主路径自动切换方案二避免多余重传方
案三扩展初始拥塞窗口。进而仿真得出数据。通过数据拟合
得到改进后协议的传输速率的提高模型。实现主路径自动切换的
SCTP 相对于未改进的 SCTP在路径发生切换后传输速率提
高模型是 %
100]1)3[(×−−=tTBη
其中 B 是新旧路径的带宽比T 是切换周期t 是以切换时
刻为开始的一段时间。
实现主路径自动切换的 SCTP 及其速率提高模型必将对
SCTP 的理论研究以及应用具有一定推动作用。 关键字SCTPNS,主路径自动切换
www.docin.comwww.docin.com 目录
i 目 录
第一章 绪论...................................1 1.1 SCTP 发展背
景..........................................1 1.2 国内外研究动
态.........................................2 1.3 本文的贡献及意
义.......................................2 1.4 本文结
构...............................................3 第二章 SCTP 概
述..............................5 2.1 SCTP 主要特
性..........................................5 2.2 SCTP 分组格
式.........................................13 2.3 数据传
输..............................................17 2.4 本章小
结..............................................22 第三章 网络仿真工具
NS......................23 3.1 NS 介
绍...............................................23 3.2 TCL 脚本编写规
则......................................28 3.3 NS 中的 SCTP 代理
(Agent)...............................30 3.4 搭建 SCTP 传输网
络.....................................34 3.5 NS 的安装与编
译.......................................39 3.6 本章小
结..............................................40 第四章 SCTP 的 C++代码分
析....................41 4.1
Recv()................................................41 4.2
ProcessChunk()........................................41 4.3
ProcessDataChunk()....................................43 4.4
UpdateRecvTsnBlocks().................................45 4.5
ProcessSackChunk()....................................48 4.6 本章小
结..............................................48 第五章 基本主路径自动切换方
案................49 www.docin.com 吉林大学硕士学位论文
ii5.1 方案一基本主路径自动切换机制........................49 5.2 NS 仿真实
现...........................................53 5.3 路径切换的特
点........................................55 5.4 基本主路径自动切换结
论................................58 5.5 本章小
结..............................................58 第六章 进一步改进方
案........................61 6.1 方案二避免多余重传机
制..............................61 6.2 方案三扩展初始拥塞窗口机
制..........................68 6.3 本章小
结..............................................72 第七章 传输速率提高模
型......................73 7.1 四种方案比
较..........................................73 7.2 速率提高模
型..........................................75 7.3 本章小
结..............................................77 第八章 结
论..................................79 参考文
献....................................81 摘要 .......................................
I Abstract......................................V 致谢 www.docin.com 第一章 绪论
1 第一章 绪论 1.1 SCTP 发展背景 因特网和电信网曾经一度是两个独立的网络它们提供不同的业务。
因特网的爆炸式发展和人们的对电信业务的更多需求驱动着两大网络的
融合。IP 技术的飞速发展促使网络融合朝着以 IP 为基础的分组网方向
发展。然而电信网中的电路交换到分组交换将是一个长期的渐进过渡的
过程。在这过渡过程中以电路交换为基础的网络和以分组交换为基础的
网络之间的通信首先要求信令能够互联互通。只有实现了信令的互连互
通才会促进电信网和分组网的最终统一。
基于互联互通的需要IETF 在 1998 年正式成立了一个新的工作组
信令传送工作组(SIGTRAN)主要负责设计与制定 IP 网上传送的 PSTN
信令的标准与协议。而 SS7 就是 PSTN 的信令。
SS7 网和 IP 网的信令互通要求保留原有的 SS7 网和 IP 网的协议栈并在
此基础上使得 IP 网即能传送语音流又能传送 SS7 信令。为此SIGTRAN 的
第一步工作就是产生报告文档 RFC2719[1]指明在 IP 上传输电话信令所需的
功能和性能需求[2]还阐述了信令消息对丢失率、延时以及安全性等方面
的要求同时给出了信令互通的体系结构。后来 Randall Stewart 和 Xiaobing
Xie 提交的多网络数据报传输协议[3](MDTP)获得一致好评。接着 MDTP 演变
到 SCTP[4](Stream Control Transport Protocol)不仅仅名称发生改变协议内容变动也很大。相对
于 MDTP, SCTP 完全改变了协议数据报头和内部的
数据结构采用 Cookie 机制来有效抵御伪攻击数据传送过程中使用了
TCP[5]的拥塞控制策略。另外在消息绑定、数据分段等方面也作了很大的
修改。2000 年 1 月SIGTRAN[6]对 SCTP 再次作了一个很大的变动直接修
改协议栈使 SCTP 直接运行于 IP 层上这意味着 SCTP 从此可以在操作系
统内核中实现。经过不断的研究SIG- TRAN 工作组在 2000 年 10 月正式发
布 RFC2960详细阐述了 SCTP 这个新的传输协议。
新诞生的 SCTP 集合了 TCP、UDP[7]的优点克服了 TCP 固有的队头阻
塞、Dos[8]攻击另外新增了许多功能如多流[9]、多宿[9]、面向消息传输、
Cookie 安全机制[10]动态地址重配置[11]、部分可靠传输[12]、支持移动 IP[13]等等。不但满足了在分组
网上传输信令的要求而且成为了通用的传输层
协议能提供更好的多媒体传输服务移动环境下端到端的高效服务。 www.docin.com 吉林大学硕士学位论文
2SCTP 被业界称为超级 TCP在下一代网络中很有可能取代当前流行
的 TCP。 1.2 国内外研究动态 SCTP 是新诞生的协议协议的功能不断的增加性能不断的增强。
目前主要是在网络模拟中研究也有一些公司、大学、组织搭建了 SCTP
实验网。
国外的研究侧重于起草标准。定义 SCTP 负荷分担草案(多路径同时
传输)[14]制定部分可靠传输标准提交建立 SCTP 偶联后的动态地址重
配置提交 SCTP API 草案[15]定义 SCTP 对移动 IP 的支持提交单播拥塞控制建议标准 TCP 友好可变速率
控制等等。其中特拉华大学的协议
工程实验室[16](PEL)受美国军方(ARL美国陆军研究实验室)的资助重
点研究 SCTP 在移动网络和 Ad hoc[17]网上的应用包括军事应用。除了 PEL国外主要研究机构有思科、
SUN、诺基亚等。
国内的研究侧重于应用。SCTP 与 TCP 的比较[18]SCTP 在移动环境
下的性能研究(比如平滑切换[19]移动 IP[20]最后一跳性能恶化问题[21]基于 SCTP 移动 Internet 传输
模型[22]等)基于独立路径拥塞控制的 SCTP 负荷分担机制研究[23]结合 SS7 的研究[24]SCTP 的安全问
题军事应用[25]等等。国内研究在广度上逐渐跟上国际步伐但在深度上权威性方面还有一定距离。国内在
这方面研究比较多的机构有北京邮电大学、南京
邮电大学、华为、中兴等。 1.3 本文的贡献及意义 本文提出 3 个递进方案。
由于 SCTP 的多宿特性(即终端有多个 IP 地址)一个偶联(类似 TCP
连接)可以拥有多条传输路径。SCTP 规定在传输过程中只用一条主路径
进行传输数据其他路径作为替补除非主路径故障否则一直都使用主
路径传输数据。而偶联建立过程中主路径的选择带有一定的盲目性不
一定是最优路径而且最优路径很有可能随着时间的变化在这多条路径
中不断变化的。
本文针对主路径并非时延最小的问题提出主路径自动切换到时延最
小的路径的机制即基本主路径自动切换机制记为方案一。
在路径切换阶段新、旧路径是同时传输数据的。因为新路径时延低www.docin.com 第一章 绪论
3 旧路径时延大必将导致后发的数据先到收端。如此收端发现数据失序
认为数据丢失并通知发端。发端收到四次失序报告就会重发该数据块。
实际上数据没有丢失只是晚到。所以这些块重发都是多余的。
因此在方案一的基础上针对多余重传问题提出在切换周期内避
免多余重传机制记为方案二。
在方案二中新路径一开始的传输速率较低其原因是拥塞窗口小。
SCTP 规定新路径的初始窗口为 2SMSS(Sender Maximum Segment Size)
而旧路径上的拥塞窗口经历了慢启动阶段后快速增大旧路径的拥塞窗口
比新路径的初始拥塞窗口大一个数量级及以上。因为所有传输路径目的终
端相同又处于同一时间段各条路径具有一定的相关性所以各条路径
的拥塞窗口在一定程度上可以相互借鉴。
因此在方案二的基础上针对路径切换阶段初始拥塞窗口太小的问
题提出将新主路径初始拥塞窗口增至旧主路径拥塞窗口的一半即扩展
初始拥塞窗口机制。这种机制既扩大了拥塞窗口又起到了拥塞控制的作
用比较合理。此记为方案三。
方案三是最优的方案。方案三是完整的主路径自动切换。
最后根据方案三采取大量样值数据通过数据处理并拟合得到
实现主路径自动切换的 SCTP 的传输速率提高模型。
实现主路径自动切换增强了 SCTP 的传输性能增强了 SCTP 的应
用价值促进了 SCTP 的发展。提出速率提高模型推进了 SCTP 的学术
研究为后续研究打下基础。 1.4 本文结构 第二章介绍了 SCTP 协议机制及 SCTP 的核心特点例如多流、多
宿、
安全 3 个本质特性。
第三章介绍了网络模拟(NS)软件SCTP 代理特有命令集NS 下的
SCTP 脚本编写规则本文仿真实验脚本以及网络模拟过程中需要注意的
问题。
第四章分析了 2.30 版 NS 自带的 SCTP 的 C++代码主要是数据传输
和接收这部分函数。
第五章设计并实现了 SCTP 的改进方案一基本主路径自动切换机
制得到仿真数据并进行相应分析。 www.docin.com 吉林大学硕士学位论文
4 第六章针对基本主路径自动切换所存在的多余重传和新路径初始拥
塞窗口太小问题进一步提出方案二和方案三避免多余重传机制和扩展
初始窗口机制。通过仿真实现设计内容得到相关数据进而比较优劣。
得出方案三传输速率最快的结论。
第七章比较了 3 种改进方案给出在路径发生切换后主路径自动切
换的 SCTP 相对于未改进 SCTP 的速率提高模型并通过数据初步验证模
型的合理性。
第八章总结全文所做工作。 www.docin.com 第二章 SCTP 概述
5 第二章 SCTP 概述 2.1 SCTP 主要特性 如图 2-1 所示SCTP 位于 SCTP 用户和 IP 网络层之间类似于
TCP、
UDP是传输层协议是面向连接的可靠传输协议。
# 创建模拟对象
set ns [new Simulator]
#创建 nam 文件
set nf [open sctp.nam w]
$ns namtrace-all $nf
#设置路径变量
set PERL "/usr/bin/perl"
set USERHOME "/home/ns2302"
set NSHOME "$USERHOME/ns-allinone-2.30"
set XGRAPH "$NSHOME/bin/xgraph"
set SETFID "$NSHOME/ns-2.30/bin/set_flow_id" www.docin.com 第三章 网络仿真工具NS
35 set RAW2XG_SCTP "$NSHOME/ns-2.30/bin/raw2xg-sctp"
set GETRC "$NSHOME/ns-2.30/bin/getrc"
#清空缓存关闭 nam、trace 文件
$ns flush-trace
close $nf
close $allchan
#画出偶联发送数据包与时间的关系图
exec $PERL $SETFID -s all.tr | \
$PERL $RAW2XG_SCTP -A -q -t all > temp.rands
exec $XGRAPH -bb -tk -m -x time -y packets temp.rands &
#执行 nam 动画
exec nam sctp.nam &
exit 0
}
#设置多宿节点 0
set host0_core [$ns node]
set host0_if0 [$ns node]
set host0_if1 [$ns node]
$host0_core color Red
$host0_if0 color Red www.docin.com 吉林大学硕士学位论文
36$host0_if1 color Red
$ns multihome-add-interface $host0_core $host0_if0
$ns multihome-add-interface $host0_core $host0_if1
#设置多宿节点 1
set host1_core [$ns node]
set host1_if0 [$ns node]
set host1_if1 [$ns node]
$host1_core color Blue
$host1_if0 color Blue
$host1_if1 color Blue
$ns multihome-add-interface $host1_core $host1_if0
$ns multihome-add-interface $host1_core $host1_if1
#在关联建立前设置主传输地址
$sctp0 set-primary-destination $host1_if0
#开始模拟
$ns run
上面这个脚本文件是后面几章研究 SCTP 主路径自动切换的脚本文
件。所有的仿真实验都用到此脚本(除了改变 finish其它都一样)。需要特
别注意的有两点
1) 设置多宿节点
NS 刚诞生的时候没有多宿节点的概念设置多宿节点命令是后来增
加的。它要求先创建多个节点然后选中某一节点为核心节点再通过命
令把其它接口节点一一绑定到核心节点上。其中真正发送数据的是接口节
点而非核心节点。
2) 更改路径的时延、带宽
更改路径时延、带宽不能采用嵌套的方式比如
$ns at 5.0 “$ns duplex-link $host0_if0 $host1_if0 5Mb 50ms DropTail”
这种方式看似可以但实际根本没有改变路径时延、带宽。经过进一
步研究发现应按下面方式设置。
set link1 [$ns link $host0_if0 $host1_if0] #调用了方法 link 获得了一条
#特定的从 host0_if0 到
#host1_if0 的链路。
set dlink [$link1 link] #通过 link 获取 link1 的延时
#链路句柄 dlink只有获得了
#这个句柄才能更改链路带
#宽时延。
在 NS 里从 host0_if0 到 host1_if0 的链路和从 host1_if0 到 host0_if0
的链路是不同的。要使得往返时延、带宽同时变化需要同时设置 host0_if0
到 host1_if0 与 host1_if0 到 host0_if0 的时延、带宽。然后采用如下语句就
能更改时延、带宽了。
$ns at 5.00 "$dlink set bandwidth_ 1M " www.docin.com 第三章 网络仿真工具NS
39 $ns at 5.00 "$dlink set delay_ 200ms"
$ns at 5.00 "$dlink2 set bandwidth_ 1M "
$ns at 5.00 "$dlink2 set delay_ 200ms"
该脚本文件的内容是创建一个发端一个收端发端发送 FTP 数据。
发端与收端之间有两条路径。这两条路径的初始带宽都是 5M时延都是
50ms。主路径是 host0_if0 到 host1_if0 的 if0 路径。在 5.0 秒时刻host0_if0
到 host1_if0 的 if0 路径传输性能恶化带宽降为 1M时延变为 200ms。
如果 SCTP 没有主路径自动切换功能那么在 5.0 秒之后主路径还
是传输性能恶化的 if0 路径显然传输速率没很好的发挥。
如果 SCTP 具备了主路径自动切换功能那么经过一次心跳之后提
取了辅助路径 if1 的 RTT 值发现辅助路径的时延比当前主路径 if0 小
SCTP 就把主路径切换到路径 if1 上路径 if1 变成了主路径而 if0 变为了
辅助路径。这样 SCTP 充分发挥了最佳传输速率。 3.5 NS 的安装与编译 3.5.1 安装 NS
本文选用 ns-2.30[45]版本的 NS安装在 Linux 系统下。 1) 下载 ns-allinone-2.30.tar.gz.
2) 解压缩 tar xzvf ns-allinone-2.30.tar.gz
3) 进入 ns-allinone-2.30 文件夹执行 ./install
4) 安装结束后根据安装结果提示在当前用户的.bashrc 文件下修改
3 个环境变量PATH、LD_LIBRARY_PATH 和 TCL_LIBRARY
5) 注销用户再登录用户环境变量读入内存NS 就可以执行了。
3.5.2 编译 NS
SCTP 主路径自动切换研究需要修改 C++代码。修改之后需要重新编
译 NS。在 ns-2.30 路径下进行编译编译的步骤是
make clean #删除原先 NS 里所有的旧的目标文件、可执行文件
make #重新编译 www.docin.com 吉林大学硕士学位论文
40 先执行 make clean 是为了更彻底的编译。
Linux 系统下有一个很好的调试工具gdb。它能满足开发人员对代码
调试的需求。gdb 也能调试 NS但是需要在 makefile 文件里添加-g 参数。
3.3.2 节里讲到 debugMask_和 debugFileIndex_两个变量打开调试信
息功能的前提是 makefile 文件里添加-DDEBUG 参数。
这两个参数都是在 makefile 文件里的 CCOPT=Wall 后添加。修改之
后应是
CCOPT = -Wall -g -DDEBUG
然后重新编译。
注意当在 makefile 文件的 CCOPT 行中加上DDEBUG 参数后重
新编译时系统会提示在 ns-2.30 文件夹下 mobil1e 文件夹的某一文件出错。
因为该文件和 SCTP 模拟没有关系直接把那文件的错误行注释掉再编
译就成功了。 3.6 本章小结 本章介绍了 NS 分裂对象模型特性与构成并讲解了在 NS 环境下仿真
实验的两个层次。探讨了 NS 中的 SCTP 代理的特点、变量、命令并编
写了第五、六、七章所用的 SCTP 传输网络的脚本文件。最后介绍如何安
装、编译 NS 及需要注意的地方比如为了能够打开 SCTP 的调试信息
需要在 makefile 文件 CCOPT 这一行添加-DDEBUG 参数。 www.docin.com 第四章 SCTP 的 C++代码分析
41 第四章 SCTP 的 C++代码分析 本章分析 SCTP 的 C++代码。分析代码首先需要对 SCTP 协议深入了
解其次要学会使用工具[46]。浏览代码可以用 SourceInsight此软件能方便快捷地找到变量、函数的声明
和定义。然后使用调试工具如 gdb认
识代码的执行过程。SCTP 代码本身带了很多调试信息这对快速理解代
码非常有帮助。在脚本文件中只要把调试信息开关全打开那么在脚本
执行过程中NS 把所调用的每一个 SCTP 的函数及其关键变量按时间顺序
输出到某一文件。我们称此为 SCTP 调试信息。这些 SCTP 调试信息静态
地反映了函数的执行过程让开发者从单步调试中解放出来有更多的精
力研究核心问题。
SCTP 主路径自动切换是数据传输过程中的问题。下面着重分析几个
重要函数来展现 SCTP 的数据传输过程。 4.1 Recv() Recv()是 SCTP 的接收函数其在 SCTP 数据传输
中起到很大的作用
甚至可以部分反映 SCTP 传输的特点。这一节介绍 Recv()函数。
Recv()对一个 ip 包进行处理。首先剥去 ip 包头信息提取数据部分
这些数据就是 SCTP 的数据块或者控制块。Recv()的流程图如图 4-1 所示。 4.2 ProcessChunk()
ProcessChunk()处理拆分好的块(Chunk)在 recv()中已经将 ip 包中
的数据拆分成 SCTP 定义的 Chunk 类型根据 chunk 类型的不同调用相
应的函数进行处理。
调用相应的函数处理不同类型 Chunk 前之前需要判断 SCTP 处于什
么状态。SCTP 有 9 个状态CLOSED、COOKIE_WAIT、COOKIE_ECHOED、
ESTABLISHED、UNINITIALIZED、SHUTDOWN_ SENT、SHUTDOWN_
RECEIVED、SHUTDOWN_ACK_SENT、SHUT- DOWN_PENDING.。2.30
版的 NS 实现了建立偶联的状态机而没有实现关闭关联的状态机。图 4-2
是 ProcessChunk()处理各种状态下的流程图。 www.docin.com 吉林大学硕士学位论文
42
图 4-1 Recv()流程图 9 个状态中ESTABLISHED 状态在数据传输中最重要的。下面分析 www.docin.com 第
四章 SCTP 的 C++代码分析
43 ESTABLISHED 状态下的数据块处理。在此状态下ProcessChunk()块能处
理 DATA、SACK、FORWARD_TSN、HEARTBEAT、HEARTBEAT_ACK
等等数据块如其流程图如图 4-3 所示。 查看关联状态 eState 值调用
SCTP_STATE_COOKIE_ECHOED
状态处理模块
调用
SCTP_STATE_COOKIE_WAIT
状态处理模块
调用
SCTP_STATE_CLOSED
状态处理模块
调用
SCTP_STATE_ESTABLISHED
状态处理模块
返回准备发送的数据的大小开始
结束
图 4-2 在不同状态下 ProcessChunk()处理流程图 4.3 ProcessDataChunk() 如果接收到的是 Data
Chunk那么 ProcessChunk()调用 ProcessData-
Chunk()。ProcessDataChunk()流程图如图 4-4 所示。此函数先更新所接收到
的最高 TSN再为发送 SACK 更新 Block 与累积证实值如果数据要求有
序则先排序后再递交到高层用户否则直接递交到高层用户。 www.docin.com 吉林大学硕士学位论文
44 查看 chunk 的类型
处理延时 SACK 消息
调用
ProcessDataChunk()
收到的 TSN 块
列表长度大于 0
iDataPktCountSince-
LastSack = 0
opSackGenTimer-
>force_cancel();
eSackChunkNeeded
=TRUE
是
否
调用 ProcessSack-
Chunk()
uiAdvancedPeerAckPoint
> uiCumAckPoint
eSendNewData-
Chunks=TRUE
eForwardTsn-
Needed=TRUE
调用 ProcessForward-
TsnChunk()
生成 SCTP_CHUNK-
_HB_ACK 消息
加上 HB 相关信息
更新下一个 chunk
的位置
调用 ProcessHeartbeat-
AckChunk()
输出这是当前
不能处理的类型
输出这是当前
不能处理的类型
调用
ProcessCookie-
EchoChunk()
生成
SCTP_CHUNK_
COOKIE_ACK
更新下一个 chunk
的位置
输出这是当前
不能处理的类型
调用 Process-
OptionChunk()
是
否
结束
开始图 4-3 在 ESTABLISHED 状态下ProcessChunk()处理流程图
关键词SCTPNS主路径自动切换 www.docin.comwww.docin.comAbstract
V Abstract SCTP(Stream Control Transmission Protocol) is a transport layer protocol
established in 2000. In order to promote the integration of the three networks
and transmit the no.7 signaling in Internet, SIGTRAN constitutes SCTP. Then
IETF extends it to general transport layer protocol. SCTP is called super TCP,
which is expected to replace TCP. SCTP not only solves some intrinsic
problems of TCP, such as head-of-line blocking and denial of service, but also
adds other powerful functions, such as multi-homed, multi-streams, and
dynamic address reconfiguration.
When the performance of the SCTP primary path degrades, that is, the
delay-time of the primary path is longer than that of the assistant path, the data
are still transmitted in the primary path. Aimed at the problem, the paper
presents three step-by-step modified schemes to automatically switch the
primary path. On NS, the 3 schemes are realized and the simulation results are
obtained by modifying the C++ source code of SCTP. Scheme1 is a basic
auto-handoff for SCTP primary path; the redundant re-transmission is avoided
on scheme2 and the initial congestion window is expanded on scheme3. The
comparison between unmodified SCTP and modified SCTP was made and then
the model of transmission speed rate-increased is obtained.
Nowadays, there is a lack of the relative paper in this field. Therefore,
modified SCTP and the model of trans-mission speed rate-increased will
accelerate the academic research and applications.
Because of the multi-homed characteristic of SCTP (that is, one endpoint
has many ip addresses), an association (similar to a TCP connection) can have
many transmission paths. According to SCTP, there is only one primary path to
transmit data in the process of transmission, and other paths are on standby. The
primary path is always used to transmit data unless it’s failure. But in the
process of establishing an association, the choice of a primary path is a bit
blind,
so maybe it’s not the best path. What’s more the best path may switch in the
paths again and again.
Aimed at solving the problem that the delay-time of the primary path is not
the shortest, the scheme is put forward, and it can automatically switch the
primary path to the path with the shortest delay-time, which is marked as
www.docin.com 吉林大学硕士学位论文
VIscheme1.
The basic auto-handoff for the SCTP primary path is based on the specific
heartbeat mechanism of SCTP, which means the sender of SCTP sends the
Heart-beat Chunk in each transmission path at regular intervals and the receiver
sends back the Heartbeat-ACK Chunk as soon as it receives the Heartbeat
Chunk. When the sender receives the Heartbeat-ACK Chunk, SCTP can get the
RTT of the path. Comparing the RTT of each path, the primary path is switched
to the path with shortest RTT.
In the process of switching paths, the new path and the former one are
transmitting data simultaneously. The delay-time of the new path is shorter than
the former one, so the data sent later will reach the receiver earlier. Then the
receiver finds that the data is out-of-order, thinks some data are missed and
reports the situation to the sender. If the sender receives four out-of-order
reports, the sender will re-transmit. In fact, the data isn’t missed but arrives
later.
So the data which are re-transmitted are redundant.
Based on scheme1, the avoiding redundant re-trans- mission is put forward,
which is marked as scheme2.
If the sender receives one missing report, iNumMissingReports will add one.
If iNumMissingReports =4, SCTP will re-transmit. Redundant re-transmission
is avoided by avoiding iNumMissingReports adding one in the handoff period.
Here are the steps:
1: Define the redundant re-transmission chunk. All redundant
re-transmission chunks have been put into the transmission cache of the former
path. The TSN of chunks of the former path is smaller than one of first chunk of
the new path. It is named remaining data chunks of the former path.
2: Define the handoff period. The handoff period starts when the first data
chunk is transmitted in the new path and ends when all remaining data chunks
of former path have been transmitted and acknowledged. It is the period that
data are transmitted in both the new path and the former path simultaneously.
On scheme2, since the congestion window is small, the transmission speed
of the new path is low. SCTP rules the initial window of the new path as
2SMSS, however, the congestion window of former path is large(one decade
times or more) after the period of slow start. In addition, since all the paths
have
the same destination endpoint in the same period, and they are correlated, the
www.docin.comAbstract
VII congestion windows of all the paths can be reference for each other in part.
When the path is switching, the initial window of the new path broadens to the
half size of the congestion windows of the former one, the transmission speed
definitely increases.
Based on scheme2, the initial window of the new path is broadened to the
half size of the congestion windows of the former path, which is marked as
scheme3.
The NS of edition 2.30 was applied in our simulation.A SCTP transmission
network is construsted. The network has two endpoints. Between the two
endpoints, there are two transmission paths. At first, the bandwidth of each path
is 5M, and the delay-time is 50ms. SCTP establishes an association 0.5 second
later and starts to transmit data. At the 5th second the performance of the
primary path degrades, the bandwidth narrows to 1M and the delay-time
changes to 200ms. At the 8th second the transmission finishes. The same script
file are executed on scheme0(unmodified SCTP), scheme1, scheme2, and
scheme3 and the related data is got. On scheme0 the transmission is in a path
whose performance degrades but not failure. On scheme1, scheme2, and
scheme3 all the primary paths are automatically switched at the 5.99th second,
and then the transmission is in the new path whose delay-time is short. The
5.99th second is decided by the time when the sender receives the
Heartbeat-ACK in the assistant path.
According to the simulation data on NS, the relation of the number of
packets to time on the four schemes is got, which increases step-by-step.
Because the transmission time is same, the transmission speed increases
step-by-step.
Scheme1 is better than the scheme0, but the number of packets is the same
to scheme0 in a long time. This is because there is redundant re-transmission on
scheme1. Scheme2 avoids the redundant re-transmission, but the transmission
is intermittent at the beginning of handoff. This is because the congestion
window of the new path is too small. Scheme3 broadens the initial congestion
window, so the number of packets increases more. Scheme3 is the best.
Scheme3 realizes the auto-handoff for the primary path, and its transmission
speed is the highest, so it is significant to get the model of transmission speed
rate-increased.
By changing the end time of transmission, a lot of sampling data is got, after
www.docin.com 吉林大学硕士学位论文
VIIIprocessing the sampling data. The model of transmission speed rate-increased
is
constructed through analyzing the sampling data.
We can forecast the degree of the speed increased at any time after the
auto-handoff for the primary path by the model.
Modified SCTP and the model of transmission speed rate-increased will
accelerate academic research and practical applications.
www.docin.com