TCP/IP的五层层次模型【转】

TCP/IP层次模型共分为五层:应用层HTTP、传输层TCP、网络层IP、数据链路层Data-link、物理层physical。

》应用层—应用层是所有用户所面向的应用程序的统称。ICP/IP协议族在这一层面有着很多协议来支持不同的应用,如我们进行万维网(WWW)访问用到了HTTP协议、文件传输用FTP协议、电子邮件发送用SMTP、域名的解析用DNS协议、 远程登录用Telnet协议等等,都是属于TCP/IP应用层的.

》传输层—这一层的的功能主要是提供应用程序间的通信,TCP/IP协议族在这一层的协议有TCP和UDP。

?网络层—是TCP/IP协议族中非常关键的一层,主要定义了IP地址格式,从而能够使得不同应用类型的数据在Internet上通畅地传输,IP协议就是一个网络层协议。

》网络接口层(数据链路层)—这是TCP/IP软件的最低层,负责接收IP数据包并通过网络发送之,或者从网络上接收物理帧,抽出IP数据报,交给IP层。

OSI(Open Systems Interconnection Reference Model)的7层从上到下分别是
7 应用层
Application 6 表示层 Presentation 5 会话层 Session 4 传输层 Transport 3 网络层 Network 2 数据链路层 Data-link 1 物理层 Physical

Application layer Handles information transfer between two network applications, including functions such as security checks, identification of the participating machines, and initiation of the data exchange.

Presentation layer Handles data formatting, including issues such as whether lines end in carriage return/line feed (CR/LF) or just carriage return (CR), whether data is to be compressed or encrypted, and so forth.

Session layer Manages the connection between cooperating applications, including high-level synchronization and monitoring of which application is "talking" and which is "listening."

Transport layer On the client, this layer divides messages into packets and assigns them sequence numbers to ensure that they are all received in the proper order. On the destination, it assembles packets that have been received. It also shields the session layer from the effects of changes in hardware.

Network layer Creates packet headers and handles routing, congestion control, and internetworking. It is the highest layer that understands the network's topology—that is, the physical configuration of the machines in the network, any limitations in bandwidth, and so on.

Data-link layer Transmits low-level data frames, waits for acknowledgment that they were received, and retransmits frames that were lost over unreliable lines.

Physical layer Passes bits to the network cable or other physical transmission medium.

TCP/UDP协议 TCP (Transmission Control Protocol)和UDP(User Datagram Protocol)协议属于传输层协议。其中TCP提供IP环境下的数据可靠传输,它提供的服务包括数据流传送、可靠性、有效流控、全双工操作和多路复用。通过面向连接、端到端和可靠的数据包发送。通俗说,它是事先为所发送的数据开辟出连接好的通道,然后再进行数据发送;而UDP则不为IP提供可靠性、流控或差错恢复功能。一般来说,TCP对应的是可靠性要求高的应用,而UDP对应的则是可靠性要求低、传输经济的应用。TCP支持的应用协议主要有:Telnet、FTP、SMTP等;UDP支持的应用层协议主要有:NFS(网络文件系统)、SNMP(简单网络管理协议)、DNS(主域名称系统)、TFTP(通用文件传输协议)等.

 

TCP/IP协议与低层的数据链路层和物理层无关,这也是TCP/IP的重要特点

posted on 2013-05-13 09:04  。!  阅读(518)  评论(0编辑  收藏  举报