Транспортный уровень | Курс "Компьютерные сети"
Transport Layer Overview
Introduction to the Transport Layer
- The lecture introduces the transport layer as the fourth level of the Open Systems Interconnection (OSI) model, following physical, data link, and network layers.
- The focus is on how data packets are directed to specific applications running on a computer connected to a composite network.
Role of the Transport Layer
- The transport layer's primary function is to manage data transmission between processes across different hosts, ensuring that packets reach their intended applications.
- It provides addressing for processes and can offer varying levels of reliability based on application requirements.
Key Features of the Transport Layer
- Unlike other OSI layers that operate through network devices like routers and switches, the transport layer directly interacts with host systems.
- It establishes end-to-end connections between communicating hosts while remaining independent of underlying network devices.
Addressing in the Transport Layer
Port Numbers
- Addressing at this layer utilizes port numbers ranging from 1 to 65535 to identify specific processes on a host.
- Each packet includes an IP address and a port number; unique ports must be assigned per process on a single host to avoid confusion.
Types of Ports
- There are three types of ports: well-known ports (e.g., HTTP operates on port 80), registered ports, and dynamic ports assigned by operating systems.
- Well-known ports are reserved for popular services but can only be used by users with administrative rights.
Client-server Interaction
Example Scenario
- A web server listens on port 80 while clients connect using dynamically assigned high-numbered ports (e.g., 50000).
- When multiple browser instances connect to the same server, each instance receives a unique port number for its session.
Importance of Port Management
- This system prevents confusion during communication; responses from servers return specifically to the originating client browser based on both IP address and port number.
Reliability in Data Transmission
Enhancing Reliability
- The transport layer can provide higher reliability than lower layers due to effective error correction mechanisms implemented at this level.
- In practice, reliable channels reduce errors significantly; thus, less expensive networks can be constructed without compromising performance.
Transport Layer Overview
Key Functions of the Transport Layer
- The transport layer can guarantee data delivery, addressing issues with unreliable networks where packets may be lost. It employs acknowledgments; if an acknowledgment is not received within a certain timeframe, the same packet is resent.
- The transport layer ensures the order of message delivery. Due to packet switching, different packets may take various routes and arrive out of order. To resolve this, message numbering is utilized.
- Two protocols are primarily used at the transport layer: TCP (Transmission Control Protocol), which guarantees both delivery and order, and UDP (User Datagram Protocol), which operates faster but does not ensure delivery.
Interaction with Network Applications
- The socket interface is crucial for interaction with the transport layer. This marks the first level where interfaces between layers are considered since many network applications interact directly with it.
- While traditional applications often engage with the transport layer, there’s a growing trend towards developing applications that interact more directly with higher application layers.
Addressing Mechanisms in Transport Layer
- The primary task of the transport layer is to facilitate data transmission between processes on different hosts. Ports are used for addressing at this level, represented as numbers ranging from 1 to 65535.