• In the previous courses, we learned what a Local Area Network (LAN) is and how devices communicate inside it.
    We saw that devices connected to the same LAN exchange data locally through a switch.

    local area network lan example

    Figure 1 - Local Area Network Example

    Inside a LAN, communication does not involve a router.
    As long as devices are part of the same local network, the switch is responsible for forwarding traffic between them.

    This local communication relies on MAC addresses.
    Each device has a MAC address, and the switch uses these MAC addresses to decide how data should move inside the LAN.

    Communication Inside a LAN Happens at Layer 2

    To better understand how this communication works, we need to look at the OSI model.

    Communication inside a LAN happens at Layer 2, also known as the Data Link layer.
    This is the layer where the switch operates.

    OSI model highlighting Ethernet operating at the Data Link layer

    Figure 2 – Ethernet operates at the Data Link layer (Layer 2)

    Ethernet is the technology used at Layer 2 to enable local communication.
    It defines how data is formatted, addressed, and transmitted between devices inside the LAN.

    At this point, we know two important things:

    • Switches operate at Layer 2

    • Switches use MAC addresses to forward traffic inside the LAN

    But this raises an important question:

    How are MAC addresses actually carried from one device to another?

    MAC addresses do not travel alone.
    They are transported inside a Layer 2 structure defined by Ethernet.

    This structure is called the Ethernet frame.

    Answer the question below

    At which OSI layer does communication inside a LAN occur?