Goal :
1. Understand principles behind transport layer services such as demultiplexing, multiplexing, reliable data transfer(TCP), flow control, and congestion control.
2. Learn about Internet transport layer protocols. (TCP, UDP)
Chapter 3.1) Transport Layer Services
Chapter 3.2) Multiplexing and Demultiplexing
Chapter 3.3) Connectionless Transport (UDP)
Chapter 3.4) Principles of Reliable Data Transfer
Chapter 3.5) Connection-Oriented Transport (TCP)
Chapter 3.6) Principles of Congestion Control
Chapter 3.7) TCP Congestion Control
Transport Layer Protocol
- Transport Layer Protocol provides for logical communiation between application processes running on different hosts. This is different with network-layer protocol that provides logical communication between hosts.
- By logical communication, we mean that from an application's perspective, it is as if the hosts running the processes were directly connected.
- Transport Layer Protocols are implemented in the end systems but not in network routers.
- Transport Layer Protocols doesn't have any say about how the messages are moved within the network core.
- Transport-layer packets are known as transport-layer segments in Internet.
- To create the transport-layer segment, the application messages are broke into smaller chunks and a transport-layer header is added to each chunk.
- The transport layer passes the segment to the network layer at the sending end system, where the segment is encapsulated within a network-layer packet(datagram) and sent to the destination.
- More than one transport layer protocol may be available to network applications.
- Each protocol can offer a different service model to applications.
- If network-layer protocol cannot provide delay or bandwidth guarantees for transport layer segments sent between hosts, then the transport layer protocol cannot provide delay or bandwidth guarantees for application messages sent between processes.
- However, a transport protocol can offer reliable data transfer service to an application even when the underlying network protocol is unreliable, that is even when the network protocol loses, garbles, or duplicates packets.
Transport Layer in the Internet
- Two distinct transport layer protocols available to the application layer are UDP(User Datagram Protocol) which provides unreliable, connectionless service, and TCP(Transmission Control Protocol) which provides a reliable, connection-oriented service to the invoking application.
- When designing a network application, the application developer must specify one of these two transport protocols.
- TCP provides reliable data transfer, using flow control, sequence numbers, acknowledgements, and timers. This ensures that the data is delivered from sending process to recieving process, correctly and in order.
- TCP also provides congestion control, which prevents any one TCP connection from swamping the links and routers between communicating hosts with an excessive amount of traffic. In other words, TCP strives to give each connection traversing a congested link an equal share of the link bandwidth.
Multiplexing and Demultiplexing
- The most fundamental reponsibility of UDP and TCP is to extend IP's delivery service between two end systems to a delivery service between two processes running on the end systems.
- Extending host-to-host delivery to process-to-process delivery is called transport-layer multiplexing and demultiplexing.
- Multiplexing is done by the sender by handling data from multiple sockets, and adding transport header.
- Demultiplexing is done by the receiver to use header info to deliver received segments to correct socket.
- Hosts use IP addresses and Port Numbers to direct segments to appropriate sockets.
- Transport layer in the receiving host does not deliver data directly to a process, but instead to an intermediary socket, becuase at any given time there can be more than one socket in the receiving host, so each socket has a unique identifier.
- In contrast with UDP, two arriving TCP segments with different source IP addresses or source port numbers will be directed to two different sockets.
- Also, web servers distinguishes the segments from different clients using source IP addresses and source port numbers.
- If client and server are using persistent HTTP, then throughout the duration of the persistent connection the client and server exchanges HTTP messages via the same server socket.
Connectionless Transport (UDP)
- At the very least, the transport layer has to provide a multiplexing and demultiplexing service in order to pass data between the network layer and the correct application-level process.
- UDP, defined in RFC768, adds nothing to IP, and just does multiplexing/demultiplexing and some light error checking.
- Therefore, UDP segments may be lost, or delivered out of order to app.
- There is no handshaking between sending and receiving transport layer entities before sending a segment. Therefore, UDP is said to be connectionless.
- DNS is an examples of an application-layer protocol that typically uses UDP.
- The following are reasons why some applications might choose UDP over TCP as their Transport Layer Protocol.
- 1) Since real-time applications often require a minimum sending rate, they do not want to overly delay segment transmission, and can tolerate some data loss. Then, TCP's service model is not particularly well matched to these applications' needs.
- 2) TCP uses a three-way hand shake before starting to transfer data, while UDP just blasts away without any formal preliinaries, thus UDP does not introduce any delay to establish a connection.
- 3) State information is needed to implement TCP's reliable data transfer service and to provide congestion control. A server devoted to a particular application can typically support many more active clients when the application runs over UDP rather than TCP.
4) The length of packet header is shorter.
Checksum
- Checksum is used to determine whether bits within the UDP segment have been altered as it moved from source to destination.
- Checksum is the one's complement sum of segment contents, and sender puts checksum value into UDP checksum field.
- At receiver, all the segments contents and the checksum are added, and if no errors are introduced into the packet, then the sum at the receiver will all be composed of 1s.
- If one of the bits is a 0, then we know that errors have been introduced into the packet.
- The reason whyUDP provides a checksum is that there is no guarantee that all the links between source and destination provide error checking.
- However, UDP does nothing to recover from an error.
'Network' 카테고리의 다른 글
Transport Layer (3/3) (0) | 2021.10.12 |
---|---|
Transport Layer (2/3) (0) | 2021.10.11 |
Application Layer (3/3) (0) | 2021.10.11 |
Application Layer (2/3) (0) | 2021.09.27 |
Application Layer (1/3) (0) | 2021.09.26 |