Which layer in TCP/IP model provides Quality of Service (QoS)? I am confused between Layer 2 and Layer 3?
2 Answers
According to Computer Networks, by Andrew S. Tanenbaum, Quality of Service is provided by the Network Layer (Layer 3).
A stream of packets from a source to a destination is called a flow (Clark, 1988). A flow might be all the packets of a connection in a connection-oriented network, or all the packets sent from one process to another process in a connectionless network. The needs of each flow can be characterized by four primary parameters: bandwidth, delay, jitter, and loss. Together, these determine the QoS (Quality of Service) the flow requires.
Computer Networks - Andrew S. Tanenbaum, 5th Edition, Chapter 5 (The Network Layer), Section 5.4 (Quality of Service), p. 404

- 1
- 1

- 2,420
- 1
- 21
- 32
Any layer can distinguish between different qualities of service. Layers 2 & 3 offer "best effort" delivery, where QoS can influence relative amount of effort. There are many layer-2 technologies, but ethernet is certainly a popular one. Ether standards committees have published various QoS specs, including IEEE P802.1p. There have been many others. Sometimes queuing discipline (packet drop policy) is of interest, and sometimes a reservation of committed bit-rate is the goal.
A QoS field has been baked into layer-3 IP headers since the beginning -- see Type of Service in https://www.rfc-editor.org/rfc/rfc791#page-12