【Cisco】初心者ネットワーク勉強会@秋葉原UDX
2020/11/14(土)9時00分から
FORSE 1
【Cisco】初心者ネットワーク勉強会@秋葉原UDX
FORSE
アジェンダ
0900~0915 今日出来るようになる事、自己紹介
0915~0930 さっそく実機でやってみよう(今日はルーター)
0930~0945 IPアドレス設定してみる
1015~1030 telnetって、スタティックルートって
1030~1045 Ciscoに設定投入
1045~1100 疎通試験
参加いただきありがとうございます!!!
鈴木メモ
持ち物:ルータ×4、PC×4
LAN線×8(赤4、白2、黒2)、シリアルケーブル×4、
1000円回収
今日、出来るようになる事
teratermを利用して、Ciscoデバイスにアクセスできるようになる事
Cisco実機に電源投入
LAN線?シリアル?ネットワーク冗⾧化
スタティックルートを作ってみる
https://www.infraexpert.com/study/routing3.html
自己紹介(鈴木)
体力に自信がある、ランニングが趣味のSE
フルマラソンで3時間を切った事、5キロを17分台で走った事が自慢
CTCって会社で18年間SE。2019年に起業して会社を設立
平日はインフラエンジニア。日曜日に予備校でLinux構築講座の講師
自己紹介(助手)
2
【Cisco】初心者ネットワーク勉強会@秋葉原UDXルータ説明
FORSE
電源どこ?
電源入った事をLED(ランプ)で確認してください
コンソールどこ?
コンソールをつないで、確認してください
3
【Cisco】ネットワーク基礎講座 今日の構成 ラボ#1
FORSE 4
RT-10
RT-40
RT-30
RT-20 #Gi7
#Gi7
#Gi7
#Gi7
#Fa0
#Fa0
#Fa0
#Gi8
#Gi8
#Fa0
PC3
192.168.30.2
PC1
192.168.10.2
PC2
192.168.20.2
PC4
192.168.40.2
#Gi8
#Gi8
172.16.12.0/30
.1
.2
172.16.41.0/30
.1
.2
172.16.23.0/30
.2
.1
172.16.34.0/30
.2
.1
.1
.1
.1
.1
【Cisco】ネットワーク基礎講座 今日の構成 ラボ#1-3
FORSE 5
RT-10
RT-50
RT-40
RT-20
#Gi7
#Gi7
#Gi7
#Fa0
#Fa0
#Gi8
#Gi8
PC3
192.168.30.2
PC1
192.168.10.2
PC2
192.168.20.2
PC5
192.168.50.2
#Gi8
#Gi8
#Fa0 #Fa0
PC4
192.168.40.2
PC6
192.168.60.2
RT-30
172.16.12.0/30
RT-60
.2
.1
.1
.1
.2
.2
172.16.23.0/30
172.16.34.0/30
.1
#Gi7
172.16.45.0/30
172.16.56.0/30
.1
.1 .2
.1
.1
.1
.1
.2
.2 .1.1
172.16.61.0/30
#Gi8
#Gi7
#Fa0
#Fa0
#Gi8
#Gi7
【Cisco】PCの設定
FORSE
まずはここ
6
IPアドレスを変更する。
「スタートメニュー」→「設定」(歯車マーク)→「ネットワークとイン
ターネット」→
「イーサネット」→「アダプターのオプションを変更する」→「イーサ
ネット」→
「インターネット プロトコル バージョン 4 (TCP/IPv4)」→「プロパ
ティ」→
「次の IPアドレスを使う」→「IPアドレス」を「192.168.10.2」に設定
「サブネットマスク」を「255.255.255.0」に設定
「デフォルトゲートウェイ」を「192.168.10.1」に設定
【Cisco】初期設定 ルータの設定1
FORSE
手順1
ルータは起動に時間がかかります
セットアップモードが起動したら、noと入力、もしくはcttl+c
手順2
メッセージが表示され、Enterキーを押します。Router>のプロンプトが
表示されます
手順3
特権モードに移行します。Router#のプロンプトが表示されます
手順4
グローバルコンフィグレーションモードに移行します。Router(config)#
が表示されます
手順5
ホスト名を設定します。設定後プロンプトがホスト名に変更された事を確認
します。ホスト名は講師が指示します
手順7
特権モードに戻ります。
手順8
タイプミス対策をします。
手順9
改行メッセージ対策します
--- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:no
Press RETURN to get started!
Router>
Router>enable
Router#
Router#configure terminal
Router(config)#
Router(config)#hostname RT-10(RT-20、RT-30、RT-40)
RT-xxx(cnofig)#
Router(config)#end
RT-xxx#
7
Router#configure terminal
Router(config)#no ip domain lookup
Router(config)#end
Router#configure terminal
Router(config)#line console 0
Router(config-line)#logging synchronous
Router(config-line)#end
【Cisco】PC接続用VLAN作成、仮想インターフェース ルータの設定2
FORSE 8
手順10
PC接続用のポート、VLANの作成、仮想インターフェースの作成
※作成するVALN番号、IPアドレスは参加者毎に違います。
手順11
7番物理ポートにVLANをアサインします
手順12 検証します
手順13 結線して検証します
ping 192.168.10.1
RT-10#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi0, Gi1, Gi2, Gi3, Gi4, Gi5
Gi6
10 VLAN0010 active Gi7
RT-10#conf t
RT-10(config)#vlan 10←スペースあり(VLAN作成)
RT-10(config-vlan)#exit
RT-10(config)#interface vlan10 ←スペースなし(仮想インターフェース作成)
RT-10(config-if)#ip address 192.168.10.1 255.255.255.0
RT-10(config-if)#no shutdown
RT-10(config-if)#end
RT-10#
RT-10#configure terminal
RT-10(config)#interface gigabitEthernet 7
RT-10(config-if)#switchport access vlan 10
RT-10(config-if)#end
RT-10#
【Cisco】IPアドレス作成 ルータの設定3
FORSE 9
ここの部分
※設定するIPアドレスは参加者毎に違います。構成図を確認してください
手順15
IPアドレスを設定して、結線をします
手順16 検証します
RT-10#conf t
RT-10(config)#interface gigabitEthernet 8
RT-10(config-if)#ip address 172.16.14.1 255.255.255.252
RT-10(config-if)#no shutdown
RT-10(config-if)#exit
RT-10(config)#interface fastEthernet 0
RT-10(config-if)#ip address 172.16.12.1 255.255.255.252
RT-10(config-if)#no shutdown
RT-10(config-if)#end
RT-10#
RT-10#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Async3 unassigned YES unset down down
BRI0 unassigned YES unset administratively down down
BRI0:1 unassigned YES unset administratively down down
BRI0:2 unassigned YES unset administratively down down
FastEthernet0 172.16.12.1 YES manual down down
GigabitEthernet0 unassigned YES unset down down
GigabitEthernet1 unassigned YES unset down down
GigabitEthernet2 unassigned YES unset down down
GigabitEthernet3 unassigned YES unset down down
GigabitEthernet4 unassigned YES unset down down
GigabitEthernet5 unassigned YES unset down down
GigabitEthernet6 unassigned YES unset down down
GigabitEthernet7 unassigned YES unset up up
GigabitEthernet8 172.16.14.1 YES manual down down
Vlan1 unassigned YES unset down down
Vlan10 192.168.10.1 YES manual up up
RT-10#
RT-10#show interfaces vlan10 | include Internet
Internet address is 192.168.10.1/24
RT-10#
RT-10#show interfaces gigabitEthernet8 | include Internet
Internet address is 172.16.14.1/30
RT-10#
RT-10#show interfaces fastEthernet0 | include Internet
Internet address is 172.16.12.1/30
RT-10#
【Cisco】リモートパスワードtelnet ルータの設定4
FORSE
手順17 リモートパスワードを設定します
手順18
確認します
| begin でそこから始まる文字列を表示します。最後のほうだけ確認
手順19
となりのルータにはpingが通ります
10
RT-10#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RT-10(config)#line vty 0 4
RT-10(config-line)#password vtypassword
RT-10(config-line)#login
RT-10(config-line)#exit
RT-10(config)#enable password cisco
RT-10(config)#end
RT-10#
RT-10>ping 172.16.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
RT-10>
RT-10>ping 172.16.14.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.14.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
RT-10>
RT-10#show running-config | include enable
enable password cisco
RT-10#show running-config | begin line vty
line vty 0 4
password vtypassword
login
transport input all
!
scheduler allocate 20000 1000
!
end
【Cisco】スタティックルート ルータの設定5
FORSE 11
上のルータ(RT-10)は
「赤」「紫」「茶」を知ってます
「青」「緑」「黄」「黒」「橙」
を知りません。
「青」と「緑」は紫の先にある事を
「黒」と「橙」は茶色の先にある事
「黄」は?
あお
みどり
きいろ
むらさき
あか
くろ
オレンジ
茶色
172.16.41.0/30
172.16.34.0/30
【Cisco】スタティックルート作成 ルータの設定6
FORSE 12
手順20
スタティックルートを設定します
手順21
スタティックルートを検証します
RT-10#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RT-10(config)#ip route 172.16.23.0 255.255.255.252 172.16.12.2
RT-10(config)#ip route 192.168.20.0 255.255.255.0 172.16.12.2
RT-10(config)#ip route 172.16.43.0 255.255.255.252 172.16.14.2
RT-10(config)#ip route 192.168.40.0 255.255.255.0 172.16.14.2
RT-10(config)#ip route 192.168.30.0 255.255.255.0 172.16.14.2
RT-10(config)#end
RT-10#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
C 172.16.12.0/30 is directly connected, FastEthernet0
L 172.16.12.1/32 is directly connected, FastEthernet0
C 172.16.14.0/30 is directly connected, GigabitEthernet8
L 172.16.14.1/32 is directly connected, GigabitEthernet8
S 172.16.23.0/30 [1/0] via 172.16.12.2
S 172.16.43.0/30 [1/0] via 172.16.14.2
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, Vlan10
L 192.168.10.1/32 is directly connected, Vlan10
S 192.168.20.0/24 [1/0] via 172.16.12.2
S 192.168.30.0/24 [1/0] via 172.16.14.2
S 192.168.40.0/24 [1/0] via 172.16.14.2
RT-10#
【Cisco】スタティックルート作成その2 ルータの設定7
FORSE 13
手順20-2(6つの場合)
スタティックルートを設定します
手順21
スタティックルートを検証します
RT-10#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RT-10(config)#ip route 172.16.23.0 255.255.255.252 172.16.12.2
RT-10(config)#ip route 192.168.20.0 255.255.255.0 172.16.12.2
RT-10(config)#ip route 172.16.34.0 255.255.255.252 172.16.12.2
RT-10(config)#ip route 192.168.30.0 255.255.255.0 172.16.12.2
RT-10(config)#ip route 192.168.40.0 255.255.255.0 172.16.12.2
RT-10(config)#ip route 172.16.56.0 255.255.255.252 172.16.61.2
RT-10(config)#ip route 192.168.60.0 255.255.255.0 172.16.61.2
RT-10(config)#ip route 172.16.45.0 255.255.255.252 172.16.61.2
RT-10(config)#ip route 192.168.50.0 255.255.255.0 172.16.61.2
RT-10(config)#end
RT-10#show ip route
(省略)
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
C 172.16.12.0/30 is directly connected, FastEthernet0
L 172.16.12.1/32 is directly connected, FastEthernet0
C 172.16.16.0/30 is directly connected, GigabitEthernet8
L 172.16.16.1/32 is directly connected, GigabitEthernet8
S 172.16.23.0/30 [1/0] via 172.16.12.2
S 172.16.34.0/30 [1/0] via 172.16.12.2
S 172.16.45.0/30 [1/0] via 172.16.61.2
S 172.16.56.0/30 [1/0] via 172.16.61.2
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, Vlan10
L 192.168.10.1/32 is directly connected, Vlan10
S 192.168.20.0/24 [1/0] via 172.16.12.2
S 192.168.30.0/24 [1/0] via 172.16.12.2
S 192.168.40.0/24 [1/0] via 172.16.12.2
S 192.168.50.0/24 [1/0] via 172.16.61.2
S 192.168.60.0/24 [1/0] via 172.16.61.2
RT-10#
【Cisco】疎通確認 ルータの設定8
FORSE
手順22
ping疎通確認をします
手順23
traceroute確認をします
手順24
Ciscoの初期化
14
RT-10#traceroute 192.168.20.2
RT-10#ping 192.168.20.2
ルーター初期化(工場出荷状態)
Teratermで以下のコマンドを入力し初期化する。
RT#delete flash:vlan.dat
Delete filename [vlan.dat]? enterキーを入力
Delete flash:vlan.dat? [confirm] enterキーを入力
RT#erase startup-config
[confirg] enterキーを入力
【】時間が余ったら
FORSE
問題1
TTLについて正しい記述はどれか(2つ選択)
A)ブロードキャストストーム防止の役割を持つ
B)ルータを経由するたびに 1ずつ増加する
C)ルーティングループ防止の役割を持つ
D)スイッチを経由するたびに1ずつ減少する
E)スイッチを経由するたびに1ずつ増加する
F)ルータを経由するたびに 1ずつ減少する
問題2
デフォルトゲートウェイについて正しい記述はどれか(2つ選択)
A)スイッチで設定を行う
B)ルーティングを行うルータで設定を行う
C)未知のネットワークにパケットを送信する際はデフォルトゲートウェイにパケットを送信する
D)異なるネットワークを接続する機器
IPアドレスを重複させ以下のメッセージを出力させて下さい
%IP-4-DUPADDR: Duplicate address 172.16.12.2 on GigabitEthernet0/0,
sourced by 000B.BE49.7401
%IP-4-DUPADDR: Duplicate address 172.16.12.2 on GigabitEthernet0/0,
sourced by 000B.BE49.7401
15

Forse cisco1