RIP(基本設定)

RIPを設定してみる

【RIPの特徴】

 ・ディスタンスベクタ型ルーティングプロトコル
 ・ルーティング情報交換はデフォルトで30秒に一回
 ・バージョン1とバージョン2がある
 ・ルーティング情報交換はバージョン1はブロードキャストを、バージョン2はマルチキャストを利用して行う
 ・メトリックはホップ数を採用
 ・バージョン1はクラスフルルーティングプロトコル、バージョン2はクラスレスルーティングプロトコル
 ・ルーティングテーブルのコンバージェンス時間(収束時間)が長い
 ・ルーティングループが発生する可能性がある

R1の設定内容

R1#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 20.20.20.1 YES manual up up
FastEthernet3/0 10.10.10.10 YES manual up up

R1#sh ip route
C 20.0.0.0/8 is directly connected, FastEthernet0/0
C 10.0.0.0/8 is directly connected, FastEthernet3/0

R2の設定内容
R2#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 20.20.20.20 YES manual up up
FastEthernet3/0 30.30.30.1 YES manual up up

R2#sh ip route
C 20.0.0.0/8 is directly connected, FastEthernet0/0
C 30.0.0.0/8 is directly connected, FastEthernet3/0

R3の設定内容
R3#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 30.30.30.30 YES manual up up
FastEthernet3/0 40.40.40.40 YES manual up up

R3#sh ip route
C 40.0.0.0/8 is directly connected, FastEthernet3/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0

R4(HOST1)の設定内容

R4#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.10.1 YES manual up up

R4#sh ip route
C 10.0.0.0/8 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 10.10.10.10

R5(HOST2)の設定内容

R5#sh ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 40.40.40.1 YES manual up up

R5#sh ip route
C 40.40.40.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 40.40.40.40

【ping結果】
■R3
R1 fa0/0 10.10.10.10 ×
R1 fa3/0 20.20.20.1 ×
R2 fa0/0 20.20.20.20 ×
R2 fa3/0 30.30.30.1 ○
R3 fa0/0 30.30.30.30 ○
R3 fa3/0 40.40.40.40 ○
R4(HOST1) fa0/0 10.10.10.1 ×

R5(HOST2) fa0/0 40.40.40.1 ○

■R4
R1 fa0/0 10.10.10.10 ○
R1 fa3/0 20.20.20.1 ○
R2 fa0/0 20.20.20.20 × R2からのルート、つまり、戻りのルートがないから
R2 fa3/0 30.30.30.1 ×
R3 fa0/0 30.30.30.30 ×
R3 fa3/0 40.40.40.40 ×
R4(HOST1) fa0/0 10.10.10.1 ○

R5(HOST2) fa0/0 40.40.40.1 ×

■R5
R1 fa0/0 10.10.10.10 ×
R1 fa3/0 20.20.20.1 ×
R2 fa0/0 20.20.20.20 × 
R2 fa3/0 30.30.30.1 ×  R2からのルート、つまり、戻りのルートがないから
R3 fa0/0 30.30.30.30 ○
R3 fa3/0 40.40.40.40 ○
R4(HOST1) fa0/0 10.10.10.1 ×
R5(HOST2) fa0/0 40.40.40.1 ○

R2でrip onにしてみる


R2(config)#router rip
R2(config-router)#network 20.0.0.0
R2(config-router)#network 30.0.0.0

デバッグ結果を見る
R2(config)#debug ip rip
*Mar 1 00:12:38.927: RIP: sending request on FastEthernet3/0 to 255.255.255.255
*Mar 1 00:12:40.927: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet3/0 (20.20.20.20)
*Mar 1 00:12:40.927: RIP: build flash update entries – suppressing null update
*Mar 1 00:12:52.051: RIP: sending request on FastEthernet0/0 to 255.255.255.255
*Mar 1 00:12:54.047: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet0/0 (30.30.30.1)
*Mar 1 00:12:54.051: RIP: build flash update entries – suppressing null update



*Mar 1 00:13:31.059: RIP: sending v1 update to 255.255.255.255 via FastEthernet3/0 (20.20.20.20)
*Mar 1 00:13:31.059: RIP: build update entries
*Mar 1 00:13:31.059: network 30.0.0.0 metric 1
 
*Mar 1 00:13:41.759: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (30.30.30.1)
*Mar 1 00:13:41.759: RIP: build update entries
*Mar 1 00:13:41.759: network 20.0.0.0 metric 1
 
*Mar 1 00:14:01.015: RIP: sending v1 update to 255.255.255.255 via FastEthernet3/0 (20.20.20.20)
*Mar 1 00:14:01.015: RIP: build update entries
*Mar 1 00:14:01.015: network 30.0.0.0 metric 1
 
*Mar 1 00:14:07.491: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (30.30.30.1)
*Mar 1 00:14:07.491: RIP: build update entries
*Mar 1 00:14:07.491: network 20.0.0.0 metric 1

