Chapter 6: Ethernet LAN switching
Introduces Ethernet LAN switching by defining frames and explaining why switches are considered Layer 2 devices.
After this chapter you will be able to
- Switch forwarding at Layer 2. Explain that a switch forwards frames toward their proper destinations within a LAN and is considered a Layer 2 device because it uses information in the Ethernet header to make forwarding decisions. Contrast this with a router’s use of the Layer 3 IP header.
- LAN boundaries and Layer 2 domains. Explain how the connections in Figure 6.1 determine which devices share a LAN, and describe a LAN as a Layer 2 domain.
- Ethernet header in forwarding. Explain that switches use information in the Ethernet header to decide how to forward traffic.
- Receiver synchronization and frame start. Explain how the Preamble helps a receiving device determine bit timing and how the SFD signals that the frame is about to start. Describe their lengths and bit patterns.
- Physical Layer versus frame. Justify why the Preamble and SFD are sent with every Ethernet frame but are not considered part of the frame.
- Ethernet MAC address roles. Explain how the destination and source MAC address fields help deliver an Ethernet frame: the destination identifies the next hop for Layer 2 delivery, while the source helps a switch learn which port a host is connected to.
- Manufacturer-assigned MAC address structure. Explain why a MAC address is called a burned-in address and how its two three-byte halves support globally unique port addresses.
- Type/Length field interpretation. Explain how the value of the two-byte Type/Length field determines whether it gives a packet length or identifies an encapsulated protocol, and describe which use is common today.
- FCS corruption detection. Explain how the sender and receiver use the Frame Check Sequence to detect a corrupted Ethernet frame and what the receiver does when the checksums differ.
- Source-based MAC address learning. Explain how a switch builds its MAC address table from frames it receives and how an entry identifies the port through which a MAC address can be reached.
- Known and unknown unicast handling. Distinguish known from unknown unicast frames by whether the switch has a destination MAC address entry, and explain how the switch handles each.
- Flooded request and forwarded reply. Trace PC1’s frame toward PC3 and PC3’s reply, including what each switch learns from the frames’ source MAC addresses.
- MAC address table inspection. Explain how to view a Cisco switch’s MAC address table and interpret its address, port, Type, and Vlan information.
- Dynamic address table clearing. Describe how to clear all dynamic MAC address entries, one specified address, or entries learned on a specified interface, and why manual clearing is usually unnecessary.
- IP-to-MAC address resolution. Explain why a host uses ARP before sending a frame to another host in its LAN and how ARP relates an IP address to a MAC address.
- Broadcast request and unicast reply. Trace the ARP request and reply between PC1 and PC3, including how the broadcast request identifies its target and how the reply returns.
- Ping purpose and destination. Explain that ping tests whether a host is reachable over a network and that the source gets the destination IP address from the `ping ip-address` command.
- Echo messages and results. Describe the ICMP echo request and echo reply used by ping, and interpret exclamation marks and periods in Cisco IOS ping output.
What it builds on
- Switches (chapter 2) · The basic role of switches as network devices.
- Data encapsulation and de-encapsulation (chapter 4) · The earlier treatment of PDUs and encapsulation.
- Routers (chapter 2) · Routers provide connectivity between LANs.
- Binary: Bits and bytes (chapter 3) · The relationship between bits and bytes.
- The OSI reference model (chapter 4) · The distinction between the Physical and Data Link layers.
- The layers of the TCP/IP model (chapter 4) · The distinction between Layer 2 and Layer 3 addresses.
Section by section
Introduction
Introduces Ethernet LAN switching by defining frames and explaining why switches are considered Layer 2 devices.
- Switch forwarding at Layer 2: Explain that a switch forwards frames toward their proper destinations within a LAN and is considered a Layer 2 device because it uses information in the Ethernet header to make forwarding decisions. Contrast this with a router’s use of the Layer 3 IP header.
Why it matters: This distinction explains what makes Ethernet LAN switching a Layer 2 function. - Frame as Layer 2 PDU: Describe a frame as a Layer 2 PDU containing a Layer 2 header, trailer, and payload.
Why it matters: Identifying the frame and its parts makes clear what switches forward.
Key terms: Layer 2, Ethernet header, Layer 3, IP header, LAN, frame, Layer 2 PDU, header, trailer, payload
6.1 Local area networks
This section explains why LAN boundaries depend on whether devices can communicate through switches without passing through a router, not just on physical location.
- LAN boundaries and Layer 2 domains: Explain how the connections in Figure 6.1 determine which devices share a LAN, and describe a LAN as a Layer 2 domain.
Why it matters: This distinction tells you when communication stays within a switched LAN and when it must pass through a router.
Key terms: local area network (LAN), Layer 2 domain, switch, router
6.2 The Ethernet header and trailer
This section introduces why the Ethernet header matters to switch forwarding and clarifies that two items shown in the frame diagram are not part of the frame.
- Ethernet header in forwarding: Explain that switches use information in the Ethernet header to decide how to forward traffic.
Why it matters: This connects Ethernet frame structure to what a switch does. - Frame diagram boundary: Distinguish the Preamble and Start Frame Delimiter shown in the diagram from the contents of an Ethernet frame.
Why it matters: It prevents the diagram from giving a misleading impression of what counts as part of the frame.
Key terms: switches, forwarding decisions, Ethernet header, Preamble, Start Frame Delimiter (SFD), Ethernet frame
6.2.1 Preamble and SFD
This section explains how the Preamble and SFD prepare a receiver for an Ethernet frame and why neither is considered part of the frame.
- Receiver synchronization and frame start: Explain how the Preamble helps a receiving device determine bit timing and how the SFD signals that the frame is about to start. Describe their lengths and bit patterns.
Why it matters: It explains how a receiver gets ready to interpret the bits of an incoming Ethernet frame. - Physical Layer versus frame: Justify why the Preamble and SFD are sent with every Ethernet frame but are not considered part of the frame.
Why it matters: It keeps the physical signals used to receive a frame distinct from the Layer 2 frame itself.
Key terms: Preamble, SFD, receiver clock, Layer 1, Physical Layer, Layer 2, Ethernet frame
6.2.2 Destination and source
This section explains what Ethernet’s destination and source MAC address fields do, how MAC addresses are written, and how manufacturers assign them.
- Ethernet MAC address roles: Explain how the destination and source MAC address fields help deliver an Ethernet frame: the destination identifies the next hop for Layer 2 delivery, while the source helps a switch learn which port a host is connected to.
Why it matters: These two fields explain why a switch examines both addresses when handling a frame. - MAC address length and notation: Describe the length of a MAC address and why it is normally written as 12 hexadecimal characters rather than 48 binary digits. Recognize that different punctuation conventions can represent the same address.
Why it matters: Recognizing the length and notation lets you identify a MAC address even when devices display it in different formats. - Manufacturer-assigned MAC address structure: Explain why a MAC address is called a burned-in address and how its two three-byte halves support globally unique port addresses.
Why it matters: The split between the manufacturer identifier and port-specific portion explains how MAC addresses are intended to stay unique.
Key terms: Destination field, Source field, destination MAC address, source MAC address, next hop, MAC address, 48 bits, 6 bytes, hexadecimal, Cisco IOS
6.2.3 Type/Length
This section explains how the Ethernet Type/Length field identifies either an encapsulated packet’s length or its protocol type.
- Type/Length field interpretation: Explain how the value of the two-byte Type/Length field determines whether it gives a packet length or identifies an encapsulated protocol, and describe which use is common today.
Why it matters: The value tells you whether this Ethernet field describes a packet’s size or what kind of packet it carries. - IPv4 and IPv6 EtherTypes: State the EtherType values given for IPv4 and IPv6 and identify what those values signify.
Why it matters: These values are examples of how an Ethernet frame identifies the IP version it carries.
Key terms: Type/Length field, EtherType field, encapsulated packet, EtherType, IPv4, IPv6, 0x0800, 0x86DD
6.2.4 Frame Check Sequence
Explains how the Ethernet frame’s FCS detects corruption and why its checksum is called a CRC.
- FCS corruption detection: Explain how the sender and receiver use the Frame Check Sequence to detect a corrupted Ethernet frame and what the receiver does when the checksums differ.
Why it matters: The FCS lets a receiver detect when an Ethernet frame may have been corrupted in transit. - FCS and CRC terminology: Distinguish FCS, the four-byte field in the Ethernet trailer, from CRC, the name for the kind of checksum it contains.
Why it matters: Distinguishing the field from its checksum makes the terminology easier to follow.
Key terms: Frame Check Sequence, FCS, checksum, Ethernet trailer, cyclic redundancy check, CRC, redundancy
6.3 Frame switching
Introduces how switches use Ethernet source and destination fields to build a MAC address table and forward frames within a LAN.
6.3.1 MAC address learning
Explains how switches learn MAC-to-port mappings from incoming frames, how learned entries age out, and how Cisco ports are named in the book’s examples.
- Source-based MAC address learning: Explain how a switch builds its MAC address table from frames it receives and how an entry identifies the port through which a MAC address can be reached.
Why it matters: These learned mappings give a switch the information it uses when deciding where to send frames. - Dynamic entries and aging: Distinguish automatically learned dynamic MAC addresses from manually configured static ones, and describe when a dynamic entry is removed.
Why it matters: A learned table entry is not permanent if the switch stops hearing from that address. - Cisco port name notation: Describe what the speed label and numbers in the book’s Cisco port names mean, including the difference between physical-switch and CML port numbering.
Why it matters: This notation helps you read the port names used in the book’s network examples.
Key terms: Source field, MAC address table, MAC address learning, dynamic MAC addresses, static MAC addresses, MAC aging, Ethernet, FastEthernet, GigabitEthernet, TenGigabitEthernet
6.3.2 Frame flooding and forwarding
This section explains how switches forward known unicast frames, flood unknown ones, and learn addresses as frames travel between hosts.
- Known and unknown unicast handling: Distinguish known from unknown unicast frames by whether the switch has a destination MAC address entry, and explain how the switch handles each.
Why it matters: The destination MAC table entry determines whether a switch sends a unicast frame through one port or floods it. - Flooded request and forwarded reply: Trace PC1’s frame toward PC3 and PC3’s reply, including what each switch learns from the frames’ source MAC addresses.
Why it matters: The example shows why an initially flooded exchange can have a directly forwarded reply. - Switch transparency to hosts: Explain why PC1 and PC3 address frames to each other rather than to the switches, and what the switches do to those frames.
Why it matters: It clarifies that switches move hosts’ frames without becoming the addressed endpoints.
Key terms: known unicast frame, unknown unicast frame, MAC address table, forward, flood, Source, unicast frame, transparent, hop
6.3.3 The MAC address table in Cisco IOS
This section shows how to inspect a Cisco switch’s MAC address table, interpret its entries, and clear dynamically learned addresses when needed.
- MAC address table inspection: Explain how to view a Cisco switch’s MAC address table and interpret its address, port, Type, and Vlan information.
Why it matters: Reading the table lets you see which addresses a switch has associated with its ports. - Switch port MAC entries: Explain why another switch’s port MAC address can appear in the table even though switches do not use their port MAC addresses to forward traffic between hosts.
Why it matters: It explains an entry that might otherwise look out of place among hosts’ MAC addresses. - Dynamic address table clearing: Describe how to clear all dynamic MAC address entries, one specified address, or entries learned on a specified interface, and why manual clearing is usually unnecessary.
Why it matters: These commands let you remove learned entries deliberately without treating routine learning and aging as a manual task.
Key terms: show mac address-table, Type, DYNAMIC, STATIC, Vlan, switch port MAC address, MAC address table, clear mac address-table dynamic, address mac-address, interface interface-name
6.4 Address Resolution Protocol
This section explains how a host uses ARP to learn a LAN peer’s MAC address from its IP address, and what happens to the resulting frames and address information.
- IP-to-MAC address resolution: Explain why a host uses ARP before sending a frame to another host in its LAN and how ARP relates an IP address to a MAC address.
Why it matters: It explains how a host gets the destination MAC address needed to send a frame on its LAN. - Broadcast request and unicast reply: Trace the ARP request and reply between PC1 and PC3, including how the broadcast request identifies its target and how the reply returns.
Why it matters: The broadcast reaches the target even though its MAC address is unknown, while the IP address tells hosts which one should answer. - ARP tables and subsequent forwarding: Describe what hosts and switches learn during the exchange and how that affects PC1’s subsequent message to PC3.
Why it matters: The exchange prepares both the hosts and switches to handle the original message without repeating the same discovery immediately.
Key terms: Address Resolution Protocol (ARP), IP address, MAC address, Layer 2, Layer 3, ARP request, ARP reply, broadcast MAC address, ffff.ffff.ffff, unicast
6.5 Ping
This section explains how ping tests host reachability, how a destination is specified, and how to read basic Cisco IOS ping results.
- Ping purpose and destination: Explain that ping tests whether a host is reachable over a network and that the source gets the destination IP address from the `ping ip-address` command.
Why it matters: This explains both what a ping test checks and how it identifies the host to test. - Echo messages and results: Describe the ICMP echo request and echo reply used by ping, and interpret exclamation marks and periods in Cisco IOS ping output.
Why it matters: The request-and-reply exchange makes the symbols in a ping result meaningful. - Round-trip time reporting: Explain what ping’s round-trip time measures and what the minimum, average, and maximum values in the Cisco IOS example summarize.
Why it matters: Ping output can show response time as well as whether replies arrived.
Key terms: ping, ping ip-address, destination host, ICMP, ICMP echo request, ICMP echo reply, unicast, round-trip time, RTT, minimum
6.6 Summary
Where this is used later
- The IPv4 header (chapter 7) · The Ethernet header and trailer used for comparison.
- The IEEE 802.1Q tag (chapter 12) · Assumes familiarity with Ethernet header fields.
- IPv4 addressing (chapter 7) · Introduces source and destination fields in Ethernet frames.
- How end hosts send packets (chapter 9) · The destination MAC address in an Ethernet frame.
- The Protocol field (chapter 7) · Introduces the Ethernet header field used for the comparison.
- The Header Checksum field (chapter 7) · The Ethernet Frame Check Sequence as an error-checking field.
- Interface errors (chapter 8) · The Ethernet Frame Check Sequence
- Configuring VLANs and access ports (chapter 12) · How a switch learns MAC addresses from received frames.
Concepts explained in this chapter
- mac address tableA MAC address table is a switch data structure that maps learned MAC addresses to the ports through which their corresponding devices are reachable.
- mac agingMAC address learning is the switch process of associating source MAC addresses with the ports or interfaces on which frames arrive.
- broadcast networkA broadcast domain is the set of network devices that receive a broadcast frame sent by a member of the set.
- arpARP is a protocol that resolves an IPv4 address to the MAC address of a host on the local network.
- frame floodingFrame flooding is the forwarding of a frame out multiple switch ports when its destination is unknown or requires broadcast delivery.
- organizationally unique identifierAn organizationally unique identifier is the first three bytes of a MAC address, assigned by the IEEE to identify a manufacturer.
- arp replyAn ARP reply is a unicast protocol message that provides a host's MAC address to the host that sent an ARP request.
- arp requestAn ARP request is a broadcast protocol message that asks the host using a specified IP address to provide its MAC address.
- arp tableAn ARP table is a host-maintained list that associates IP addresses with corresponding MAC addresses.
- unicast frameUnicast is one-to-one network communication directed from one sender to one destination.
- unknown unicast frameAn unknown unicast frame is a unicast frame whose destination MAC address has no entry in the receiving switch's MAC address table.
- dynamic mac addressA dynamic MAC address is a MAC address learned automatically by a switch from received frame source information.
- network switchA Layer 2 switch is a switch that forwards frames within a local network without performing network-layer routing.
- mac addressA MAC address is a 48-bit link-layer address assigned to a network-device port, normally by the device manufacturer, for local hop-to-hop delivery.
- clear mac address-table dynamicclear mac address-table dynamic is a Cisco IOS command family for removing dynamically learned MAC addresses from a switch's MAC address table.
- show mac address-tableshow mac address-table is a Cisco IOS command that displays the MAC address table of a switch.
- ICMPICMP, or Internet Control Message Protocol, is a network-layer control protocol that communicates delivery status and diagnostic information for Internet Protocol.
- pingPing is a network utility that tests host reachability by sending Internet Control Message Protocol echo requests and receiving echo replies.
- EtherTypeEtherType is the Ethernet frame field designation for a Type/Length field value that identifies the encapsulated protocol or packet type.
- local networkA local area network is a network that connects devices within a limited geographic area such as an office or building.
- preambleA preamble is an Ethernet synchronization sequence transmitted before a frame to allow the receiver to prepare for incoming data.
- start frame delimiterA Start Frame Delimiter is an Ethernet byte pattern that marks the end of the preamble and the beginning of a frame.
- frame check sequenceAn FCS, or Frame Check Sequence, is an Ethernet trailer field used to detect errors in an entire frame.
- destination fieldA destination field is an Ethernet frame field that carries the MAC address of the intended next-hop recipient.
- hexadecimal numberThe hexadecimal number system is a base-16 positional numeral system using the digits 0 through 9 and the letters A through F.
- source fieldA source field is an Ethernet frame field that carries the MAC address of the sending port.
- broadcast frameBroadcast is one-to-all network communication directed to every host on the relevant network segment.
- known unicast frameA known unicast frame is a unicast frame whose destination MAC address has an entry in the receiving switch's MAC address table.
- headerAn IPv4 header is the network-layer protocol header that carries IPv4 addressing and control fields for delivering an IPv4 packet.
- trailerAn Ethernet trailer is supplemental data placed at the end of an Ethernet frame, including the FCS field for error detection.
- frameA frame is a data-link-layer protocol data unit consisting of a packet combined with a Layer 2 header and trailer.
- switchingA forwarding decision is a router's selection of the next forwarding action for a packet based on its destination and routing information.
- ICMP echo replyAn ICMP echo reply is an ICMP diagnostic message returned in response to an echo request.
- decimal numeral systemThe decimal number system is a base-10 positional numeral system that uses the digits 0 through 9.
- payloadA payload is the data carried inside a protocol data unit, excluding that unit's protocol control information.
- protocol data unitA protocol data unit is a unit of data consisting of a protocol payload together with the control information added at a networking layer.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
