Skip to Content
πŸŽ‰ Welcome to my notes πŸŽ‰
Networking11. Network Interfaces and MAC Addresses

πŸ“‘ Networking: Interfaces & MAC Addresses

πŸ”Œ What are Network Interfaces?

A network interface is the point where a computing device connects to a network. It’s the hardware or software that handles the sending and receiving of data. Every device that connects to a networkβ€”like a laptop, smartphone, or serverβ€”has at least one network interface.

πŸ“‚ Types of Network Interfaces

  1. Physical Interfaces These are hardware components built for network connectivity.

    • Ethernet Card (NIC): A card with a port for a network cable, used for wired connections on a Local Area Network (LAN).
    • Wi-Fi Adapter: The hardware that enables a device to connect to a wireless network (WLAN).
    • Bluetooth Adapter: Allows devices to connect wirelessly over short distances, often used for peripherals like keyboards and mice.
    • Cellular Modem: Used in mobile devices to connect to cellular networks (e.g., 4G, 5G).
    • Fiber Optic Interface: Used for high-speed internet connections, typically in enterprise environments.
    • USB Network Adapter: A portable adapter that connects to a USB port to provide network connectivity, often used for laptops or devices without built-in Ethernet ports.
  2. Virtual Interfaces These are software-based interfaces that don’t correspond to a physical piece of hardware.

    • Loopback Interface (lo): A virtual interface that always points back to the device itself (often with the IP 127.0.0.1). It’s used for testing and local service communication.
    • VPN Interface: When you connect to a VPN, your system creates a virtual interface that represents the secure connection tunnel.

🏷️ What is a MAC Address?

A MAC (Media Access Control) address is a unique hardware identifier assigned to a physical network interface by the manufacturer. It’s often called the physical address or hardware address.

πŸ”’ MAC Address Format

A MAC address is a 48-bit number, typically written as six pairs of hexadecimal characters separated by colons or hyphens.

  • Example: 3C:A6:2B:9A:E4:F1
  • Structure:
    • OUI (Organizationally Unique Identifier): The first three pairs (3C:A6:2B) identify the manufacturer (e.g., Apple, Intel).
    • Device Identifier: The last three pairs (9A:E4:F1) are a unique serial number assigned by the manufacturer.

πŸ†š MAC Address vs. IP Address

This is a critical distinction in networking.

FeatureMAC AddressIP Address
AnalogyChassis Number of a carLicense Plate of a car
LayerData Link Layer (Layer 2)Network Layer (Layer 3)
ScopeUsed for communication on the same local network (LAN)Used for communication between different networks (Internet)
AssignmentFixed, burned into hardwareCan be dynamic and change based on the network
PurposeIdentifies the deviceIdentifies the device’s location on a network

In simple terms, a switch uses MAC addresses to send data to the correct device on a local network, while a router uses IP addresses to send data to the correct network across the internet.

Last updated on