RIPをsendする方、receiveする方
双方向でRIPをONにしなければ、ルーティングテーブルに反映されない
R2#sh ip rip database
20.0.0.0/8 auto-summary
20.0.0.0/8 directly connected, FastEthernet3/0
30.0.0.0/8 auto-summary
30.0.0.0/8 directly connected, FastEthernet0/0

R3でrip onにしてみる
R3#conf t
R3(config)#router rip
R3(config-router)#network 30.0.0.0
R3(config-router)#network 40.0.0.0

デバッグ結果を見る
R3(config)#debug ip rip
*Mar 1 00:38:25.351: RIP: sending request on FastEthernet3/0 to 255.255.255.255
*Mar 1 00:38:27.351: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet3/0 (30.30.30.30)
*Mar 1 00:38:27.351: RIP: build flash update entries – suppressing null update
*Mar 1 00:38:31.083: RIP: sending request on FastEthernet0/0 to 255.255.255.255
*Mar 1 00:38:33.079: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet3/0 (30.30.30.30)
*Mar 1 00:38:33.079: RIP: build flash update entries
*Mar 1 00:38:33.079: network 40.0.0.0 metric 1
*Mar 1 00:38:33.079: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet0/0 (40.40.40.1)
*Mar 1 00:38:33.083: RIP: build flash update entries – suppressing null update
*Mar 1 00:38:40.783: RIP: received v1 update from 30.30.30.1 on FastEthernet3/0
*Mar 1 00:38:40.783: 20.0.0.0 in 1 hops
*Mar 1 00:38:42.787: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet3/0 (30.30.30.30)
*Mar 1 00:38:42.787: RIP: build flash update entries – suppressing null update
*Mar 1 00:38:42.787: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet0/0 (40.40.40.1)
*Mar 1 00:38:42.791: RIP: build flash update entries
*Mar 1 00:38:42.791: network 20.0.0.0 metric 2
*Mar 1 00:38:52.239: RIP: sending v1 update to 255.255.255.255 via FastEthernet3/0 (30.30.30.30)
*Mar 1 00:38:52.239: RIP: build update entries
*Mar 1 00:38:52.239: network 40.0.0.0 metric 1
*Mar 1 00:38:53.683: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (40.40.40.1)
*Mar 1 00:38:53.683: RIP: build update entries
*Mar 1 00:38:53.683: network 20.0.0.0 metric 2
*Mar 1 00:38:53.683: network 30.0.0.0 metric 1
*Mar 1 00:39:07.491: RIP: received v1 update from 30.30.30.1 on FastEthernet3/0
*Mar 1 00:39:07.491: 20.0.0.0 in 1 hops
*Mar 1 00:39:19.635: RIP: sending v1 update to 255.255.255.255 via FastEthernet3/0 (30.30.30.30)
*Mar 1 00:39:19.635: RIP: build update entries
*Mar 1 00:39:19.635: network 40.0.0.0 metric 1
*Mar 1 00:39:22.523: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (40.40.40.1)
*Mar 1 00:39:22.523: RIP: build update entries
*Mar 1 00:39:22.523: network 20.0.0.0 metric 2
*Mar 1 00:39:22.523: network 30.0.0.0 metric 1

R2(R3でripをONにしたあと)
*Mar 1 01:06:43.447: RIP: received v1 update from 30.30.30.30 on FastEthernet0/0
*Mar 1 01:06:43.447: 40.0.0.0 in 1 hops
*Mar 1 01:06:43.535: RIP: sending v1 update to 255.255.255.255 via FastEthernet3/0 (20.20.20.20)
*Mar 1 01:06:43.535: RIP: build update entries
*Mar 1 01:06:43.535: network 30.0.0.0 metric 1
*Mar 1 01:06:43.535: network 40.0.0.0 metric 2
R2#
*Mar 1 01:06:45.451: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet0/0 (30.30.30.1)
*Mar 1 01:06:45.451: RIP: build flash update entries – suppressing null update
*Mar 1 01:06:45.451: RIP: sending v1 flash update to 255.255.255.255 via FastEthernet3/0 (20.20.20.20)
*Mar 1 01:06:45.455: RIP: build flash update entries
*Mar 1 01:06:45.455: network 40.0.0.0 metric 2
R2#
*Mar 1 01:06:51.071: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (30.30.30.1)
*Mar 1 01:06:51.071: RIP: build update entries
*Mar 1 01:06:51.071: network 20.0.0.0 metric 1
R2#
*Mar 1 01:07:02.663: RIP: received v1 update from 30.30.30.30 on FastEthernet0/0
*Mar 1 01:07:02.667: 40.0.0.0 in 1 hops
R2#
*Mar 1 01:07:11.179: RIP: sending v1 update to 255.255.255.255 via FastEthernet3/0 (20.20.20.20)
*Mar 1 01:07:11.179: RIP: build update entries
*Mar 1 01:07:11.179: network 30.0.0.0 metric 1
*Mar 1 01:07:11.179: network 40.0.0.0 metric 2
R2#
*Mar 1 01:07:17.799: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (30.30.30.1)
*Mar 1 01:07:17.799: RIP: build update entries
*Mar 1 01:07:17.799: network 20.0.0.0 metric 1
R2#
*Mar 1 01:07:30.055: RIP: received v1 update from 30.30.30.30 on FastEthernet0/0
*Mar 1 01:07:30.055: 40.0.0.0 in 1 hops

