1

I was reading Steven's book on Unix Network Programming.There was a paragraph in chapter 1 which said:

Even though the client and server communicate using an application protocol, the transport layers communicate using TCP. Note that the actual flow of information between the client and server goes down the protocol stack on one side, across the network, and up the protocol stack on the other side. Also note that the client and server are typically user processes, while the TCP and IP protocols are normally part of the protocol stack within the kernel.

Now, suppose that a web browser requests a page from the server. Is this communication established through the above application protocol? What is this application protocol?

Again, suppose that the server responds by sending the requested page. Is this page sent through the TCP/IP protocol?

Is there any difference between the protocols used in the request and response?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 27 '17 at 17:34
0

Programming, applications, and application-layer protocols are off-topic here. The client/server model is an application concept, not a concept of the network stack. An application protocol is a protocol above OSI layer-4, and it is off-topic here. You can ask about programming on Stack Overflow.

TCP/IP refers to a protocol suite or network stack model, not a single protocol. Each protocol at each layer in a network stack communicates with the corresponding protocol at the corresponding layer at the other end of the communication. (There are no clients or servers for protocols in the network stack, only peers.)

An application or application-layer protocol uses a protocol in the Transport Layer to communicate with the same protocol in the Transport Layer of the receiving device. The Transport Layer uses a protocol in the Network Layer to communicate with the same protocol in the Network Layer on the receiving device. Etc. There are multiple possible protocols at each layer of the network stack.

| improve this answer | |
1

The best way to think about this is: Each layer of the stack in one host communicates (logically) with the same layer in the other host. But the information "moves down the stack." As it does, each layer encapsulates the information in the layer above. So, for example, the TCP information gets encapsulated in the IP layer, and so on. At the receiver, the process is reversed as the information moves up the stack.

Now, suppose that a web browser requests a page from the server. Is this communication established through the above application protocol? What is this application protocol?

In this case, the protocol is Hypertext Transfer Protocol (HTTP). It's an application layer protocol.

Again, suppose that the server responds by sending the requested page. Is this page sent through the TCP/IP protocol?

The server generates an HTTP message, which gets encapsulated in the lower level protocols.

So the Server and the client communicate logically with each other. In fact, they are unaware of the lower levels. The server sends data, and the client receives it. Everything else is hidden from the application.

Is there any difference between the protocols used in the request and response?

In the case of HTTP, no. But the lower levels could be different.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.