1

I know this might sound like a very amateur and stupid question but I don't understand the concepts of these protocols in the OSI model. Are they just code that gets invoked? Also where does this code reside? Is it put on every server machine that needs to conform to the protocol when you are designing the network?

I am reading a book and it states that:

For starters, the abstract objects that make up the layers of a network system are called protocols.

Each protocol defines two different interfaces. First, it defines a service interface to the other objects on the same computer that want to use its communication services.

An implementation of the HTTP protocol could support an operation to fetch a page of hypertext from a remote server.

So in the case of an HTTP protocol when a user hits enter after entering a URL on their browser, some code for the HTTP protocol which is stored on some server machine is being run?

3 Answers 3

1

I am reading a book and it states

If I were in a snarkier mood, I'd tell you to burn the book. I'm sure you can find other sources that can explain this more clearly.

A better (and simpler) definition in this context is that a protocol is a set of procedures and objects used for communicating between devices. You might think of it as a specialized language for communication. Each layer uses a specific protocol to talk to the corresponding layer on the other device. For example, IP is the protocol used by the network layer on one device to talk to the network layer on another device. Note that this layer to layer communication is logical.

I don't understand the concepts of these protocols in the OSI model. Are they just code that gets invoked?

Forgetting for a moment that no one actually uses the OSI model, yes the protocols are implemented in code. They are a set of communications functions and data objects. This question and answer might help you better understand.

Is it put on every server machine that needs to conform to the protocol when you are designing the network?

In the case of the TCP/IP model, every device that uses IP has the protocol stack. That includes PCs, servers, routers, etc.

5
  • 1
    When you say that every device that uses the IP has the protocol stack. That includes servers, routers, etc.. Does that mean that the code for each of the protocols in this specific TCP/IP stack is implemented on each machine (server, routers, etc.)? I am still confused on how the code for this protocol in invoked. Sep 22, 2016 at 17:21
  • 1
    For example when your browser calls www.google.com on your machine (which is connected to some network) the routers will route the packet (which is a GET request to the server of google.com which is connected to some other network). Does the encapsulation on that packet from each layer (of TCP/IP) happen on my local machine first? So all of the code for that specific protocol will be invoked on my machine and then the packet will be sent to the destination www.google.com server? Sep 22, 2016 at 17:24
  • Short answer: Yes. Your browser generates http, which is encapsulated in TCP, then in IP, and then in Ethernet all on your PC before being sent out on the wire. At the server, the process is reversed, de-encapsulating each layer until the web server program gets the http. See if the link I included helps you.
    – Ron Trunk
    Sep 22, 2016 at 17:56
  • Oh ok it makes more sense now! But ones last thing. Does the code for each of those protocol (to add the headers to the packet) exist on my machine as well? Sep 22, 2016 at 18:48
  • @ToothyRel yes, it exists on your machine. Generally, such code resides in the kernel of your operating system. See the networking column in this diagram. For some advanced use cases, people use user space network stack as well. See this article. N.B. The second article discusses advanced concepts. Bookmark until you've built your basic concepts first. Nov 23, 2017 at 9:02
1

The OSI layer model is a theoretical model used to describe the way that communication among systems had to be handled. A real life communication model is, for example, TCP/IP.

IP is layer 3 and TCP/UDP are layer 4 protocols. Lower layers are managed by WLAN and Ethernet in real life LANs nowadays.

Windows has these layers as software embedded inside the Operating System that can be accessed through Winsock.

On Linux it is part of the kernel. You can check the source code of it here.

HTTP is a server-client protocol.

The HTTP client code is inside the web browser. You can check the source code of Firefox 48 here.

Examples of HTTP servers are Microsoft IIS and Apache. Here is the source code of Apache.

When the user hits enter after entering a URL on his browser( www.google.com for example), then it sends a connection request to the HTTP server. The request goes through the lower layers and then through Internet until it gets to the HTTP server in google.

This HTTP server responds with data that goes through the internet until it gets to the web browser of the user.

0
0

The Open Systems Interconnection (OSI) reference model defines a hierarchical conceptual computer networking/communications architecture that is, by and large, obsolete.

The Internet Protocol suite, originally developed by the U.S. Dept. of Defense (DARPA Agency), is the dominant and de facto standard computer networking model in use today. The Internet Engineering Task Force, IETF, is the authoritative body of the Internet Protocol suite.

The World Wide Web (web browsers / websites) adhere to protocol specifications published by the W3C, namely HTML and CSS, and by ECMA International (often simply called JavaScript).

The physical wired and wireless standards fall under the Institute of Electrical and Electronics Engineers, IEEE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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