Transport layer: Difference between revisions
m Reverted vandalism and incorrect change, back to version by 72.90.124.98 |
→Transport protocol comparison table: Change order or rows and columns. Clarified row titles. Sequence numbers are optional in SCTP. Linked the column titles. |
||
Line 25: | Line 25: | ||
|- |
|- |
||
! |
! |
||
! [[User Datagram Protocol|UDP]] |
|||
! TCP |
|||
! [[Transmission Control Protocol|TCP]] |
|||
! UDP |
|||
! [[Datagram Congestion Control Protocol|DCCP]] |
|||
! SCTP |
|||
! [[Stream Control Transmission Protocol|SCTP]] |
|||
! DCCP |
|||
|- |
|- |
||
| Packet header size |
| Packet header size |
||
| 20 Bytes |
|||
| 8 Bytes |
| 8 Bytes |
||
| |
| Bytes |
||
| Varies |
| Varies |
||
| 8 Bytes + Variable Chunk Header |
|||
|- |
|- |
||
| |
| entity |
||
⚫ | |||
| Segment |
| Segment |
||
| Datagram |
| Datagram |
||
| Datagram |
| Datagram |
||
⚫ | |||
|- |
|- |
||
| [[ |
| [[ ]] |
||
| Yes |
| Yes |
||
| Yes |
| Yes |
||
Line 48: | Line 49: | ||
| Yes |
| Yes |
||
|- |
|- |
||
| [[ |
| [[ ]] |
||
| Optional |
|||
⚫ | |||
| Yes |
| Yes |
||
| Yes |
| Yes |
||
| Yes |
| Yes |
||
|- |
|- |
||
⚫ | |||
| [[Connection oriented]] |
|||
⚫ | |||
| Yes |
| Yes |
||
| No |
| No |
||
| Yes |
|||
| Yes |
| Yes |
||
|- |
|- |
||
| [[Virtual circuit]]s: Sequence numbering and reordering |
|||
⚫ | |||
| Yes |
|||
| No |
| No |
||
| Yes |
| Yes |
||
⚫ | |||
⚫ | |||
| [[Segment numbering]] |
|||
| Yes |
| Yes |
||
| Optional |
|||
⚫ | |||
⚫ | |||
| No |
| No |
||
⚫ | |||
| Yes |
| Yes |
||
| Yes |
| Yes |
||
|- |
|- |
||
| [[Congestion avoidance]]: Variable congestion window, slow start, time outs |
|||
⚫ | |||
| Yes |
|||
| No |
| No |
||
| Yes |
| Yes |
||
| Yes |
| Yes |
||
⚫ | |||
| [[Congestion avoidance]] |
|||
| Yes |
| Yes |
||
⚫ | |||
| Multiple streams |
|||
| No |
|||
| No |
|||
| No |
| No |
||
| Yes |
|||
| Yes |
| Yes |
||
|} |
|} |
Revision as of 16:54, 4 July 2007
OSI model by layer |
---|
In computing and telecommunications, the transport layer is the second highest layer in the four and five layer TCP/IP reference models, where it responds to service requests from the application layer and issues service requests to the Internet layer. It is also the name of layer four of the seven layer OSI model, where it responds to service requests from the session layer and issues service requests to the network layer. The definitions of the transport layer are slightly different in these two models. The following text primarily refers to the TCP/IP model.
The transport layer provides transparent transfer of data between hosts. It is usually responsible for end-to-end connection, error recovery, flow control, and ensuring complete data transfer. In the Internet protocol suite this function is most commonly achieved by the connection oriented Transmission Control Protocol (TCP). The datagram-type transport, User Datagram Protocol (UDP), provides neither error recovery nor flow control, leaving these to the application. The purpose of the Transport layer is to provide transparent transfer of data between end users, thus relieving the upper layers from any concern with providing reliable and cost-effective data transfer.
The transport layer usually turns the unreliable and very basic service provided by the Network layer into a more powerful one. There is a long list of services that can be optionally provided at this level. None of them are compulsory, because not all applications want all the services available. Some can be wasted overhead, or even counterproductive in some cases.
Internet protocol suite |
---|
Application layer |
Transport layer |
Internet layer |
Link layer |
- Connection-oriented
- This is normally easier to deal with than connection-less models, so where the Network layer only provides a connection-less service, often a connection-oriented service is built on top of that in the Transport layer.
- Same Order Delivery
- The Network layer doesn't generally guarantee that packets of data will arrive in the same order that they were sent, but often this is a desirable feature, so the Transport layer provides it. The simplest way of doing this is to give each packet a number, and allow the receiver to reorder the packets.
- Reliable Data
- Packets may be lost in routers, switches, bridges and hosts due to network congestion, when the packet queues are filled and the network nodes have to delete packets. Packets may be lost or corrupted in for example Ethernet due to interference and noise, since Ethernet does not retransmit corrupt packets. Packets may be delivered in the wrong order by an underlying network. Some transport layer protocols, for example TCP, can fix this. By means of an error detection code, for example a checksum, the transport protocol may check that the data is not corrupted, and verify that by sending an ACK message to the sender. Automatic repeat request schemes may be used to retransmit lost or corrupted data. By introducing segment numbering in the transport layer packet headers, the packets can be sorted in order. Of course, error free is impossible, but it is possible to substantially reduce the numbers of undetected errors.
- Flow Control
- The amount of memory on a computer is limited, and without flow control a larger computer might flood a computer with so much information that it can't hold it all before dealing with it. Nowadays, this is not a big issue, as memory is cheap while bandwidth is comparatively expensive, but in earlier times it was more important. Flow control allows the receiver to say "Whoa!" before it is overwhelmed. Sometimes this is already provided by the network, but where it is not, the Transport layer may add it on.
- Congestion avoidance
- Network congestion occurs when a queue buffer of a network node is full and starts to drop packets. Automatic repeat request may keep the network in a congested state. This situation can be avoided by adding congestion avoidance to the flow control, including slow-start. This keeps the bandwidth consumption at a low level in the beginning of the transmission, or after packet retransmission.
- Byte orientation
- Rather than dealing with things on a packet-by-packet basis, the Transport layer may add the ability to view communication just as a stream of bytes. This is nicer to deal with than random packet sizes, however, it rarely matches the communication model which will normally be a sequence of messages of user defined sizes.
- Ports
- (Part of the transport layer in the TCP/IP model, but of the session layer in the OSI model) Ports are essentially ways to address multiple entities in the same location. For example, the first line of a postal address is a kind of port, and distinguishes between different occupants of the same house. Computer applications will each listen for information on their own ports, which is why you can use more than one network-based application at the same time.
On the Internet there are a variety of Transport services, but the two most common are TCP and UDP. TCP is the more complicated, providing a connection and byte oriented stream which is almost error free, with flow control, multiple ports, and same order delivery. UDP is a very simple 'datagram' service, which provides limited error reduction and multiple ports. TCP stands for Transmission Control Protocol, while UDP stands for User Datagram Protocol. Other options are the Datagram Congestion Control Protocol (DCCP) and Stream Control Transmission Protocol (SCTP).
Some things, such as connection orientation can be implemented at either Transport or Network layer. The idea is that the Network layer implements whatever set of options is easiest: for some underlying networks it is easiest to implement connectionless communication, while for others it is easiest to implement connection oriented communication. The Transport layer uses this simplest set of options to implement whatever combinations of options are actually desired.
Transport protocol comparison table
UDP | TCP | DCCP | SCTP | |
---|---|---|---|---|
Packet header size | 8 Bytes | 20 Bytes | Varies | 8 Bytes + Variable Chunk Header |
Transport layer packet entity | Datagram | Segment | Datagram | Datagram |
Port numbering | Yes | Yes | Yes | Yes |
Error detection | Optional | Yes | Yes | Yes |
Reliability: Error recovery by automatic repeat request (ARQ) | No | Yes | No | Yes |
Virtual circuits: Sequence numbering and reordering | No | Yes | Yes | Optional |
Flow control | No | Yes | Yes | Yes |
Congestion avoidance: Variable congestion window, slow start, time outs | No | Yes | Yes | Yes |
Multiple streams | No | No | No | Yes |
Examples
- AEP, AppleTalk Echo Protocol
- ATP, AppleTalk Transaction Protocol
- CUDP, Cyclic UDP
- DCCP, Datagram Congestion Control Protocol
- FCP, Fiber Channel Protocol
- FCIP, Fiber Channel over TCP/IP
- IL, IL Protocol
- iSCSI, Internet Small Computer System Interface
- NBP, Name Binding Protocol
- NBF, NetBIOS Frames Protocol
- SPX, Sequenced Packet Exchange
- RTMP, Routing Table Maintenance Protocol
- SCTP, Stream Control Transmission Protocol
- SCSI, Small Computer System Interface
- TCP, Transmission Control Protocol
- UDP, User Datagram Protocol
- ^ "X.225 : Information technology – Open Systems Interconnection – Connection-oriented Session protocol: Protocol specification". Archived from the original on 1 February 2021. Retrieved 10 March 2023.