Skip to content

Kotenko IT Blog

Menu
  • Home
  • CISCO
  • Virtualization
  • About
  • Certificates
Menu

Ethernet LAN Switching

Posted on May 30, 2025June 5, 2025 by kotenkoo

LAN Basics

  • LAN = Local Area Network (small area)
  • Switches do not separate LANs
  • Routers separate LANs (1 router interface = 1 LAN)

Data Encapsulation: PDUs

  • Data → Segment → Packet → Frame
  • Ethernet Frame = encapsulated Packet

Ethernet Frame Structure

[ Preamble (7) | SFD (1) | Destination MAC (6) | Source MAC (6) | Type/Length (2) | Data | FCS (4) ]

  • Frame Total: 64 to 1518 bytes (excluding jumbo frames)
  • Min payload: 46 bytes → if smaller, switch adds padding

Ethernet Header (14 bytes)

  • Destination MAC (6 bytes)
  • Source MAC (6 bytes)
  • Type/Length (2 bytes)
    → depends on Ethernet version:
    • ≤1500: length (802.3)
    • ≥1536: type (Ethernet II, e.g. 0x0800 for IPv4, 0x86DD for IPv6)

Preamble + SFD (not technically part of header)

  • Preamble: 10101010 × 7 (7 bytes) — for clock sync
  • SFD: 10101011 (1 byte) — marks frame start

Ethernet Trailer (4 bytes)

  • FCS (Frame Check Sequence):
    • Uses CRC to detect errors
    • Receiver discards frame if CRC check fails

MAC Address (6 bytes)

  • Globally unique (burned-in at manufacturing)
  • Format: AAAA.AA00.0001
    • First 3 bytes = OUI (manufacturer)
    • Last 3 bytes = device-specific

Hexadecimal and Decimal Quick Recap

  • HEX: 0–9 + A(10)–F(15)
  • 0x1B = 1×16 + 11 = 27
  • CDE = C×256 + D×16 + E = 3294

MAC Address Table (Switch)

  • Built by learning Source MACs
  • Used to forward or flood frames:
    • Known Unicast: Forward
    • Unknown Unicast: Flood
  • Dynamic MACs: expire after 5 min of inactivity (Cisco default)

Show & Clear Commands

show mac address-table

clear mac address-table dynamic

clear mac address-table dynamic address 0f0f.0f0f.0f0f

clear mac address-table dynamic interface f0/0


ARP (Address Resolution Protocol)

  • Resolves L3 IP → L2 MAC
  • Request: Broadcast FF:FF:FF:FF:FF:FF
  • Reply: Unicast
  • Switch floods ARP Request if destination is unknown
  • ARP Table: stored on PC
    MAC Table: stored on switch

Show ARP

arp -a # Windows show arp # Cisco


ICMP (Ping)

  • Layer 3 (Network), but uses MAC (L2) for delivery
  • Echo Request → Echo Reply (Unicast)
  • First ping may fail if ARP resolution not done
  • Cisco: ping shows 5 pings, each 100 bytes → output .!!!!

MAC vs ARP vs ICMP vs DHCP

Table/ProtocolDeviceFieldsLearning MethodTypeNotes
MAC TableSwitchMAC–PortPassive (from traffic)Flood/ForwardAged after 5 min
ARP TableHostIP–MACActive (via ARP)Request/ReplySeparate from MAC table
ICMPHostPingActiveUnicast (needs ARP)Echo Request/Reply
DHCPHostIP, GW, DNSActiveDORANeeds MAC to work

Tools

  • Wireshark – packet capture & analysis
  • GNS3 – emulator for real Cisco IOS (requires license)

📌 These are personal study notes. Please read the full disclaimer for more information.

Category: CCNA

Post navigation

← Cisco IOS CLI
IPv4 Addressing →

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • IPv4 Header
  • Switch Interfaces
  • IPv4 Addressing
  • Ethernet LAN Switching
  • Cisco IOS CLI

Recent Comments

No comments to show.

Archives

  • June 2025
  • May 2025

Categories

  • CISCO
    • CCNA
    • CISCO Troubleshooting
  • Uncategorized
  • Virtualization
    • Proxmox
© 2025 Kotenko IT Blog | Powered by Minimalist Blog WordPress Theme