【CCNA試験対策問題】ネットワークの基礎から学んでいこう!【設定コマンド編】Part 1
CCNAの勉強をしている方へ向けて、試験範囲の対策問題を作成してみました。
今回は、設定コマンドに関する問題を出題しようと思います。
シナリオ問題に似ていますが、showコマンドの表示から、問題の条件を満たすように設定をするために抜けているコマンドを選ぶという形式にしています。
正しいコマンドをしっかりと覚えましょう!
問題
上の図のようにネットワークが構成されています。
設定したい項目、条件は以下の通りです。
- PC1~PC4をVLANによって異なるネットワークに所属するようにする
- Router1をDHCPサーバとして、PCのIPアドレスを自動で取得させる
- PC1~PC4は全て相互通信ができるようにする
ルータ、スイッチの現在の設定は以下のようになっています。
Router1#show running-config
Building configuration...
Current configuration : 896 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router1
!
!
!
!
ip dhcp excluded-address 192.168.10.1
ip dhcp excluded-address 192.168.20.1
!
ip dhcp pool POOL1
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ip dhcp pool POOL2
default-router 192.168.20.1
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end
Router1#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down up
FastEthernet0/0.10 unassigned YES manual up up
FastEthernet0/0.20 192.168.20.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
Switch1#show running-config
Building configuration...
Current configuration : 1071 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch1
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/4
switchport trunk encapsulation dot1q
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface Vlan1
no ip address
shutdown
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end
Switch1#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
10 VLAN0010 active Fa0/2
20 VLAN0020 active Fa0/3
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Switch2#show running-config
Building configuration...
Current configuration : 1099 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch2
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface Vlan1
no ip address
shutdown
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end
Switch2#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1,Fa0/4, Fa0/5, Fa0/6, Fa0/7
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/15
Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22, Fa0/23
Fa0/24
10 VLAN0010 active
20 VLAN0020 active Fa0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
これらのルータ、スイッチに追加して設定する必要があるコマンドを以下の中から5つ選んでください。
- Router1(config)#ip dhcp pool
- Router1(config-subif)#no shutdown
- Router1(config-if)#no shutdown
- Router1(config-if)#ip address 192.168.10.1 255.255.255.0
- Router1(dhcp-config)#network 192.168.20.0 255.255.255.0
- Router1(config-subif)#ip address 192.168.10.1 255.255.255.0
- Switch1(config)#vlan 10
- Switch1(config-if)#switchport mode trunk
- Switch1(config-if)#switchport mode access
- Switch2(config-if)#switchport mode trunk
- Switch2(config-if)#switchport access vlan 10
解答)C,E,F,H,K
Router1は、VLAN間ルーティングの設定、DHCPサーバの設定を行う必要があります。Fa0/1にサブインターフェイスを作成しており、それがVLAN10、VLAN20の通信を受け取るように設定します。Fa0/1を見ると、shutdownと表示があること、また、show ip int briefの結果で、Fa0/1がadministratively downになっていることから、大元のインターフェイスを有効化していないことが分かります。また、Fa0/0.10にIPアドレスが設定されていないことが分かるので、DHCPプールのdefault-routerにある192.168.10.1のアドレスを設定しなければなりません。DHCPの設定を見ると、192.168.20.0のネットワークの設定がされていないことが分かります。よって、ルータの設定で抜けているコマンドは、C,E,Fの3つであることが分かります。
Switch1は、ルータと接続されているインターフェイス、スイッチ同士が接続されているインターフェイスでトランクポートの設定がされていること、その他はアクセスポート、VLANの設定がされていることを確認します。show running-configを見ると、Fa0/4がカプセル化の設定は行われていますが、トランクポートの設定がされていないことが分かります。よって、Switch1に抜けているコマンドはHになります。
Switch2も、Switch1と同様にポートの設定を確認します。show running-configのFa0/1の部分、またshow vlanのインターフェイスの部分を確認すると、Fa0/1のVLANの割り当てがデフォルトのままになっていることが分かります。よって、必要なコマンドは、Kになります。