传输层上有两个重要协议,一个无连接的UDP协议和一个面向连接的TCP协议.两种协议各有特点和优势,可以用于不同环境的应用.本文通过NS-2对TCP和UDP的性能参数进行了详细的对比和分析,得到如下结论:UDP更适合于对传输延迟敏感的应用,TCP则适合于对可靠性具有高要求的应用.
There are two important protocols in the transport layer. One is connectionless UDP, and the other is connection-oriented TCP. Due to different characteristics and advantages, these two protocols are suitable for dif-ferent applications. Therefore, this paper uses NS-2 to evaluate these two protocols and compares their perfor-mance parameters. Based on the data results, it can be seen that UDP is suitable for the delay-sensitive applica-tions and that TCP is suitable for reliable applications.