트랜스포트 계층 프로토콜은 서로 다른 호스트에서 동작하는 애플리케이션 프로세스들에게 논리적 통신 (Logical Communication)을 제공한다.
논리적 통신은 호스트간에 직접 연결된것 처럼 보인다는걸 의미한다.
Transport layer protocols are implemented in end systems.
There can be multiple transport-layer protocols(TCP & UDP for internet). Each protocols provide different service for the application.
Transport protocol lives in end systems, only responsible for moving application messages to network edge(layer). Does not know about network core system. Likewise, routers(network layer) do not relate with information from transport layer.
Service by the transport protocol is often constrained by the underlying network protocol (Information about delay, bandwidth guarantees). However, it can offer some services apart from the network layer such as reliable data transfer(TCP), and data encryption(ch8)
Network application developers must choose between the two. (section 2.7 socket)
Segment → Packet for TCP & UDP
Datagram → Packet for Network Layer, Packet for UDP (RFC’s)
In the network layer, Internet Protocol trys but not guarantees delivery. Every host has IP address.
💡 Most fundamental responsibility of UDP and TCP is to extend IP’s delivery service between two end systems to delivery system between two processes. This is called **transport-layer multiplexing and demultiplexing.**UDP is unreliable, unregulated ( can send data at any rate, any time)
TCP is reliable data transfer, uses flow control, sequence numbers, acknowledgements, timers, in order delivery, congestion control.
Congestion control is not really TCP exlclusive, but provided as a service for the Internet as a whole. TCP gives equal bandwidth to each connections by regulates rate of traffic from the sending side.
Transport layer in the receiving host does not deliver data to the process, but to its intermediary socket. Each socket has a unique identifier.
Mux, Demuxing is important in all layers.
Multiplexing Requirements
Sockets must have unique identifier
each segment have fields to indicate destination socket.
- **Source port number & destination port number**
- 16bit, 0 to 65535, 0~1023 are **well-known port numbers** (restricted, reserved) for well known protocols such as HTTP(80), FTP(21)
Demultiplexing
#Exaple of socket creation and bind to port.
clientSocket = socket(AF_INET, SOCK_DGRAM)
clientSocket.bind((’’, 19157)
IP Address + Port number can specificcally target the process. Source port acts as a return address.
Handshaking Procedure
clientSocket = socket(AF_INET, SOCK_STREAM)
clientSocket.connect((serverName,12000))
connectionSocket, addr = serverSocket.accept()
Transport layer at the server notes the four tuples. (IP-Source,Port-Source,Port-Dest,Own IP → Dest-IP)
From then all arriving segments with same four identifiers will be demultiplex to the server socket.
Client - Server now ready to send data.
Even if host C and host A have same port number, it is not a problem for server B since they have different IP Address.
Figure 3.5 Server B created process for each connection but modern day high performance servers may just use one process and a thread for new connection. Therefore such servers may have a process with many sockets.
Especially with non-persistent HTTP, when a process is created every time a new TCP connection, it impacts the performance of the server.