OSI七層結(jié)構(gòu)從上到下為
Application
Presentation
Session
Transport
Network
Data Link
Physical
TCP/IP四層結(jié)構(gòu)為
把上面三層合為process層,把下面兩層合為Hardware層得到
Process
Transport
Network
Hardware
協(xié)議所提供的各種服務(wù):
Connection-oriented (virtual circuit) or connectionless– Connection-oriented requires the protocol to establish a logical connection before communicating. Data can then be transferred until the connection is terminated. With the TCP/IP protocol suite, TCP is connection-oriented and UDP is connectionless.
Connection-oriented的典型代表是TCP,需要在聯(lián)系前首先要建立一條連接。
connectionless的典型代表是UDP,不需要事先建立連接。
Sequencing – makes sure that packets are delivered in the same order they were sent.
保證所有封包以正確的順序分發(fā)
Error control –handles data corruption and packet loss. Requires the receiver to acknowledge the sender and to discard duplicate the packet if an ACK is lost and the packet is then resent.
Flow control – makes sure the sender does not transmit data at a rate higher than the receiver can process the data.
?
Byte steam or messages – a byte stream is a series of bytes rather than a series of messages. The higher layer protocols must then organize the bytes according to the application requirements.
Full-duplex or half-duplex – Full-duplex is bi-directional simultaneously. Half-duplex is uni-directional at a time. The direction varies with time.