Which layer in TCP/IP model provides Quality of Service (QoS)? I am confused between Layer 2 and Layer 3?
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