R2、R3のルーティングテーブル確認
R2#sh ip route
C 20.0.0.0/8 is directly connected, FastEthernet3/0
R 40.0.0.0/8 [120/1] via 30.30.30.30, 00:00:05, FastEthernet0/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0

R3#sh ip route
R 20.0.0.0/8 [120/1] via 30.30.30.1, 00:00:18, FastEthernet3/0
C 40.0.0.0/8 is directly connected, FastEthernet0/0
C 30.0.0.0/8 is directly connected, FastEthernet3/0

R2、R3のRIPデータベース確認
R2#sh ip rip database
20.0.0.0/8 auto-summary
20.0.0.0/8 directly connected, FastEthernet3/0
30.0.0.0/8 auto-summary
30.0.0.0/8 directly connected, FastEthernet0/0
40.0.0.0/8 auto-summary ★
40.0.0.0/8  [1] via 30.30.30.30, 00:00:23, FastEthernet0/0 ★

R3#sh ip rip database
20.0.0.0/8 auto-summary
20.0.0.0/8  [1] via 30.30.30.1, 00:00:02, FastEthernet3/0
30.0.0.0/8 auto-summary
30.0.0.0/8 directly connected, FastEthernet3/0
40.0.0.0/8 auto-summary ★
40.0.0.0/8 directly connected, FastEthernet0/0 ★

【ping結果】
■R5
R1 fa0/0 10.10.10.10 ×
R1 fa3/0 20.20.20.1 ×  R1からのルート、つまり、戻りのルートがないから
R2 fa0/0 20.20.20.20 ○ 
R2 fa3/0 30.30.30.1 ○
R3 fa0/0 30.30.30.30 ○
R3 fa3/0 40.40.40.40 ○
R4(HOST1) fa0/0 10.10.10.1 ×
R5(HOST2) fa0/0 40.40.40.1 ○

R1上で
ためしに、network 20.0.0.0を設定しない

R1(config)#route rip
R1(config-router)#network 10.0.0.0

*Mar 1 03:15:04.127: RIP: ignored v1 packet from 20.20.20.20 (not enabled on FastEthernet0/0)
*Mar 1 03:15:18.411: RIP: sending v1 update to 255.255.255.255 via FastEthernet3/0 (10.10.10.10)
*Mar 1 03:15:18.411: RIP: build update entries – suppressing null update
*Mar 1 03:15:29.903: RIP: ignored v1 packet from 20.20.20.20 (not enabled on FastEthernet0/0)
*Mar 1 03:15:44.075: RIP: sending v1 update to 255.255.255.255 via FastEthernet3/0 (10.10.10.10)
*Mar 1 03:15:44.075: RIP: build update entries – suppressing null update

R1sh ip route
C 20.0.0.0/8 is directly connected, FastEthernet0/0
C 10.0.0.0/8 is directly connected, FastEthernet3/0

R1#do sh ip rip database
10.0.0.0/8 auto-summary
10.0.0.0/8 directly connected, FastEthernet3/0

やはり、反映されない
RIPをsendする方、receiveする方・・・
RIPを有効にしたいインターフェースをネットワークアドレスを指定(RIP v1はクラスフルで指定)して、
さらに流したいセグメント情報を設定してなければ、ルータ間でやりとりしないし
ルーティングテーブルに反映されない

R1(config-router)#network 20.0.0.0

R1#sh ip route
C 20.0.0.0/8 is directly connected, FastEthernet0/0
R 40.0.0.0/8 [120/2] via 20.20.20.20, 00:00:08, FastEthernet0/0
C 10.0.0.0/8 is directly connected, FastEthernet3/0
R 30.0.0.0/8 [120/1] via 20.20.20.20, 00:00:08, FastEthernet0/0

R1#sh ip rip database
10.0.0.0/8 auto-summary
10.0.0.0/8 directly connected, FastEthernet3/0
20.0.0.0/8 auto-summary
20.0.0.0/8 directly connected, FastEthernet0/0
30.0.0.0/8 auto-summary
30.0.0.0/8  [1] via 20.20.20.20, 00:00:02, FastEthernet0/0
40.0.0.0/8 auto-summary
40.0.0.0/8  [2] via 20.20.20.20, 00:00:02, FastEthernet0/0

一気にきた

pingも飛んだ

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

タイトルとURLをコピーしました