例題を実機を使ってやってみた④


★注意点など
・ルータにケーブルを接続するときはインターフェースをしっかりチェック。
・現場に出てルータいじるときはまずログをとる。
・ルータごとに設定を進めた方がよい。ルーティングプロトコルは後でまとめてやった方がよい。
・lineはログイン忘れずに。
・インターフェースはno shutdown忘れずに。
・PC側の設定忘れずに。
IPアドレスサブネットマスクデフォルトゲートウェイの設定間違えずに。
・R4のコンソールパスワード忘れたら、telnetでR4にログインしてパスワード上書きもできる。
・RIPにもタイマーがある。ホールドダウンタイマー、フラッシュタイマー、無効パスワード)
・RIPはクラスフルルーティングプロトコルなので、クラスの境界でルートが集約されてしまう。
 クラスレスで設定する場合は、version2で設定する。そのあとno auto-summary。
・現在ではRIP(version1)はまず使わない。
・VLANのとこはno keepaliveしとく。




★手順(個人的に忘れやすそうなところは赤字で表示)
PCのIPアドレスサブネットマスクデフォルトゲートウェイを設定

TeraTerm起動(2つ。シリアルをそれぞれのcomに設定)

ログとる設定(ファイル→ログ→デスクトップに保存→「ホスト名_日付.txt」がよい)

ルータの電源入れる

Would you like to enter the initial configuration dialog? [yes/no]: no

特権パスワードの設定(secret(暗号)、password(平文))

コンソールパスワードの設定
R3(config)#line console 0
R3(config-line)#password R3conpass

ログイン
R3(config-line)#login

telnetパスワードの設定
R3(config)#line vty 0 4
R3(config-line)#password R3telpass

ログイン
R3(config-line)#login

それぞれのインターフェースのIPアドレスの設定

シリアルポートの設定
R3(config)#interface serial 0
R3(config-if)#ip address 172.16.3.1 255.255.255.224
R3(config-if)#no shutdown

イーサネットの設定
R3(config-if)#interface ethernet 0
R3(config-if)#ip address 172.16.2.2 255.255.255.224
R3(config-if)#no shutdown

ファストイーサネットの設定
R3(config)#interface fastEthernet 0
R3(config-if)#ip address 192.168.1.96 255.255.255.224
R3(config-if)#no shutdown
R3(config-if)#no keepalive

確認してみる
R3#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0 172.16.2.2 YES manual up up
FastEthernet0 192.168.1.97 YES manual up down
Serial0 172.16.3.1 YES manual down down

ルータR4の設定に移る

ホストネームの設定

特権パスワードの設定

コンソールパスワードの設定、login

telnetパスワードの設定、login

シリアルポートの設定、no shutdown

ファストイーサネットの設定、no shutdown

ルータR3のシリアルポートのDCEかDTEかを確認

R3#show control serial 0

DCE V.35, no clock

クロックを設定
R3(config)#interface serial 0
R3(config-if)#clock rate 64000

RIPの設定
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#network 172.16.2.0   ←ネットワークアドレスだけでよい
R3(config-router)#network 192.168.1.96
R3(config-router)#network 172.16.3.0
R3(config-router)#no auto-summary

確認
R3#show ip route

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
R 172.16.1.0/24 [120/1] via 172.16.2.1, 00:00:05, Ethernet0
C 172.16.2.0/27 is directly connected, Ethernet0
C 172.16.3.0/27 is directly connected, Serial0
192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
R 192.168.1.64/27 [120/1] via 172.16.2.1, 00:00:05, Ethernet0
R 192.168.1.0/24 [120/1] via 172.16.3.2, 00:00:14, Serial0
C 192.168.1.128/27 is directly connected, FastEthernet0

R4ルータもRIP設定、確認
R3#show ip route

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
R 172.16.1.0/24 [120/1] via 172.16.2.1, 00:00:06, Ethernet0
C 172.16.2.0/27 is directly connected, Ethernet0
C 172.16.3.0/27 is directly connected, Serial0
192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks
R 192.168.1.64/27 [120/1] via 172.16.2.1, 00:00:06, Ethernet0
R 192.168.1.32/27 [120/2] via 172.16.2.1, 00:00:06, Ethernet0
C 192.168.1.0/27 is directly connected, FastEthernet0
R 192.168.1.0/24 [120/1] via 172.16.3.2, 00:00:12, Serial0

R3ネットワークを確認
R3#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0 172.16.2.2 YES manual up up
FastEthernet0 192.168.1.97 YES manual up up
Serial0 172.16.3.1 YES manual up up

pingでも確認
R3#ping 172.16.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R3#ping 172.16.1.2 1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
R3#ping 192.168.1.32

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.32, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms
R3#ping 192.168.1.130

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.130, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms

R4でもネットワークを確認

通信可能に!