Looking at a Stack Overflow question - https://stackoverflow.com/questions/13006949/what-is-the-difference-between-the-data-link-layer-and-link-layer - one of the answers says that the data link layer, i.e. a combination of LLC and MAC and/or other things (from what I've seen on Google searches) is used for handling local network communication.

I'm not sure what LLC and MAC are yet, but am hoping to get a high level overview on why such protocols are needed.

i.e. if the data link deals with communication on a local network basis, does that mean that upper levels of the OSI model are 'skipped'?

What is different about local network communication vs inter-network communication? And how do things like MAC and LLC come into play? I've often read things like 'MAC address'. What is this - is it related to the MAC protocol at all?


1 Answer 1


Remember that the OSI model is simply a model, and the real world doesn't always fit so neatly into it. There are many models, but none are followed completely.

The Data-Link layer is layer-2 under the OSI model. The addresses used by many (but not all, just the IEEE) LAN (layer-2) protocols are called MAC (Media Access Control) addresses. Hosts on a LAN using an IEEE LAN protocol (e.g. ethernet or Wi-Fi) communicate with each other using MAC addresses.

One major problem with the OSI model is that OSes never actually implemented separate layers 5, 6, and 7. That means that those layers are really lumped together in the Application layer, which is off-topic here.

The Application layer sends data to the Transport layer, where it is encapsulated in datagrams for transport. Some Transport layer protocols use source and destination addresses. For TCP and UDP, we call those addresses ports, and the TCP datagrams are called segments because the application data stream is segmented.

The Transport layer sends its datagrams to the Network layer, where the datagrams are encapsulated in Network layer datagrams, called packets. The packets have source and destination addresses.

The Network layer sends the packets to the Data-Link layer, where the packets are encapsulated into frames (MAC function). The IEEE Data-Link layer protocols use source and destination addresses, called MAC addresses, on the frames. Other layer-2 protocols may use other addressing, or none at all.

The Data-Link layer sends the frames to the Physical layer (hardware) for encoding of the frames where they are placed on the "wire".

The receiving host will reverse the process, decoding the bits on the wire into frames, which send their payloads to the appropriate Network layer protocols (LLC function), which then send the packet payloads to the appropriate Transport layer protocols, which send the payloads to the appropriate application processes.

Each layer on a source host communicates with the corresponding layer in the destination host, so, no, the upper layers are not skipped when two hosts on the same LAN communicate.

Understand that a host can have multiple Network layer protocols. The way the IEEE LAN protocol decides which Network layer protocol gets the payload of a frame is referred to as LLC. The actual encapsulation of network packets in frames is called MAC.

Don't make the mistake of thinking the whole world uses IEEE data-link protocols, although they are dominant on LANs. There are many different data-link protocols, and many do not use LLC or MAC, which are defined by IEEE 802.

  • Thanks for the reply. As you mentioned, the OSI model is just a model. So would it be correct to say that separating the data link layer from the network layer is somewhat misleading? As in on a LAN, computers may communicate without the use of TCP/IP, though I would still understand the interaction to resemble a layered model of sorts? If I'm on a local network, I can still ping a local IP address. Would this be different to computers communicating on a LAN?
    – Zach Smith
    Commented May 19, 2017 at 15:39
  • "So would it be correct to say that separating the data link layer from the network layer is somewhat misleading? Not at all. The Data-Link layer communicates on the layer-2 LAN, but the Network layer is used to communicate between layer-2 LANs, and the Transport layer is used to communicate between applications. Each layer communicates with the corresponding layer in the other host.
    – Ron Maupin
    Commented May 19, 2017 at 15:42
  • If you then had two hosts (identical pcs) on separate continents, what would happen within the Data Link layer?
    – Zach Smith
    Commented May 19, 2017 at 15:44
  • When a layer-2 frame reaches a router, the router strips off the layer-2 frame to get to the layer-3 packet. The router then routes the layer-3 packet to a different interface that leads toward the destination network. The new interface may use a different layer-2 protocol, and the router builds a new layer-2 frame for the new interface. This happens at each router hop until the packet reaches the destination LAN, where is gets its final frame before going to the destination host.
    – Ron Maupin
    Commented May 19, 2017 at 15:47

Your Answer

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

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