Question #40

Refer to the exhibit. Which outcome is expected when PC_A sends data to PC_B after their initial communication?
A
The source MAC address is changed.
B
The destination MAC address is replaced with ffff.ffff.ffff.
C
The source and destination MAC addresses remain the same.
D
The switch rewrites the source and destination MAC addresses with its own.
English
## Detailed Analysis of the CCNA Exam Question ### 1. Understanding the Network Diagram Let's break down the components shown in the diagram: * **Switch1:** This is a Layer 2 networking device. Its primary function is to forward data frames between devices on the same Local Area Network (LAN) based on MAC addresses. The arrows indicating multiple directions suggest it can forward traffic between multiple connected devices. * **PC_A and PC_B:** These are two end-user computers. They are the hosts that will be communicating. * **Connections:** Both PC_A and PC_B are directly connected to Switch1. * **VLAN 200:** This label is crucial. It indicates that the ports on Switch1 to which PC_A and PC_B are connected are configured for **VLAN 200**. ### 2. Key Technical Terms and Concepts * **MAC Address (Media Access Control Address):** * **Explanation:** A unique physical address assigned to every network interface card (NIC) by its manufacturer. It's a 48-bit (6-byte) address, usually represented in hexadecimal format (e.g., `AA:BB:CC:DD:EE:FF`). * **Function:** MAC addresses operate at Layer 2 (Data Link Layer) of the OSI model. They are used for local communication within a single broadcast domain (e.g., a LAN segment or a VLAN). When a device sends data, it includes its own MAC address as the **source MAC address** and the MAC address of the intended recipient within the local network as the **destination MAC address**. * **Switch (Layer 2):** * **Explanation:** A network device that connects multiple devices in a LAN. * **Function:** Switches learn the MAC addresses of connected devices and store them in a **MAC address table** (also known as a CAM table). When a switch receives a data frame, it examines the **destination MAC address**. * If the destination MAC is known and associated with a specific port, the switch forwards the frame only out that port (**unicast**). * If the destination MAC is unknown, the switch floods the frame out all ports *except* the one it came in on (this is known as an **unknown unicast flood**). * If the destination MAC is a broadcast address (`FFFF.FFFF.FFFF`), the switch floods the frame out all ports *except* the one it came in on (**broadcast**). * **Crucial Point:** Standard Layer 2 switches do **not** modify the source or destination MAC addresses of frames when forwarding them within the same broadcast domain. * **VLAN (Virtual Local Area Network):** * **Explanation:** A logical segmentation of a physical network. It allows devices connected to the same physical switch (or multiple switches) to be grouped into separate broadcast domains, even if they are physically on the same switch. * **Function:** Devices within the *same* VLAN can communicate directly at Layer 2 (using MAC addresses). Devices in *different* VLANs cannot communicate directly at Layer 2; they require a Layer 3 device (like a router or a Layer 3 switch) to route traffic between them. * **"After their initial communication":** This phrase is very important. It implies that PC_A and PC_B have already exchanged some data, and therefore, Switch1 has already learned the MAC addresses of both PC_A and PC_B and stored them in its MAC address table. This ensures that the switch will perform a unicast forwarding operation for subsequent traffic between them. ### 3. Analyzing the Scenario 1. **PC_A and PC_B are in the same VLAN (VLAN 200).** This means they are in the same broadcast domain and can communicate directly at Layer 2. 2. **PC_A sends data to PC_B.** 3. **"After their initial communication"** means Switch1 knows: * PC_A's MAC address is reachable via the port connected to PC_A. * PC_B's MAC address is reachable via the port connected to PC_B. When PC_A prepares a data frame to send to PC_B, it will encapsulate the data with: * **Source MAC Address:** PC_A's own MAC address. * **Destination MAC Address:** PC_B's MAC address (which PC_A would have discovered through ARP, assuming it's an IP communication). When this frame arrives at Switch1: * Switch1 inspects the destination MAC address (PC_B's MAC). * Since Switch1 has learned PC_B's MAC address and knows it's associated with the port connected to PC_B, Switch1 will forward the frame directly out that specific port. * The frame will reach PC_B, and PC_B will process it because the destination MAC address matches its own. ### 4. Evaluating the Options * **The source MAC address is changed.** * **Incorrect.** A Layer 2 switch does not alter the source MAC address of a frame when forwarding within the same VLAN. The source MAC address identifies the original sender of the frame (PC_A). * **The destination MAC address is replaced with ffff.ffff.ffff.** * **Incorrect.** `ffff.ffff.ffff` is the broadcast MAC address. This would only happen if PC_A was sending a broadcast message. In a direct communication between PC_A and PC_B *after initial communication*, the switch knows the specific destination MAC address and will forward it as a unicast frame. * **The source and destination MAC addresses remain the same.** * **Correct.** As explained above, a Layer 2 switch's fundamental role is to forward frames based on their MAC addresses without modifying them, especially when both devices are in the same VLAN and the destination MAC is known. The frame that leaves Switch1 towards PC_B will have PC_A's MAC as the source and PC_B's MAC as the destination, exactly as PC_A sent it. * **The switch rewrites the source and destination MAC addresses with its own.** * **Incorrect.** This behavior is typically observed in Layer 3 routing, where a router will change the source and destination Layer 2 addresses as a packet crosses different Layer 2 segments. A Layer 2 switch, operating within the same VLAN, does not perform this function. It simply forwards the frame. ### 5. Final Conclusion When PC_A sends data to PC_B in the same VLAN, and the switch has already learned their MAC addresses, the Layer 2 switch simply forwards the frame. It does not modify any of the MAC addresses within that frame. Therefore, both the source and destination MAC addresses remain unchanged. The final answer is $\boxed{\text{The source and destination MAC addresses remain the same.}}$
日本語
CCNA(Cisco Certified Network Associate)の視点から、この問題に関する詳細な解析レポートを提供します。 --- # CCNA試験対策:ネットワーク通信解析レポート ## 1. 問題の概要 この設問は、**「初期通信(Initial Communication)」が完了した後**に、PC_AからPC_Bへデータが送信された際のネットワーク機器(主にスイッチやルータ)の挙動を問うものです。 ネットワークの動作原理、特に**ARP(Address Resolution Protocol)**、**MACアドレステーブル**、および**ユニキャスト転送**の仕組みを理解しているかが問われています。 --- ## 2. 技術的な解析 「初期通信が完了した後」という条件は、以下の状態が確立されていることを意味します。 ### ① ARPキャッシュの構築完了 * **PC_AのARPテーブル:** PC_B(またはデフォルトゲートウェイ)のIPアドレスに対応するMACアドレスが既にキャッシュされています。 * **結果:** PC_Aは通信を開始する際、**ARPリクエスト(ブロードキャスト)を送信する必要がありません。** ### ② MACアドレステーブル(CAMテーブル)の学習完了 * **スイッチの挙動:** 初回の通信時に、スイッチはPC_AとPC_Bがどの物理ポートに接続されているかを学習済みです。 * **結果:** スイッチは受信したフレームの宛先MACアドレスを自身のテーブルと照合し、一致する特定のポートにのみフレームを転送します。 ### ③ ユニキャスト転送の実施 * 初期通信時(MACアドレスが不明な場合)は、スイッチは「未知のユニキャスト(Unknown Unicast)」として全ポートにフラッディング(Flood)しますが、今回は学習済みのため、**特定のポートへのみ転送(Forward)**が行われます。 --- ## 3. 期待される結果(正解のポイント) 展示(Exhibit)の構成によりますが、一般的に以下のいずれかが正解の選択肢となります。 1. **「スイッチは、宛先MACアドレスに基づいて、PC_Bが接続されている特定のポートにのみフレームを転送する。」** * 理由:MACアドレステーブルが構築済みであり、ユニキャスト転送が行われるため。 2. **「PC_AはARPリクエストを送信せずに、直接データをカプセル化して送信する。」** * 理由:PC_AのARPキャッシュに宛先情報が保持されているため。 3. **「フレームはブロードキャストされず、ユニキャストとして処理される。」** * 理由:宛先MACアドレスが既知であるため。 --- ## 4. プロフェッショナル・アドバイス(試験対策) この種の問題を解く際は、以下の**「通信の3ステップ」**を意識してください。 1. **L3解決 (ARP):** 宛先IPに対するMACアドレスを知っているか? * 知らなければ ARP Request (Broadcast) * 知っていれば 次のステップへ 2. **L2学習 (Switching):** スイッチはそのMACアドレスがどのポートにあるか知っているか? * 知らなければ Flooding * 知っていれば **Unicast Forwarding** 3. **カプセル化の変化:** ルータを越える場合、送信元/宛先MACアドレスは書き換えられるが、IPアドレスは維持される。 **「初期通信後」というキーワードがあれば、それは「学習プロセス(Broadcast/Flooding)は既に終わった効率的な通信状態」を指していると判断してください。** --- ## 5. 結論 本設問における期待される結果は、**「スイッチがMACアドレステーブルを参照し、宛先ポートに対してのみフレームをユニキャストで転送する」**ことです。これにより、ネットワークの帯域消費が抑えられ、効率的な通信が実現されます。 以上が、ネットワークエンジニアの視点による解析です。受験頑張ってください。
繁體中文
這是一題經典的 **CCNA 網路基礎觀念題**,主要考察交換機(Switch)在 Layer 2 的運作機制,特別是關於 **MAC 位址表(MAC Address Table)** 的學習與轉發行為。 以下是針對此考題的專業深度解析: --- ### 1. 考題核心知識點 在分析此問題之前,我們必須掌握交換機的三大功能: * **學習 (Learning):** 交換機透過檢查進入封包的「來源 MAC 位址」來建立 MAC 位址表。 * **轉發 (Forwarding):** 交換機透過檢查封包的「目的 MAC 位址」並比對 MAC 位址表,決定從哪個連接埠將封包送出。 * **泛洪 (Flooding):** 當目的 MAC 為廣播位址(FF:FF:FF:FF:FF:FF)或在表中找不到對應項目(Unknown Unicast)時,會將封包從除了接收埠以外的所有連接埠送出。 --- ### 2. 關鍵情境分析:「Initial Communication」 題目中提到一個關鍵前提:**「after their initial communication」(在完成初始通訊之後)**。 這句話隱含了兩個極為重要的狀態: 1. **ARP 暫存已建立:** PC_A 已經透過 ARP 協議得知了 PC_B 的 MAC 位址,因此 PC_A 封裝的資料幀(Frame)中,**目的 MAC 位址(Destination MAC)將會是 PC_B 的硬體位址**。 2. **交換機 MAC 表已填充:** 由於先前已經有過通訊,交換機(Switch)已經記錄了: * PC_A 的 MAC 位址及其對應的連接埠。 * PC_B 的 MAC 位址及其對應的連接埠。 --- ### 3. 預期結果詳解 (Expected Outcome) 當 PC_A 再次發送數據給 PC_B 時,會發生以下行為: 1. **封裝階段:** PC_A 在 L2 標頭封裝目的 MAC(PC_B 的 MAC),並將封包送往交換機。 2. **查表階段:** 交換機接收到該資料幀,讀取其「目的 MAC 位址」。 3. **精確轉發 (Unicast Forwarding):** 由於交換機的 MAC 位址表中已經存在 PC_B 的記錄,交換機**只會**將該資料幀從連接 PC_B 的特定連接埠轉發出去。 4. **結果:** 該資料幀**不會**被發送到網路上的其他主機(例如 PC_C 或其他 VLAN 設備),這稱為「單播(Unicast)轉發」。 --- ### 4. 為什麼不是其他行為? * **為什麼不是 Flooding (泛洪)?** 因為這不是「初始通訊」。如果是第一次通訊且交換機表為空,交換機才會進行泛洪。 * **為什麼不是 Broadcast (廣播)?** 因為 PC_A 已經知道 PC_B 的 MAC,不需要再發送 ARP Request 廣播。 * **安全性與效率:** 這是交換機與集線器(Hub)最大的區別。交換機透過 MAC 位址表減少了不必要的流量,提升了網路頻寬利用率。 --- ### 5. 總結 **正確答案解析:** 交換機將根據其 **MAC 位址表**,將資料幀以 **單播 (Unicast)** 的方式直接轉發至連接 PC_B 的連接埠。 **工程師筆記:** 在 CCNA 考試中,看到 "initial communication" 或 "ARP cache is populated" 就要立刻反應過來:**交換機現在處於「已知路徑」狀態**。此時的行為是 **Forwarding** 而非 **Flooding**。 --- **專業術語參考:** * **MAC Address Table:** MAC 位址表 (有時稱為 CAM Table) * **Unicast:** 單播 * **ARP (Address Resolution Protocol):** 位址解析協定 * **Frame:** 資料幀 (Layer 2 PDU)
简体中文
这是一份针对该 CCNA 考题的专业技术解析。 --- # 📝 CCNA 考题分析报告 ### 1. 题目背景 (Context) 在典型的 CCNA 实验或考试场景中,此题目通常展示了两个终端(PC_A 和 PC_B)连接在同一台二层交换机(Switch)上。关键点在于:**“Initial communication”(初始通信)已经完成**。 ### 2. 预期结果 (Expected Outcome) 当 PC_A 在初始通信后再次向 PC_B 发送数据时,预期的结果是: > **交换机将通过单播(Unicast)方式,仅将数据帧从连接 PC_B 的特定端口转发出去,而不会泛洪(Flood)到其他端口。** --- ### 3. 深度技术解析 (Technical Analysis) 作为网络工程师,我们需要从 **ARP 缓存**和**交换机 MAC 地址表(CAM 表)**两个维度来理解这个过程: #### A. 终端层面的行为:ARP 缓存 1. **初始通信阶段**:PC_A 最初并不知道 PC_B 的 MAC 地址,因此会发送 ARP 请求(广播)。 2. **后续阶段**:由于“初始通信”已完成,PC_A 的本地 **ARP 缓存 (ARP Cache)** 中已经记录了 PC_B 的 IP 地址与 MAC 地址的映射关系。 3. **封装过程**:当 PC_A 再次发送数据时,它会直接在二层头部封装 PC_B 的目标 MAC 地址,无需再次发送 ARP 请求。 #### B. 交换机层面的行为:MAC 地址表 (CAM Table) 交换机是基于源 MAC 地址学习,基于目标 MAC 地址转发的设备: 1. **学习 (Learning)**:在初始通信时,交换机已经通过 PC_A 和 PC_B 发送的帧,学习到了它们的 MAC 地址,并将 `MAC地址 <-> 端口` 的对应关系存入了 **MAC 地址表**。 2. **转发 (Forwarding)**: * 当交换机接收到 PC_A 发往 PC_B 的帧时,它会检查帧中的**目标 MAC 地址**。 * 交换机在 MAC 地址表中进行查找(Lookup)。 * 由于表中已经存在 PC_B 的条目,交换机执行**单播转发**,将帧精准地从 PC_B 所在的端口送出。 --- ### 4. 关键知识点对比 (Key Concepts) 为了在考试中准确排除错误选项,请参考下表: | 场景 | 交换机行为 | 原因 | | :--- | :--- | :--- | | **首次通信 (未知目标 MAC)** | 泛洪 (Flooding) | 目标 MAC 不在地址表中,除源端口外所有端口转发。 | | **后续通信 (已知目标 MAC)** | **单播 (Unicast)** | **目标 MAC 已存在于 MAC 地址表中,实现精确转发。** | | **ARP 未解析时** | 广播 (Broadcast) | 终端需要通过广播获取目标 MAC。 | --- ### 5. 工程师总结 (Summary) **核心结论:** 本题考察的是交换机的**二层转发机制**。 由于“初始通信”已经发生,交换机的 MAC 地址表已处于“收敛”或“就绪”状态。因此,PC_A 到 PC_B 的数据流不再触发广播或泛洪,而是实现了高效的**点对点单播传输**。 **考场避坑指南:** * 如果选项提到“Switch floods the frame”,那是错误的,因为这是初始通信前的行为。 * 如果选项提到“PC_A sends an ARP request”,那也是错误的,因为 ARP 条目已存在于 PC 的缓存中。 --- **专业建议:** 在准备 CCNA 时,熟练掌握 `show mac address-table` 命令是理解此物理过程的关键。