Question #37
An office has 8 floors with approximately 30-40 users per floor. One subnet must be used. Which command must be configured on the router Switched Virtual Interface to use address space efficiently?
A
ip address 192.168.0.0 255.255.0.0
B
ip address 192.168.0.0 255.255.254.0
C
ip address 192.168.0.0 255.255.255.128
D
ip address 192.168.0.0 255.255.255.224
English
This question tests your understanding of IP addressing, subnetting, and efficient address space allocation, which are fundamental concepts in networking and crucial for the CCNA exam.
Let's break down the question and analyze each component.
---
### **Understanding the Question**
The core of the question asks you to select the correct **subnet mask** (implied by the `ip address` command) that efficiently accommodates a specific number of users within a **single subnet**. The command is for a **Switched Virtual Interface (SVI)**, which is a virtual interface on a Layer 3 switch that acts as the default gateway for a VLAN (which represents our single subnet in this scenario).
**Key Requirements:**
1. **Office Size:** 8 floors.
2. **Users per Floor:** Approximately 30-40 users per floor.
3. **Subnet Constraint:** *One subnet must be used* for all users. This is critical as it means we cannot segment the network further for this problem.
4. **Objective:** Use address space *efficiently*. This means choosing the smallest possible subnet that can accommodate all users, without significant waste.
5. **Device:** Router Switched Virtual Interface (SVI). An SVI allows a Layer 3 switch to perform routing functions for VLANs.
---
### **Key Concepts Explained**
* **IP Address:** A unique numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. An example is `192.168.1.10`.
* **Subnet Mask:** A 32-bit number that distinguishes the network portion of an IP address from the host portion. It works like a filter. For example, `255.255.255.0` tells you that the first three octets (groups of 8 bits) represent the network, and the last octet represents the host on that network.
* **Subnet (Subnetwork):** A logical subdivision of an IP network. Devices within the same subnet can communicate directly. To communicate between different subnets, a router is required.
* **Switched Virtual Interface (SVI):** On a Layer 3 switch, an SVI is a virtual interface associated with a VLAN. It acts as the default gateway for devices in that VLAN, allowing them to communicate with other subnets or networks (routed by the Layer 3 switch). The `ip address` command is configured on this SVI.
* **Address Space Efficiency:** Choosing an IP address range (subnet) that is just large enough to accommodate the required number of hosts, plus a small buffer, without allocating a needlessly large number of addresses that would go unused. Wasting addresses can lead to scalability issues and make network management more complex.
* **Host Bits:** In a subnet mask, the '0' bits (after the '1' bits) represent the host portion of an IP address. The number of possible host IP addresses in a subnet is calculated using the formula `2^n`, where `n` is the number of host bits.
* **Usable Host Addresses:** From the total possible host IP addresses (`2^n`), two addresses are reserved:
* **Network Address:** The first address in the range, used to identify the subnet itself.
* **Broadcast Address:** The last address in the range, used to send data to all devices within that subnet.
Therefore, the number of *usable* host addresses is `2^n - 2`.
---
### **Step-by-Step Analysis**
#### 1. Calculate the Total Number of Required Users/Devices
* Floors: 8
* Users per floor: 30-40
* Maximum users: 8 floors \* 40 users/floor = **320 users**
We need a subnet that can accommodate at least 320 users. Additionally, we need to account for the SVI's IP address (the default gateway) and potentially other network devices like printers, servers, or access points, which typically need static IP addresses. So, we should aim for a subnet with a *usable host count slightly greater than 320*.
#### 2. Evaluate Each Option Based on Usable Host Addresses
We will look at each subnet mask, determine its host bits, and calculate the number of usable host addresses. We're looking for a mask that gives us *more than 320 usable addresses* but is not excessively large (for efficiency).
**Option 1: `ip address 192.168.0.0 255.255.0.0`**
* **Subnet Mask:** `255.255.0.0`
* **Binary Representation:** `11111111.11111111.00000000.00000000`
* **Network Bits:** 16 (the first two octets)
* **Host Bits (n):** 16 (the last two octets, 8 + 8 = 16)
* **Total IP Addresses:** `2^16 = 65,536`
* **Usable Host Addresses:** `65,536 - 2 = 65,534`
* **Analysis:** This provides far too many addresses (65,534) for 320 users. This is highly inefficient.
**Option 2: `ip address 192.168.0.0 255.255.254.0`**
* **Subnet Mask:** `255.255.254.0`
* **Binary Representation:** `11111111.11111111.11111110.00000000`
* **Network Bits:** 23 (the first 23 bits)
* **Host Bits (n):** 9 (the last 9 bits, 1 in the third octet + 8 in the fourth octet)
* **Total IP Addresses:** `2^9 = 512`
* **Usable Host Addresses:** `512 - 2 = 510`
* **Analysis:** This provides 510 usable addresses. This is sufficient for 320 users, and provides a reasonable buffer for growth or additional devices. Among the given options, this is the most efficient choice that meets the requirement.
**Option 3: `ip address 192.168.0.0 255.255.255.128`**
* **Subnet Mask:** `255.255.255.128`
* **Binary Representation:** `11111111.11111111.11111111.10000000`
* **Network Bits:** 25 (the first 25 bits)
* **Host Bits (n):** 7 (the last 7 bits)
* **Total IP Addresses:** `2^7 = 128`
* **Usable Host Addresses:** `128 - 2 = 126`
* **Analysis:** This provides only 126 usable addresses, which is far too few for 320 users.
**Option 4: `ip address 192.168.0.0 255.255.255.224`**
* **Subnet Mask:** `255.255.255.224`
* **Binary Representation:** `11111111.11111111.11111111.11100000`
* **Network Bits:** 27 (the first 27 bits)
* **Host Bits (n):** 5 (the last 5 bits)
* **Total IP Addresses:** `2^5 = 32`
* **Usable Host Addresses:** `32 - 2 = 30`
* **Analysis:** This provides only 30 usable addresses, which is also far too few for 320 users.
---
### **Conclusion**
Based on the calculations, only the subnet mask `255.255.254.0` provides enough usable IP addresses (510) to accommodate the required 320+ users, while also being the most efficient option among the choices. The other options are either too large (inefficient) or too small (insufficient).
Therefore, the command to configure on the router's SVI would be `ip address 192.168.0.0 255.255.254.0` (where `192.168.0.0` would typically be replaced by the actual network address of the subnet, e.g., `192.168.0.1` for the SVI's IP). The question uses `192.168.0.0` as a placeholder for the network ID, but the crucial part is the subnet mask.
The **correct answer** is: **`ip address 192.168.0.0 255.255.254.0`**
日本語
CCNA試験対策として、ご提示いただいた問題の技術的背景と詳細な解析をプロのネットワークエンジニアの視点から解説します。
---
# CCNA試験問題解析:効率的なサブネット設計とSVI設定
## 1. 問題の要約
* **環境**: 8階建てのオフィス。
* **ユーザー数**: 各フロア 30〜40名。
* **制約条件**: 全体を1つのサブネットで運用する。
* **目的**: アドレス空間を最も効率的に使用するための、ルータのSVI(Switched Virtual Interface)への設定コマンドを特定する。
---
## 2. 技術的解析と計算
ネットワーク設計において「効率的」という言葉は、**「必要なホスト数を満たしつつ、未使用のアドレス(無駄)を最小限に抑える」**ことを意味します。
### ステップ1:必要な総ホスト数の算出
まず、全フロアの合計ユーザー数を計算します。
* 最小構成:30名 × 8フロア = 240名
* 最大構成:40名 × 8フロア = **320名**
したがって、少なくとも **320個のホストIPアドレス** を収容できるサブネットマスクを選択する必要があります。
### ステップ2:適切なサブネットマスクの選定(CIDR)
ホストビット数($n$)と利用可能なホスト数($2^n - 2$)の関係から、最適なマスクを導き出します。
* **/24 (255.255.255.0)**:
* ホストビット:8ビット
* ホスト数:$2^8 - 2 = 254$
* **判定:不足**(320名を収容できない)
* **/23 (255.255.254.0)**:
* ホストビット:9ビット
* ホスト数:$2^9 - 2 = 510$
* **判定:適合**(320名を収容可能であり、かつ最小のサイズ)
* **/22 (255.255.252.0)**:
* ホストビット:10ビット
* ホスト数:$2^{10} - 2 = 1022$
* **判定:非効率**(アドレスの空きが多すぎる)
---
## 3. 解答(コマンド)
この要件を満たすために、SVI(例:VLAN 10)に設定すべきコマンドは以下の通りです。
```bash
interface vlan 10
ip address [IPアドレス] 255.255.254.0
```
※試験の選択肢にCIDR表記がある場合は、サブネットマスク **255.255.254.0** を含むものが正解となります。
---
## 4. プロの視点による詳細解説
### なぜ SVI なのか?
問題文に「Router Switched Virtual Interface」とありますが、これは通常、レイヤ3スイッチ(L3 Switch)においてVLAN間ルーティングを行う際のインターフェースを指します。8フロアにまたがる大規模な単一サブネットを構成する場合、物理的なルータのポートではなく、VLANを論理的なインターフェース(SVI)として終端させるのが一般的です。
### 効率性の重要性
IPv4アドレスは有限のリソースです。
* もし `/24` を選択してしまうと、80名以上のユーザーがネットワークに接続できなくなる設計ミスとなります。
* もし `/22` 以上を選択すると、将来の拡張性は確保できますが、試験問題で問われている「効率的(Efficiently)」という観点からは、必要最小限のサイズである `/23` が正解として導き出されます。
### 実務での注意点(Broadcast Domain)
実務上、320名(+プリンタやWi-Fi機器など)を一つのサブネット(ブロードキャストドメイン)に収容すると、ブロードキャストトラフィックが増大し、ネットワークのパフォーマンスに影響を与える可能性があります。しかし、**「試験対策」としては、問題文の制約(One subnet must be used)に従い、計算結果に基づいた回答を行うことが重要です。**
---
## 5. まとめ:試験のポイント
1. **総ホスト数を正確に計算する**(40名 × 8 = 320)。
2. **$2^n - 2$ の公式に当てはめる**($2^9-2=510$ が 320 を超える最小のべき乗)。
3. **プレフィックス長をサブネットマスクに変換する**(/23 = 255.255.254.0)。
このプロセスをマスターすることで、CCNAのサブネット計算問題は確実に得点源にできます。
繁體中文
這是一題經典的 **CCNA (Cisco Certified Network Associate)** 考題,主要考察網路工程師對於 **VLSM (可變長度子網路遮罩)** 的規劃能力以及對 **SVI (Switched Virtual Interface)** 配置的理解。
以下是針對此考題的詳細專業分析:
---
### 1. 需求分析 (Requirement Analysis)
首先,我們必須量化環境需求以確定所需的 IP 位址數量:
* **樓層數**:8 層樓。
* **每層用戶數**:30 - 40 人。
* **限制條件**:必須使用「單一子網路 (One subnet)」。
* **最大用戶估算**:$8 \text{ floors} \times 40 \text{ users/floor} = 320 \text{ users}$。
除了這 320 個用戶節點外,網路工程師還必須預留:
1. **預設閘道 (Default Gateway)**:通常佔用 1 個位址。
2. **網路位址 (Network ID)**:1 個。
3. **廣播位址 (Broadcast Address)**:1 個。
4. **未來擴充空間**:實務上建議預留 10-20% 的緩衝。
因此,該子網路至少需要容納約 **323 個以上的有效 IP 位址**。
---
### 2. 子網路計算與遮罩選擇 (Subnetting Calculation)
在二進位制的世界中,主機位元數(Host bits)決定了可用的 IP 數量,公式為 $2^n - 2$。
* **若使用 /24 (遮罩 255.255.255.0)**:
* 主機位元 = 8 bits。
* 可用主機數 = $2^8 - 2 = 254$ 個位址。
* **結論**:無法滿足 320 名用戶的需求。
* **若使用 /23 (遮罩 255.255.254.0)**:
* 主機位元 = 9 bits。
* 可用主機數 = $2^9 - 2 = 512 - 2 = 510$ 個位址。
* **結論**:足以容納 320 名用戶,並留有適當的擴充空間,且最符合「效率 (Efficiently)」原則。
* **若使用 /22 (遮罩 255.255.252.0)**:
* 可用主機數 = $2^{10} - 2 = 1022$ 個位址。
* **結論**:雖然能用,但造成過多位址浪費,不符合題目要求的「Efficiently (高效率)」。
---
### 3. 指令實作 (Command Implementation)
在 Cisco 設備上,SVI 是指在 Layer 3 交換機上為特定 VLAN 配置的邏輯介面。為了實施上述規劃,我們需要在 SVI 介面(假設為 VLAN 10)下配置 IP 位址。
**正確的配置指令範例:**
```ios
Router(config)# interface vlan 10
Router(config-if)# ip address 192.168.0.1 255.255.254.0
Router(config-if)# no shutdown
```
*註:`255.255.254.0` 即為 `/23` 的十進位表示法。*
---
### 4. 專家解析與總結
**為什麼這題的關鍵是 /23?**
在網路設計中,效率(Efficiency)意味著「在滿足需求的前提下,浪費最少的位址空間」。
* /24 太小(254 < 320)。
* **/23 剛好(510 > 320),是第一個能覆蓋需求且不浪費過多空間的遮罩。**
#### 考題重點整理:
1. **SVI 的角色**:在單一子網路跨越多個樓層(通常涉及多台交換機)時,SVI 作為該 VLAN 的 Layer 3 閘道。
2. **遮罩計算**:必須熟記 $2^n$ 的次方表。
* $2^8 = 256$
* $2^9 = 512$
3. **最佳實踐**:雖然題目要求「單一子網路」,但在真實企業環境中,若廣播風暴過於嚴重,通常會建議將 8 個樓層切割為不同的 VLAN。但就本題「考試邏輯」而言,**`/23` (255.255.254.0)** 是唯一正確的專業解答。
**最終建議答案:**
應配置 `ip address [IP位址] 255.255.254.0` 於 SVI 介面上。
简体中文
这是一道典型的 Cisco CCNA 等级考试题目,考查的是**子网划分(Subnetting)**、**VLSM(可变长子网掩码)**的应用以及在 **SVI(交换虚拟接口)** 上的配置能力。
以下是作为网络工程师对该题目的详细深度解析:
---
### 1. 需求分析 (Scenario Analysis)
首先,我们需要量化网络环境的需求:
* **楼层数**:8 层。
* **每层用户数**:30-40 人。
* **总用户需求**:$8 \times 40 = 320$ 个 IP 地址(取最大值以确保可用性)。
* **约束条件**:
1. 必须使用**一个子网**(One subnet must be used)。
2. 必须**高效利用地址空间**(Use address space efficiently)。
3. 配置对象是 **SVI (Switched Virtual Interface)**。
### 2. 子网计算 (Subnet Calculation)
为了满足至少 320 个主机的需求,我们需要确定所需的**主机位(Host bits)**:
* 如果使用 8 位主机位 ($2^8 - 2 = 254$ 个可用地址):**不足**以覆盖 320 个用户。
* 如果使用 9 位主机位 ($2^9 - 2 = 510$ 个可用地址):**足以**覆盖 320 个用户。
根据 CIDR(无类别域间路由)计算掩码:
* 网络位 = $32 - 9 = 23$ 位。
* 子网掩码 (Prefix):`/23`。
* 点分十进制掩码:`255.255.254.0`。
**为什么这是“高效”的?**
如果我们选择 `/22` (1022 个地址),会造成过多的地址浪费;如果我们选择 `/24`,则无法容纳所有用户。因此,`/23` 是满足 320 个用户需求的最精确、最节省地址空间的掩码。
### 3. 命令配置 (Command Implementation)
在 Cisco IOS 设备(通常是三层交换机)上,我们需要进入对应的 VLAN SVI 接口进行配置。假设我们使用的是 VLAN 10。
**配置命令如下:**
```bash
Router/Switch(config)# interface vlan 10
Router/Switch(config-if)# ip address 192.168.0.1 255.255.254.0
```
*(注:IP 地址 `192.168.0.1` 仅为示例,关键在于掩码 `255.255.254.0`)*
### 4. 核心考点总结 (Key Takeaways)
作为网络工程师,在处理此类问题时应注意以下几点:
1. **SVI 的角色**:在三层交换架构中,SVI 充当该 VLAN 内所有主机的默认网关。尽管题目中提到 "Router SVI",在实际操作中,这通常指三层交换机上的 `interface vlan`。
2. **广播域大小**:虽然题目要求使用一个子网,但在实际生产环境中,将 320 个用户置于同一个广播域(/23)是可行的,但已经接近建议的上限(通常建议一个 VLAN 不超过 254 或 512 个设备),以防止广播风暴影响性能。
3. **计算准确性**:
* `/24` = `255.255.255.0` (254 Hosts)
* `/23` = `255.255.254.0` (510 Hosts)
* `/22` = `255.255.252.0` (1022 Hosts)
### 5. 最终结论
为了最高效地利用地址空间并满足 320-340 个 IP 需求(考虑网关和预留),必须配置的命令是带有 **255.255.254.0** 掩码的 IP 地址命令。
**正确答案形式通常为:**
`ip address [IP_Address] 255.255.254.0`