3

I want to learn about computer networks from the bottom up. I don't really understand the nuances of networking layers, with books mentioning that layers provide services to layers above them, but the interface between layers is not part of the network architecture (Network Architecture is defined as layers + protocols). What is the difference between service and interface? What exactly is a network layer? I can't find clear explanations for these questions anywhere. (I have been reading Computer Networks by A. S. Tanenbaum)

Since I'm trying to learn networking from the bottom up, I'm trying to unlearn and relearn, i.e., I'm moving forward thinking that all that I know about the subject might be incorrect. Here's what I have understood so far:

  • Each node in a communication network must do activities (I am not using the term 'software' here because the activities performed at each node can be implemented via digital logic in hardware)
  • These activities are often organized into layers, where the activities in layer N+1 can only use the services the activities provide in layer N. This organization is helpful in keeping us sane, and everything managable
  • A Network Model is a well defined specification of these layers in a network - the activities they perform and the services that are needed to be provided by a layer.
  • A protocol is a way for activities on different nodes, but at the same layer to communicate. Layer N needn't know what protocol layer N-1 uses to communicate.

Is my understanding correct?

  • I have read that the Network Architecture specifies the layers and protocols used, but not the interfaces between layers. I think that the 'layer specification' will contain the services that are required to be provided at a layer. Isn't this the same as the interface between two layers? The Network Architecture contains the layer specification which contains the service specification, but does not contain interface specification. How?

  • Can I get a copy of the specification of the services provided per each layer? Is this something concrete or something hand wavy (E.g. "It depends on the situation" type)

  • I have read that the IP protocol of layer 3 requires ARP, ICMP, etc. protocols of layer 2. I thought that layer N is not concerned with actual protocols of layer N-1, but only the services provided.

Where is the flaw in my understanding?

1
  • 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 can post and accept your own answer.
    – Ron Maupin
    Dec 17, 2020 at 22:35

2 Answers 2

2

A network architecture is a design of a specific network, with nodes assigned different responsibilities (e.g., host, bridge, router, with lots of variations on the latter two especially when you include MPLS.) While it uses model concepts to define the roles, it's not part of the definition of layers or the OSI model. While the architecture doesn't usually specify specific nodes, it does specify types of nodes, what roles they serve, and how they fit into the bigger picture. So, while I said "specific network" above, there may be multiple instances of it and lots of detail omitted. For example, company that provides "triple play" (voice, video, data) might have a network architecture for a metro area, a different architecture for a small city, and another for rural areas. Lots of examples of each, with each instance following the plan as closely as possible.

The OSI model is just a reference model assigning different responsibilities to each layer to help us sort out how communications work. The OSI model is pretty good at layers 4 and below. As it turned out, there are better ways to address the OSI upper layers so we don't talk about them much. The model as a whole is best to use to give perspective to each layer, and to understand each layer. But there are lots of cases in the real world that bend the model. More on that later.

In addition to the model, the OSI specs also define specific services in various layers. Each service has specifications for:

  • its service interface offered to the layer above (in terms of "service primitives" to do things like send and receive "service data units", with many parameters carefully spelled out)
  • one or more protocols to implement the service (using service primitives of a service in the layer below)

Reading these documents is a serious snooze. (And they're expensive ITU documents, so you can't just read them on the web. And most the services they describe don't really exist any more.) In contrast, the early RFCs for IP protocols just specified the protocol and left you guessing about the service interface to the layer above, and many details of how the protocol uses the service below. Over the decades, the IETF has gotten a lot better at clarifying these things, fortunately without adopting the overblown formal approach of the OSI documents (which were after all developed under the ITU which is part of the UN.)

So, the older the service, the less clear is the specification of the service interface or how the lower layer services are employed. IP and TCP are are among the earliest, so they're not formally defined. However, there are a lot of standard APIs that provide these services that you can use as a guide (like Sockets for TCP/UDP.) The interface between transport and network is often harder to get at because it's often buried, but I bet we could find Linux kernel APIs for network and link layer interfaces (for example.)

Regarding this:

the activities in layer N+1 can only use the services the activities provide in layer N.

Right, in the model. In reality, forget "only." Frequently, a service in one layer can use services of another service at the same or higher layer. For example, with tunnels, we use one layer to make a "link" that can be used by the network layer. With PPTP, we use TCP to create a serial link to be used by IP. So, we're creating a link layer service by using a transport layer service. What layer are we in? That's not the right question. The right question is "what role do we play", which is what I already said: provide a link layer service using a transport layer service. Make for some funny drawings. For more examples see Why PPTP, L2TP, PPPOE are in OSI Layer2? .

So, use the term "Layer" for the high level view, but use the terms "service user" and "service provider" whenever things don't stack up like a layer cake.

the IP protocol of layer 3 requires ARP, ICMP, etc. protocols of layer 2

ICMP lives in the network layer along with IP. ARP is a bit of a rule-breaker, but it lives mostly in layer 3 and is tightly coupled with the IP implementation. It's best to think of it as layer 3, and learn where it breaks the model. Most of us don't bump into the counterexamples and I can't think of them offhand.

IIRC, IPV6 is better at separating the layers, so consider spending some quality time with its spec.

3

Your understanding is generally correct. The problems you face are mainly due to your assumption that things are better defined than they actually are. For example:

What exactly is a network layer?

Like many, many networking terms, there is no exact definition. There are only two models that try to define them (OSI and IP protocol Suite), and only one of those has gained any widespread use. So practically speaking, there is only one use-case. The TCP/IP suite defines the network layers in its model. You can read about it in RFC 1122.

A Network Model is a well defined specification of these layers in a network

A model is an idealized representation that doesn't exist in reality. In practice, specifications aren't always well-defined. Sometimes things are vague, or the actual implementation of a feature or function can vary.

I have read that the IP protocol of layer 3 requires ARP, ICMP, etc. protocols of layer 2. I thought that layer N is not concerned with actual protocols of layer N-1, but only the services provided.

This is where theory and practice diverge. You are correct that that's the theory. But in practice, implementation details "leak" between layers. ARP doesn't really "fit" into the TCP/IP model. Another example is tunneling (VPN or MPLS). It doesn't fit into the model either.

7
  • So the TCP/IP suite is a network architecture (network model + protocol list)? If so, can one find a specification that lists out the services provided by each layer?
    – Suraaj K S
    Oct 19, 2020 at 20:14
  • As a start, see RFC791, RFC 792 and RFC 793. Be aware there are lots of updates to these original specs.
    – Ron Trunk
    Oct 19, 2020 at 22:29
  • Also, see RFC 1122
    – Ron Trunk
    Oct 19, 2020 at 22:54
  • Good answer, but the OSI network layer has definitely been implemented. Two variations them, in fact: CONS and CLNS. I know of at least 4 commercial implementations; Cisco's being one. I remember three others, including one I implemented which was used in SONET ADMs among other equipment. They're just not used any more. Dec 18, 2020 at 2:13
  • @JeffLearman They're just not used any more. That's my point. I'm recommending that new students don't fret over "what OSI layer does this fit into?." The TCP/IP model makes more sense since it's implementation is ubiquitous.
    – Ron Trunk
    Dec 18, 2020 at 13:06

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.