Read a sample: 1. Following a Frame Through a Switched Network
A user reports that a workstation cannot reach a printer. Both devices are plugged into switches, the link lights appear active, and their IP addresses look plausible. Is the problem the cable, the switch, the VLAN, or the printer itself?
The useful answer begins with a smaller question: What should happen to one frame as it travels through the network? If you can describe the expected path, you can compare that path with what the devices actually report. A switch becomes less mysterious when you treat each port as a decision point rather than assuming that anything plugged into the same equipment can communicate.
This chapter establishes the Ethernet concepts and campus topology used throughout the book. You will trace traffic across switches, distinguish unicast from broadcast, and practice separating physical link status from end-to-end connectivity. Later chapters add VLANs, trunks, spanning tree, and routing to the same basic reasoning.
Our example is a small office with two access switches. For now, the switches have one connection between them, and all switch ports shown belong to the same VLAN. Treat that VLAN as a single Layer 2 broadcast domain. No router is needed for the local traffic in the first exercises.
text
Workstation A Workstation B
192.0.2.11/24 192.0.2.12/24
MAC 02:00:00:00:00:11 MAC 02:00:00:00:00:12
| |
| Gi0/1 Gi0/1 |
+----------- SW1 -------- Gi0/24 ---- Gi0/24 -------- SW2
| |
Gi0/2 | Gi0/2 |
Printer Workstation C
192.0.2.21/24 192.0.2.13/24
MAC 02:00:00:00:00:21 MAC 02:00:00:00:00:13
The interface names are examples in Cisco-style notation. Gi refers to Gigabit Ethernet, and the number identifies an interface on a device. Thus, SW1 Gi0/1 and SW2 Gi0/1 are different ports, even though their interface names match.
Each endpoint has an IP address and a MAC address. The IP addresses in the diagram share a /24 subnet, so the hosts ordinarily treat one another as local destinations. The MAC addresses are deliberately easy to distinguish: the final portion corresponds to the host number in each example.
The link between SW1 and SW2 is an inter-switch link. At this stage, assume it carries the one VLAN used by all four endpoints. Later, we will use inter-switch links to carry multiple VLANs and will examine the configuration required to make that work.
The topology shows a potential physical path, not proof that traffic can use it. A cable can be disconnected, a port can be disabled, or a forwarding decision can prevent traffic from taking an otherwise visible route. Keep the diagram and the operational state separate in your mind.
Ethernet is a Layer 2 technology. An Ethernet frame carries information that allows devices on a local network segment to identify the sender and intended recipient. For the purposes of this chapter, focus on these parts:
- Destination MAC address: identifies the intended Layer 2 recipient or recipients.
- Source MAC address: identifies the sending interface at Layer 2.
- EtherType or length field: helps identify the payload or describe its length, depending on the value.
- Payload: carries the data being transported, often an IP packet.
- Frame check sequence: provides error-detection information used by the receiving device.
The frame also has transmission-related details that are not essential to our first forwarding traces. What matters here is that the switch can inspect the frame’s MAC addressing and make a port-level decision.
Do not confuse a frame with the IP packet it carries. A host sending an IP packet over Ethernet encapsulates that packet in an Ethernet frame. In our local example, the destination IP address identifies the intended host at Layer 3, while the destination MAC address identifies the intended recipient on the local Ethernet network.
For example, a frame from Workstation A to the printer might be represented as:
text
Ethernet frame
Source MAC: 02:00:00:00:00:11
Destination MAC: 02:00:00:00:00:21
IP packet
Source IP: 192.0.2.11
Destination IP: 192.0.2.21
This representation assumes A already knows the printer’s MAC address. If it does not, A must first resolve the printer’s IPv4 address to a MAC address, commonly using ARP. We will trace that exchange shortly.
When traffic must reach a different IP subnet, the sending host generally addresses the Ethernet frame to its local default gateway, while the packet’s destination IP remains the remote host. Routing and new Ethernet encapsulation become important in the inter-VLAN chapters. For now, our destinations are local.
A switch receives a frame on an ingress port and, when appropriate, sends a copy out one or more egress ports. These names describe the direction of a particular frame, not permanent roles assigned to the interfaces.
Suppose Workstation A sends a frame to the printer. It enters SW1 on Gi0/1. If SW1 knows that the printer’s MAC address is reachable through Gi0/2, and the ports are eligible to forward in the same VLAN, SW1 sends the frame out Gi0/2. It does not need to send that known unicast frame to SW2.
The MAC address table supports this decision. A switch learns MAC addresses from the source addresses of frames it receives, associating them with incoming ports and VLANs. It then uses a frame’s destination address to look for an appropriate outgoing port. Chapter 2 examines the learning process, table entries, aging, and exceptions in detail.
For now, use three working ideas:
1. A switch learns where a source MAC address is reachable by observing received frames. 2. A known unicast destination can be forwarded toward its associated port. 3. If…