More Related Content
Similar to ネットワーク構築訓練 入門 (20)
More from 株式会社 NTTテクノクロス (9)
ネットワーク構築訓練 入門
- 3. カリキュラム
時間 研修内容
10:30
10:45
◆Cisco IOSの概要
Cisco IOSのモードの説明、基本的なコマンドの理解
◆スタティックルーティング
IPルーティングの基本、スタティックルーティングの設定
【講義・演習1】
12:00 昼食
13:00
15:00
17:30
18:30
◆スタティックルーティング
IPルーティングの基本、スタティックルーティングの設定
◆ダイナミックルーティング
ルーティングプロトコルの基本(RIP、OSPF)
ルーティングプロトコルの設定
◆VLAN
VLANの基本、VLANの設定
終了
【講義・演習2,3】
【講義・演習4,5】
【講義】
~1日目~
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 3
- 11. パスワードの設定
~enable password~
Router(config)# enable secret nttsoft
~ユーザモードパスワード(コンソール)~
Router(config)# line console 0
Router(config-line)# login
Router(config-line)# password nttsoft
~ユーザモードパスワード(Telnet)~
Router(config)# line vty 0 4
Router(config-line)# login
Router(config-line)# password nttsoft
~パスワードの設定確認~
Router# show running-config
※表示されるパスワードを暗号化したい場合、
以下のコマンドを投入する。
Router(config)# service password-encryption
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 11
- 21. ルーティングテーブルの見方
~ルータ:R1のルーティングテーブル~
R1# show ip route
[省略]
S 192.168.50.0 [1/0] via 192.168.30.2
S 192.168.40.0 [1/0] via 192.168.20.2
C 192.168.30.0 is directly connected, Serial0/1
C 192.168.20.0 is directly connected, Serial0/0
C 192.168.10.0 is directly connected, FastEthernet0/0
~ルータ:R2のルーティングテーブル~
R2# show ip route
[省略]
S 192.168.50.0 [1/0] via 192.168.20.1
C 192.168.40.0 is directly connected, FastEthernet0/0
S 192.168.30.0 [1/0] via 192.168.20.1
C 192.168.20.0 is directly connected, Serial0/0
S 192.168.10.0 [1/0] via 192.168.20.1
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 21
- 22. ルーティングテーブルの見方
~ルータ:R3のルーティングテーブル~
R3# show ip route
[省略]
C 192.168.50.0 is directly connected, FastEthernet0/0
S 192.168.40.0 [1/0] via 192.168.30.1
C 192.168.30.0 is directly connected, Serial0/0
S 192.168.20.0 [1/0] via 192.168.30.1
S 192.168.10.0 [1/0] via 192.168.30.1
アドミニストレーティブディスタンス/メトリックを示す。
※ダイナミックルーティングの章で説明
S そのネットワークがスタティックエントリであることを示す。
C 直接接続されたネットワークであることを示す。
ネクストホップアドレスを示す。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 22
- 23. インタフェースの設定
~インタフェース設定モード~
(config)# interface [タイプ][スロット/ポート]
~IPアドレスの設定~
(config-if)# ip address [IPアドレス] [サブネットマスク]
※設定ミスなどを直すために設定情報を削除するときは”no ip address”を投入する。
~インタフェースを有効化する~
(config-if)# no shutdown
~ルータ:R1のインタフェース設定~
R1(config)# interface fastethernet 0/0
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# interface serial 0/0
R1(config-if)# ip address 192.168.20.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# interface serial 0/1
R1(config-if)# ip address 192.168.30.1 255.255.255.0
R1(config-if)# no shutdown
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 23
- 24. インタフェースの設定
~ルータ:R2のインタフェース設定~
R2(config)# interface fastethernet 0/0
R2(config-if)# ip address 192.168.40.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# interface serial 0/0
R2(config-if)# ip address 192.168.20.2 255.255.255.0
R2(config-if)# no shutdown
~ルータ:R3のインタフェース設定~
R3(config)# interface fastethernet 0/0
R3(config-if)# ip address 192.168.50.1 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# interface serial 0/0
R3(config-if)# ip address 192.168.30.2 255.255.255.0
R3(config-if)# no shutdown
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 24
- 25. インタフェースの設定
~インタフェース状態の確認~
R1# show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.10.1 YES manual up up
Serial0/0 192.168.20.1 YES manual up up
Serial0/1 192.168.30.1 YES manual up up
R2# show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.40.1 YES manual up up
Serial0/0 192.168.20.2 YES manual up up
Serial0/1 unassigned YES NVRAM administratively down down
R3# show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.50.1 YES manual up up
Serial0/0 192.168.30.2 YES manual up up
Serial0/1 unassigned YES manual administratively down down
Statusは物理的な状態、Protocolは論理的な状態を表す。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 25
- 26. スタティックルートの設定
(config)# ip route [destination_network][mask][next_hop_address]
[administrative_distance][permanent]
destination_network : 宛先ネットワークを示す。
mask : そのネットワークで使用されるサブネットマスクを示す。
next_hop_address : 宛先ネットワークへ転送する直接接続されたルータのアドレスを示す。
administrative_distance : スタティックルートの場合はデフォルト”1”である。
(※ダイナミックルーティングの章で説明)
permanent : 状態に無関係でルーティングテーブルに保持される
※administrative_distance、およびpermanentパラメータについてはオプションである。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 26
- 27. スタティックルートの設定
~ルータ:R1のスタティックルートの設定~
R1(config)# ip route 192.168.40.0 255.255.255.0 192.168.20.2
R1(config)# ip route 192.168.50.0 255.255.255.0 192.168.30.2
~ルータ:R2のスタティックルートの設定~
R2(config)# ip route 192.168.10.0 255.255.255.0 192.168.20.1
R2(config)# ip route 192.168.30.0 255.255.255.0 192.168.20.1
R2(config)# ip route 192.168.50.0 255.255.255.0 192.168.20.1
~ルータ:R3のスタティックルートの設定~
R3(config)# ip route 192.168.10.0 255.255.255.0 192.168.30.1
R3(config)# ip route 192.168.20.0 255.255.255.0 192.168.30.1
R3(config)# ip route 192.168.40.0 255.255.255.0 192.168.30.1
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 27
- 28. デフォルトルートの設定
デフォルトルーティングは、ルーティングテーブルに存在しないネットワークを宛先とする
パケットを、次のホップのルータへ送信するために使用する。
~ルータ:R3のデフォルトルートの設定~
R3(config)# no ip route 192.168.10.0 255.255.255.0 192.168.30.1
R3(config)# no ip route 192.168.20.0 255.255.255.0 192.168.30.1
R3(config)# no ip route 192.168.40.0 255.255.255.0 192.168.30.1
R3(config)# ip route 0.0.0.0 0.0.0.0 192.168.30.1
R3# show ip route
[省略]
Gateway of last resort is 192.168.30.1 to network 0.0.0.0
C 192.168.50.0 is directly connected, FastEthernet0/0
C 192.168.30.0 is directly connected, Serial0/0
S* 0.0.0.0/0 [1/0] via 192.168.30.1
※デフォルトルートを設定する際、”ip classless”コマンドを投入する必要がある。
IOSのバージョンが新しいもの(11.3以降)はデフォルトでオンとなっているが、古いバージョン
では、オンとなっていない可能性がある。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 28
- 30. RIP(Router Information Protocol)
RIP
Router Information Protocolの略
古い(レガシーな)ルーティングプロトコル
ほとんどの場合、標準ライセンスで使用可能
中小規模NW向け
コンバージェンス(収束)に時間がかかる 最大150秒
ホップ数をメトリックとして利用
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 30
- 31. RIPの動作
F0/0 F0/1
F0/1
192.168.10.0/24
192.168.20.0/24
R1 R3
ネットワーク ネクストホップ メトリック IF
192.168.10.0/24 - 0 F0/0
192.168.20.0/24 - 0 F0/1
192.168.30.0/24
192.168.40.0/24
F0/1
R2
F0/0 F0/0
ネットワーク ネクストホップ メトリック IF
192.168.30.0/24 - 0 F0/0
192.168.40.0/24 - 0 F0/1
ネットワーク ネクストホップ メトリック IF
192.168.20.0/24 - 0 F0/0
192.168.30.0/24 - 0 F0/1
【R1】
【R2】
【R3】
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 31
- 33. RIPの動作
F0/0 F0/1
F0/1
192.168.10.0/24
192.168.20.0/24
R1 R3
ネットワーク ネクストホップ メトリック IF
192.168.10.0/24 - 0 F0/0
192.168.20.0/24 - 0 F0/1
192.168.30.0/24
192.168.40.0/24
F0/1
R2
F0/0 F0/0
ネットワーク ネクストホップ メトリック IF
192.168.30.0/24 - 0 F0/0
192.168.40.0/24 - 0 F0/1
ネットワーク ネクストホップ メトリック IF
192.168.20.0/24 - 0 F0/0
192.168.30.0/24 - 0 F0/1
【R1】
【R2】
【R3】
192.168.30.0/24 192.168.20.2 1 F0/1 192.168.20.0/24 192.168.30.1 1 F0/0
192.168.10.0/24 192.168.20.1 1 F0/0
192.168.40.0/24 192.168.30.2 1 F0/1
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 33
- 35. RIPの動作
F0/0 F0/1
F0/1
192.168.10.0/24
192.168.20.0/24
R1 R3
ネットワーク ネクストホップ メトリック IF
192.168.10.0/24 - 0 F0/0
192.168.20.0/24 - 0 F0/1
192.168.30.0/24
192.168.40.0/24
F0/1
R2
F0/0 F0/0
ネットワーク ネクストホップ メトリック IF
192.168.30.0/24 - 0 F0/0
192.168.40.0/24 - 0 F0/1
ネットワーク ネクストホップ メトリック IF
192.168.20.0/24 - 0 F0/0
192.168.30.0/24 - 0 F0/1
【R1】
【R2】
【R3】
192.168.30.0/24 192.168.20.2 1 F0/1 192.168.20.0/24 192.168.30.1 1 F0/0
192.168.10.0/24 192.168.20.1 1 F0/0
192.168.40.0/24 192.168.30.2 1 F0/1
192.168.40.0/24 192.168.20.2 2 F0/1 192.168.10.0/24 192.168.30.1 2 F0/0
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 35
- 37. RIPルーティングの設定
~ルータ:R1のRIPルーティングの設定~
R1(config)# router rip
R1(config-router)# network 192.168.10.0
R1(config-router)# network 192.168.20.0
R1(config-router)# network 192.168.30.0
R1(config-router)# passive-interface fastethernet 0/0
~ルータ:R2のRIPルーティングの設定~
R2(config)# router rip
R2(config-router)# network 192.168.20.0
R2(config-router)# network 192.168.40.0
R2(config-router)# passive-interface fastethernet 0/0
直接接続されたネットワーク
ごとにコマンドを入力する
RIP更新のメッセージが
送信されない
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 37
- 38. RIPルーティングの設定
~ルータ:R3のRIPルーティングの設定~
R3(config)# router rip
R3(config-router)# network 192.168.30.0
R3(config-router)# network 192.168.50.0
R3(config-router)# passive-interface fastethernet 0/0
※RIPをバージョン2で動作させたい場合は、”version 2”コマンドをルータ設定モードで投入する。
(config-router)# version 2
~ルートの自動集約~
(config-router)# auto-summary ※デフォルトで有効となっている
(config-router)# no auto-summary ※自動集約を解除したい場合に投入する
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 38
- 39. RIPルーティングの確認
~ルータ:R1のルーティングテーブル~
R1# show ip route
[省略]
R 192.168.50.0 [120/1] via 192.168.30.2, 00:00:00, Serial0/1
R 192.168.40.0 [120/1] via 192.168.20.2, 00:00:00, Serial0/0
C 192.168.30.0 is directly connected, Serial0/1
C 192.168.20.0 is directly connected, Serial0/0
C 192.168.10.0 is directly connected, FastEthernet0/0
~ルータ:R2のルーティングテーブル~
R2# show ip route
[省略]
R 192.168.50.0 [120/2] via 192.168.20.1, 00:00:00, Serial0/0
C 192.168.40.0 is directly connected, FastEthernet0/0
R 192.168.30.0 [120/1] via 192.168.20.1, 00:00:00, Serial0/0
C 192.168.20.0 is directly connected, Serial0/0
R 192.168.10.0 [120/1] via 192.168.20.1, 00:00:00, Serial0/0
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 39
- 40. RIPルーティングの確認
~ルータ:R3のルーティングテーブル~
R3# show ip route
[省略]
C 192.168.50.0 is directly connected, FastEthernet0/0
R 192.168.40.0 [120/2] via 192.168.30.1, 00:00:00, Serial0/0
C 192.168.30.0 is directly connected, Serial0/0
R 192.168.20.0 [120/1] via 192.168.30.1, 00:00:00, Serial0/0
R 192.168.10.0 [120/1] via 192.168.30.1, 00:00:00, Serial0/0
アドミニストレーティブディスタンス/メトリックを示す。
R RIPルーティングプロトコルにて動的に追加されたネットワークであることを示す。
ネクストホップアドレスを示す。
RIP更新メッセージを受信したインタフェースを示す。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 40
- 41. RIPルーティングの確認
~ルーティングプロトコルの確認~
R1# show ip protocols
Routing protocol is “rip”
Sending updates every 30 seconds, next due in 6 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
[省略]
Default version control: send version 1, receive any version
Interface Send Recv Key-chain
Serial0/0 1 1
Serial0/1 1 1
Routing for Networks:
192.168.10.0
192.168.20.0
192.168.30.0
Routing Information Sources:
[省略]
RIPで使用するタイマ
RIPのバージョン
設定したネットワーク
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 41
- 42. RIPルーティングの確認
~デバッグコマンド~
R1# debug ip rip
RIP protocol debugging is on
R1#
00:00:00: RIP: received v1 update from 192.168.20.2 on Serial0/0
00:00:00: 192.168.40.0 in 1 hops
00:00:01: RIP: received v1 update from 192.168.30.2 on Serial0/1
00:00:01: 192.168.50.0 in 1 hops
00:00:03: RIP: sending v1 update to 255.255.255.255 via Serial0/0 (192.168.20.1)
00:00:03: subnet 192.168.50.0, metric 2
00:00:03: subnet 192.168.30.0, metric 1
00:00:03: subnet 192.168.10.0, metric 1
00:00:03: RIP: sending v1 update to 255.255.255.255 via Serial0/1 (192.168.30.1)
00:00:03: subnet 192.168.40.0, metric 2
00:00:03: subnet 192.168.20.0, metric 1
00:00:03: subnet 192.168.10.0, metric 1
R1# undebug all
All possible debugging has been turned off
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 42
- 43. OSPF(Open Shortest Path First)
OSPF
Open Shortest Path Firstの略
比較的新しいルーティングプロトコル
ほとんどの場合、追加ライセンスの購入が必要
大中規模NW向け
コンバージェンス(収束)は数秒
各リンクのコストを算出して選択
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 43
- 44. OSPFの動作
10
10.1.0.0/16
10.2.0.0/16
R1 R4
ネットワーク ネクストホップ メトリック IF
10.1.0.0/16 - 10 F0/0
192.168.12.0/24 - 10 F0/1
10.4.0.0/16
10.3.0.0/16
R2
【R1】
R3
10
10
10
10
20
20
10
10
10
10
10
192.168.12.0/24
192.168.13.0/24
192.168.24.0/24
192.168.34.0/24
192.168.13.0/24 - 10 F0/2
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 44
- 46. OSPFの動作
10
10.1.0.0/16
10.2.0.0/16
R1 R4
ネットワーク ネクストホップ メトリック IF
10.1.0.0/16 - 10 F0/0
192.168.12.0/24 - 10 F0/1
10.4.0.0/16
10.3.0.0/16
R2
【R1】
R3
10
10
10
10
20
20
10
10
10
10
10
192.168.12.0/24
192.168.13.0/24
192.168.24.0/24
192.168.34.0/24
192.168.13.0/24 - 10 F0/2
ネットワーク ネクストホップ メトリック IF
192.168.24.0/24 192.168.12.2 30 F0/1
192.168.34.0/24 192.168.13.2 20 F0/2
10.3.0.0/16 192.168.13.2 20 F0/2
10.2.0.0/16 192.168.12.2 20 F0/1 10.4.0.0/16 192.168.13.2 30 F0/2
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 46
- 51. OSPFルーティングの設定
(config)# router ospf [process-id]
process-id : OSPFプロセスIDを示す。ローカルでのみ意味を持つ。
(config-router)# network [network_address] [wildcard_mask] area [area-id]
network_address & wildcard_mask : 指定したアドレスを持つインタフェースに対して
OSPFを有効にする。
area-id : 指定したインタフェースが属するエリアを示す。
(例)
(config-router)# network 192.168.0.0 0.0.255.255 area 0
⇒192.168.x.xのIPアドレスのインタフェースでOSPFが有効になり、そのインタフェースは
エリア0に属する。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 51
- 52. OSPFルーティングの設定
~ルータ:R1のOSPFルーティングの設定~
R1(config)# router ospf 1
R1(config-router)# network 192.168.10.0 0.0.0.255 area 0
R1(config-router)# network 192.168.20.0 0.0.0.255 area 0
R1(config-router)# network 192.168.30.0 0.0.0.255 area 0
~ルータ:R2のOSPFルーティングの設定~
R2(config)# router ospf 1
R2(config-router)# network 192.168.20.0 0.0.0.255 area 0
R2(config-router)# network 192.168.40.0 0.0.0.255 area 0
~ルータ:R3のOSPFルーティングの設定~
R3(config)# router ospf 1
R3(config-router)# network 192.168.30.0 0.0.0.255 area 0
R3(config-router)# network 192.168.50.0 0.0.0.255 area 0
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 52
- 53. OSPFルーティングの確認
~ルータ:R1のルーティングテーブル~
R1# show ip route
[省略]
O 192.168.50.0 [110/1564] via 192.168.30.2, 00:00:00, Serial0/1
O 192.168.40.0 [110/1564] via 192.168.20.2, 00:00:00, Serial0/0
C 192.168.30.0 is directly connected, Serial0/1
C 192.168.20.0 is directly connected, Serial0/0
C 192.168.10.0 is directly connected, FastEthernet0/0
~ルータ:R2のルーティングテーブル~
R2# show ip route
[省略]
O 192.168.50.0 [110/3126] via 192.168.20.1, 00:00:00, Serial0/0
C 192.168.40.0 is directly connected, FastEthernet0/0
O 192.168.30.0 [110/3125] via 192.168.20.1, 00:00:00, Serial0/0
C 192.168.20.0 is directly connected, Serial0/0
O 192.168.10.0 [110/1564] via 192.168.20.1, 00:00:00, Serial0/0
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 53
- 54. OSPFルーティングの確認
~ルータ:R3のルーティングテーブル~
R3# show ip route
[省略]
C 192.168.50.0 is directly connected, FastEthernet0/0
O 192.168.40.0 [110/3126] via 192.168.30.1, 00:00:00, Serial0/0
C 192.168.30.0 is directly connected, Serial0/0
O 192.168.20.0 [110/3125] via 192.168.30.1, 00:00:00, Serial0/0
O 192.168.10.0 [110/1564] via 192.168.30.1, 00:00:00, Serial0/0
O OSPFルーティングプロトコルにて動的に追加されたネットワークであることを示す。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 54
- 55. OSPFルーティングの確認
~ルーティングプロトコルの確認~
R1# show ip protocols
Routing protocol is “ospf 1”
[省略]
Router ID 192.168.30.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
maximum path: 1
Routing for Networks:
192.168.10.0 0.0.0.255 area 0
192.168.20.0 0.0.0.255 area 0
192.168.30.0 0.0.0.255 area 0
Routing Information Sources:
[省略]
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 55
- 56. OSPFルーティングの確認
~OSPF情報の確認~
R1# show ip ospf
Routing Process “ospf 1” with ID 192.168.30.1
[省略]
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
[省略]
R1# show ip ospf interface
Serial0/0 is up, line protocol is up
Internet Address 192.168.20.1/24, Area 0
Process ID 1, Router ID 192.168.30.1, Network Type POINT_TO_POINT, Cost: 1563
[省略]
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.10.1/24, Area 0
Process ID 1, Router ID 192.168.30.1, Network Type BROADCAST, Cost: 1
[省略]
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 56
- 57. OSPFルーティングの確認
~OSPF情報の確認~
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.40.1 1 FULL/- 00:00:00 192.168.20.2 Serial0/0
192.168.50.1 1 FULL/- 00:00:00 192.168.30.2 Serial0/1
ネイバーのルータIDを示す。
ネイバーとのOSPFステータスを示す。
(FULLはリンクステートデータベースの交換が
完了している)
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 57
- 68. VLANの設定
VLAN 10 VLAN 20 VLAN 10 VLAN 20
SW1 SW2
SW3
F0/0 F0/1 F0/0 F0/1
F0/23 F0/23
F0/0 F0/1
VLAN 10 : GROUP10
VLAN 20 : GROUP20
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 68
- 69. VLANの設定
~VLANの作成~
(config)# vlan [vlan-id]
(config-vlan)# name [vlan-name] ※VLANの名前の設定は必須ではない。
~インタフェースへの適用~
(config-if)# switchport mode access
(config-if)# switchport access vlan [vlan-id]
複数のインタフェースに同じVLANを適用する場合、rangeコマンドによりまとめて設定する
ことができる
(config)# interface range fastethernet 0/0-23 ※ポート0から23までを設定
(config-if-range)# switchport mode access
(config-if-range)# switchport access vlan 10
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 69
- 70. VLANの設定
~スイッチ:SW1およびSW2のVLANの設定~
SW1(config)# vlan 10
SW1(config-vlan)# name GROUP10
SW1(config-vlan)# vlan 20
SW1(config-vlan)# name GROUP20
SW1(config)# interface fastethernet 0/0
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10
SW1(config-if)# interface fastethernet 0/1
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 20
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 70
- 71. VLANの設定
~トランクリンクの設定~
(config-if)# switchport mode trunk
(config-if)# switchport trunk encapsulation {dot1q | isl}
~スイッチ:SW1およびSW2のトランクリンクの設定~
SW1(config)# interface fastethernet 0/23
SW1(config-if)# switchport mode trunk
SW1(config-if)# switchport trunk encapsulation dot1q
~スイッチ:SW3のトランクリンクの設定~
SW3(config)# interface range fastethernet 0/0-1
SW3(config-if-range)# switchport mode trunk
SW3(config-if-range)# switchport trunk encapsulation dot1q
※トランクリンクに流すVLANトラフィックを指定することもできる
(config-if)# switchport trunk allowed vlan [vlan-id]
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 71
- 72. VLANの確認
~スイッチ:SW1およびSW2のVLANの確認~
SW1# show vlan
VLAN Name Status Ports
------- ------------------------- ----------- -----------------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
[省略]
10 GROUP10 active Fa0/0
20 GROUP20 active Fa0/1
[省略]
VLAN Type SAID MTU ・・・
------- ----------- ----------- ------ -----------------------------------------
1 enet 100001 1500
・・・
続けてVLAN番号またはVLAN名を指定
して、特定の情報を表示しても良い。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 72
- 73. VLANの確認
~スイッチ:SW1およびSW2のVLANの確認~
SW1# show vlan brief
VLAN Name Status Ports
------- ------------------------- ----------- -----------------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
[省略]
10 GROUP10 active Fa0/0
20 GROUP20 active Fa0/1
[省略]
briefを付けるとVLAN情報の要約を
表示することが出来る。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 73
- 74. VLANの確認
~スイッチ:トランクリンクの確認~
SW1# show interface trunk
Port Mode Encapsulation Status Native vlan
Fa0/23 on 802.1q trunking 1
[省略]
SW3# show interface trunk
Port Mode Encapsulation Status Native vlan
Fa0/0 on 802.1q trunking 1
Fa0/1 on 802.1q trunking 1
[省略]
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 74
- 76. ルータによるVLAN間ルーティングの設定
VLAN 10 VLAN 20 VLAN 10 VLAN 20
SW1 SW2
SW3
F0/0 F0/1 F0/0 F0/1
F0/23 F0/23
F0/0 F0/1
VLAN 10 : 192.168.10.0/24
VLAN 20 : 192.168.20.0/24
R1
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 76
- 78. L3スイッチによるVLAN間ルーティングの設定
VLAN 10 VLAN 20 VLAN 10 VLAN 20
SW1 SW2
F0/0 F0/1 F0/0 F0/1
F0/23 F0/23
F0/0 F0/1
SW3
VLAN 10 : 192.168.10.0/24
VLAN 20 : 192.168.20.0/24
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 78
- 81. 参考情報(役に立つコマンド)
~--More-- を非表示にする ~
Router# terminal length 0
~ソフトウェアバージョンやハードウェアの基本情報を表示する~
Router# show version
~ハードウェア情報を表示する(IOS12.3(4)Tから提供されたコマンド)~
Router# show inventory
~シスコのサポート(TAC)に解析依頼する際の情報を出力する~
Router# show tech-support
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 81
- 83. 参考情報(役に立つコマンド)
~DNSサーバに対して名前解決を行わないようにする~
Router(config)# no ip domain-lookup
※デフォルトでは名前解決をするようになっている。コマンドミスも名前解決処理を行って
しまい、タイムアウトするまで待たされてしまうため、解除しておくか明確にDNSサーバ
を指定(ip name-serverコマンド)するかを行った方が良い。
~ログアウト時間を変更する(コンソールポート用コマンド)~
Router(config)# line console 0
Router(config-line)# exec-timeout {分} {秒}
※デフォルトは10分である。
※分と秒を共に”0”で設定すると、自動的にログアウトされないようにできる。
~入力途中のコマンドを再表示する(コンソールポート用コマンド) ~
Router(config)# line console 0
Router(config-line)# logging synchronous
※入力途中にポップアップメッセージが入っても再表示を行ってくれる。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 83
- 84. 参考情報(パスワードを復旧する)
1. ルータをブートした後、ブレイク(Ctrl + Breakキー)を実行してブートシーケンスを中断する。
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
…
monitor: command “boot” aborted due to user interrupt
rommon 1 >
2. コンフィギュレーションレジスタのビット6をオン(0x2102→0x2142)にする。
rommon 1 > confreg 0x2142
3. ルータを再ロード(resetを入力)する。
4. 特権モードに入る。
5. startup-configファイルをrunnning-configファイルにコピーする。
copy startup-config running-config
6. パスワードを変更する。
7. コンフィギュレーションレジスタをデフォルト値に戻す。
config t
config-register 0x2102
copy running-config startup-config
8. ルータを再ロードする。
ネットワーク構築訓練入門 Copyright© 2016 NTT Software Corporation 84