RIPv1 ve RIPv2


Bu bölümde RIPv1 konfügurayonu yapmayı ve RIPv2’yi aktif etmeyi göreceğiz.
RIPv2 konfigurasyonu bir sonraki bölümde anlatılmaktadır.

 

rıp
RIP, küçük ağlar arası yönlendirme yapmak için kullandıgımız bir protokoldur. RIPv2 daha fazla avantajı olan bir protokoldür.

 

1 . Temel sistem ve ip address  yapılandırması.
Cihazlarda ip adreslerini vereleim ve LoopBackleri oluşturalım. CLIGURU-R1, CLIGURU-R2 ve CLIGURU-R3 de aynısını uygulayalım.
<Huawei>system-vie
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname CLIGURU-R1
[CLIGURU-R1]interface GigabitEthernet 0/0/0
[CLIGURU-R1-GigabitEthernet0/0/0]ip address 10.0.13.1 24
[CLIGURU-R1-GigabitEthernet0/0/0]quit
[CLIGURU-R1]interface LoopBack 0
[CLIGURU-R1-LoopBack0]ip address 10.0.1.1 24
[CLIGURU-R1-LoopBack0]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname CLIGURU-R2
[CLIGURU-R2]interface GigabitEthernet 0/0/0
[CLIGURU-R2-GigabitEthernet0/0/0]ip address 10.0.13.2 24
[CLIGURU-R2-GigabitEthernet0/0/0]quit
[CLIGURU-R2]interface GigabitEthernet 0/0/1
[CLIGURU-R2-GigabitEthernet0/0/1]ip address 10.0.12.2 24
[CLIGURU-R2-GigabitEthernet0/0/1]quit
[CLIGURU-R2]interface LoopBack 0
[CLIGURU-R2-LoopBack0]ip address 10.0.2.2 24
[CLIGURU-R2-LoopBack0]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname CLIGURU-R3
[CLIGURU-R3]interface GigabitEthernet 0/0/0
[CLIGURU-R3-GigabitEthernet0/0/0]ip address 10.0.12.3 24
[CLIGURU-R3-GigabitEthernet0/0/0]quit
[CLIGURU-R3]interface LoopBack 0
[CLIGURU-R3-LoopBack0]ip address 10.0.3.3 24
[CLIGURU-R3-LoopBack0]quit
CLIGURU-R1 ve CLIGURU-R2 (10.0.13.0 network’ü) ‘nin birbirleri ile iletişim kurabildiğini kontrol edelim.
<CLIGURU-R1>ping 10.0.13.2
PING 10.0.13.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.13.2: bytes=56 Sequence=1 ttl=255 time=200 ms
Reply from 10.0.13.2: bytes=56 Sequence=2 ttl=255 time=40 ms
Reply from 10.0.13.2: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 10.0.13.2: bytes=56 Sequence=4 ttl=255 time=60 ms
Reply from 10.0.13.2: bytes=56 Sequence=5 ttl=255 time=20 ms
— 10.0.13.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/70/200 ms
CLIGURU-R2  ve CLIGURU-R3   (10.0.12.0 network’ü)  ‘ün birbirleri ile iletişim kurabildiğini kontrol edelim.
<CLIGURU-R2>ping 10.0.12.3
PING 10.0.12.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.12.3: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 10.0.12.3: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 10.0.12.3: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 10.0.12.3: bytes=56 Sequence=4 ttl=255 time=70 ms
Reply from 10.0.12.3: bytes=56 Sequence=5 ttl=255 time=50 ms
— 10.0.12.3 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/58/70 ms
2 . RIPv1 yapılandırılması.
CLIGURU-R1 üzerinde RIP i etkinleştirelim ve üzerinde bulundugu 10.0.0.0 network’ünü  anons edelim.
[CLIGURU-R1-rip-1]rip 1
[CLIGURU-R1-rip-1]network 10.0.0.0
CLIGURU-R2 üzerinde RIP i etkinleştirelim ve üzerinde bulundugu 10.0.0.0 network’ünü  anons edelim.
[CLIGURU-R2]rip 1
[CLIGURU-R2-rip-1]network 10.0.0.0
CLIGURU-R3 üzerinde RIP i etkinleştirelim ve üzerinde bulundugu 10.0.0.0 network’ünü  anons edelim
[CLIGURU-R3]rip 1
[CLIGURU-R3-rip-1]network 10.0.0.0
  1. RIPv1 kontrol edelim.
CLIGURU-R1,CLIGURU-R2 ve CLIGURU-R3 ‘ün routing (yönlendirme)  tablolarını inceleyim. RIP’in  yol tarifini  ögrendiğini aşagıda işaretli olan  yerlere  bakarak görelim.
<CLIGURU-R1>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 9       Routes : 9
Destination/Mask   Proto   Pre Cost     Flags NextHop         Interface
10.0.1.0/24 Direct 0   0           D   10.0.1.1     LoopBack0
10.0.1.1/32 Direct 0   0           D   127.0.0.1   LoopBack0
10.0.2.0/24 RIP     100 1           D   10.0.13.2   GigabitEthernet0/0/0
10.0.3.0/24 RIP     100 2           D   10.0.13.2   GigabitEthernet0/0/0
10.0.12.0/24 RIP     100 1           D   10.0.13.2   GigabitEthernet0/0/0
10.0.13.0/24 Direct 0   0           D   10.0.13.1   GigabitEthernet0/0/0
10.0.13.1/32 Direct 0   0           D   127.0.0.1   GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0           D   127.0.0.1   InLoopBack0
127.0.0.1/32 Direct 0   0           D   127.0.0.1   InLoopBack0
<CLIGURU-R2>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 10       Routes : 10
Destination/Mask   Proto   Pre Cost     Flags NextHop         Interface
10.0.1.0/24 RIP     100 1           D   10.0.13.1   GigabitEthernet0/0/0
10.0.2.0/24 Direct 0   0           D   10.0.2.2     LoopBack0
10.0.2.2/32 Direct 0   0           D   127.0.0.1   LoopBack0
10.0.3.0/24 RIP     100 1           D   10.0.12.3   GigabitEthernet0/0/1
10.0.12.0/24 Direct 0   0           D   10.0.12.2   GigabitEthernet0/0/1
10.0.12.2/32 Direct 0   0           D   127.0.0.1   GigabitEthernet0/0/1
10.0.13.0/24 Direct 0   0           D   10.0.13.2   GigabitEthernet0/0/0
10.0.13.2/32 Direct 0   0           D   127.0.0.1   GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0           D   127.0.0.1   InLoopBack0
127.0.0.1/32 Direct 0   0           D   127.0.0.1   InLoopBack0
<CLIGURU-R3>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 9       Routes : 9
Destination/Mask   Proto   Pre Cost     Flags NextHop         Interface
10.0.1.0/24 RIP     100 2           D   10.0.12.2   GigabitEthernet0/0/0
10.0.2.0/24 RIP     100 1           D   10.0.12.2   GigabitEthernet0/0/0
10.0.3.0/24 Direct 0   0           D   10.0.3.3   LoopBack0
10.0.3.3/32 Direct 0   0           D   127.0.0.1   LoopBack0
10.0.12.0/24 Direct 0   0           D   10.0.12.3 GigabitEthernet0/0/0
10.0.12.3/32 Direct 0   0           D   127.0.0.1 GigabitEthernet0/0/0
10.0.13.0/24 RIP     100 1           D   10.0.12.2 GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0          D   127.0.0.1       InLoopBack0
127.0.0.1/32 Direct 0   0           D   127.0.0.1       InLoopBack0
CLIGURU-R1 den 10.0.12.3 IP’sine ping atarak, CLIGURU-R1 ve CLIGURU-R3’ün  birbirleriyle iletişim kurduğunu görebiliriz.
<CLIGURU-R1>ping 10.0.12.3
PING 10.0.12.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.12.3: bytes=56 Sequence=1 ttl=254 time=50 ms
Reply from 10.0.12.3: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 10.0.12.3: bytes=56 Sequence=3 ttl=254 time=60 ms
Reply from 10.0.12.3: bytes=56 Sequence=4 ttl=254 time=70 ms
Reply from 10.0.12.3: bytes=56 Sequence=5 ttl=254 time=70 ms
— 10.0.12.3 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/58/70 ms
RIP periodik güncellemeleri görüntülemek için debugging komutunu kullanırız.
RIP de debugging fonksiyonunu etkinleştirelim. Debugging komutu sadece user view modunda kullanılır. Etkinleştirdiğimiz debugging komutunu display debugging diyerek görüntüleyebiliriz. Debugging bilgilerini görüntülemek için terminal debugging komutunu kullanırız.
Rauterler arası RIP hakkındaki  bilgileri görüntüleyelim.
<CLIGURU-R1>debugging rip 1
<CLIGURU-R1>display debugging
RIP Process id: 1
Debugs ON: SEND, RECEIVE, PACKET, TIMER, EVENT, BRIEF,
JOB, ROUTE-PROCESSING, ERROR,
REPLAY-PROTECT, GR
<CLIGURU-R1>terminal debugging
Info: Current terminal debugging is on.
<CLIGURU-R1>
Oct 21 2014 15:47:43.530.1-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12185: RIP 1: Receiving v1 response on GigabitEthernet0/0/0 from 10.0.13.2 with 3 RTEs
Oct 21 2014 15:47:43.530.2-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12236: RIP 1: Receive response
from 10.0.13.2 on GigabitEthernet0/0/0
Oct 21 2014 15:47:43.530.3-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12247: Packet: Version 1, Cmd r
esponse, Length 64
Oct 21 2014 15:47:43.530.4-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12296: Dest 10.0.2.0, Cost 1
Oct 21 2014 15:47:43.530.5-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12296: Dest 10.0.3.0, Cost 2
Oct 21 2014 15:47:43.530.6-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12296: Dest 10.0.12.0, Cost 1
Oct 21 2014 15:47:47.630.1-08:00 CLIGURU-R1 RIP/7/DBG: 25: 3741: RIP 1: Periodic timer ex
pired for interface GigabitEthernet0/0/0
 Açtıgımız debugging leri kapatmak için undo debugging rip <process-id> veya undo debugging all diyerek tüm debug işlemlerini kapatırız.
 <CLIGURU-R1>undo debugging rip 1
Bazı parametreler girilerek spesifik olarak debug alınabilir. Örneğin debugging rip 1 event komutu sadece periyodik güncellemeleri görüntülememizi sağlar. Debug komutlarından sonra konulacak soru işareti(?) ile bunlar görüntülenebilir.
<CLIGURU-R1>debugging rip 1 event
Oct 21 2014 15:52:50.150.1-08:00 CLIGURU-R1 RIP/7/DBG: 25: 4379: RIP 1: Periodic timer ex
pired for interface GigabitEthernet0/0/0 (10.0.13.1) and its added to periodic up
date queue
Oct 21 2014 15:52:50.150.2-08:00 CLIGURU-R1 RIP/7/DBG: 25: 4707: RIP 1: Interface Gigabit
Ethernet0/0/0 (10.0.13.1) is deleted from the periodic update queue
Uyarı: Eğer çok fazla debug fonksiyonu açıksa, çok fazla sistem kaynağı tüketebilir, cihazın hata vermesine dahi sebep olabilir.
<CLIGURU-R1>undo debugging all
Info: All possible debugging has been turned off.
  1. RIPv2 konfigürasyonu yapılandırılması.
RIP altında version 2 diyerek, RIPv2 ‘yi aktif hale getirelim.
[CLIGURU-R1]rip 1
[CLIGURU-R1-rip-1]version 2
[CLIGURU-R2]rip 1
[CLIGURU-R2-rip-1]version 2
[CLIGURU-R3]rip 1
[CLIGURU-R3-rip-1]version 2
  1. RIPv2 kontrol edelim.
CLIGURU-R1, CLIGURU-R2 ve CLIGURU-R3 ün routing tablolarına bakalım.
Displap ip routing-table diyerek tablolara bakalım. RIPv1 tablosu ile karşlaştıralım.
<CLIGURU-R1>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 9       Routes : 9
Destination/Mask   Proto   Pre Cost     Flags NextHop         Interface
10.0.1.0/24 Direct 0   0           D   10.0.1.1       LoopBack0
10.0.1.1/32 Direct 0   0           D   127.0.0.1       LoopBack0
10.0.2.0/24 RIP     100 1           D   10.0.13.2 GigabitEthernet0/0/0
10.0.3.0/24 RIP   100 2           D   10.0.13.2   GigabitEthernet0/0/0
10.0.12.0/24 RIP     100 1           D   10.0.13.2 GigabitEthernet0/0/0
10.0.13.0/24 Direct 0   0           D   10.0.13.1 GigabitEthernet0/0/0
10.0.13.1/32 Direct 0   0           D   127.0.0.1   GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0           D   127.0.0.1   InLoopBack0
127.0.0.1/32 Direct 0   0           D   127.0.0.1  InLoopBack0
<CLIGURU-R2>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 10       Routes : 10
Destination/Mask   Proto   Pre Cost     Flags NextHop         Interface
10.0.1.0/24 RIP     100 1           D   10.0.13.1   GigabitEthernet0/0/0
10.0.2.0/24 Direct 0   0           D   10.0.2.2     LoopBack0
10.0.2.2/32 Direct 0   0           D   127.0.0.1   LoopBack0
10.0.3.0/24 RIP     100 1           D   10.0.12.3   GigabitEthernet0/0/1
10.0.12.0/24 Direct 0   0           D   10.0.12.2 GigabitEthernet0/0/1
10.0.12.2/32 Direct 0   0           D   127.0.0.1 GigabitEthernet0/0/1
10.0.13.0/24 Direct 0   0           D   10.0.13.2 GigabitEthernet0/0/0
10.0.13.2/32 Direct 0   0          D   127.0.0.1 GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0           D   127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0   0           D   127.0.0.1 InLoopBack0
<CLIGURU-R3>display ip routing-table
Route Flags: R – relay, D – download to fib
——————————————————————————
Routing Tables: Public
Destinations : 9       Routes : 9
Destination/Mask   Proto   Pre Cost   Flags NextHop Interface
10.0.1.0/24 RIP     100 2           D   10.0.12.2   GigabitEthernet0/0/0
10.0.2.0/24 RIP     100 1           D   10.0.12.2   GigabitEthernet0/0/0
10.0.3.0/24 Direct 0   0           D   10.0.3.3     LoopBack0
10.0.3.3/32 Direct 0   0           D   127.0.0.1   LoopBack0
10.0.12.0/24 Direct 0   0           D   10.0.12.3 GigabitEthernet0/0/0
10.0.12.3/32 Direct 0   0           D   127.0.0.1 GigabitEthernet0/0/0
10.0.13.0/24 RIP     100 1           D   10.0.12.2   GigabitEthernet0/0/0
127.0.0.0/8   Direct 0   0          D   127.0.0.1     InLoopBack0
127.0.0.1/32 Direct 0   0           D   127.0.0.1     InLoopBack0
CLIGURU-R1 in CLIGURU-R3 (10.0.12.3) netwoküne gittigini ping atarak görüyoruz.
<CLIGURU-R1>ping 10.0.12.3
PING 10.0.12.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.12.3: bytes=56 Sequence=1 ttl=254 time=70 ms
Reply from 10.0.12.3: bytes=56 Sequence=2 ttl=254 time=60 ms
Reply from 10.0.12.3: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 10.0.12.3: bytes=56 Sequence=4 ttl=254 time=60 ms
Reply from 10.0.12.3: bytes=56 Sequence=5 ttl=254 time=30 ms
— 10.0.12.3 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/50/70 ms
RIPv2 periyodik güncellemeleri görmek için debugging komutu kullanırız.
<CLIGURU-R1>terminal debugging
Info: Current terminal debugging is on.
<CLIGURU-R1>debugging rip 1 event
<CLIGURU-R1>
Oct 21 2014 15:59:18.330.1-08:00 CLIGURU-R1 RIP/7/DBG: 25: 4379: RIP 1: Periodic timer ex
pired for interface GigabitEthernet0/0/0 (10.0.13.1) and its added to periodic up
date queue
Oct 21 2014 15:59:18.330.2-08:00 CLIGURU-R1 RIP/7/DBG: 25: 4707: RIP 1: Interface Gigabit
Ethernet0/0/0 (10.0.13.1) is deleted from the periodic update queue
<CLIGURU-R1>undo debugging rip 1
<CLIGURU-R1>debugging rip 1 packet
<CLIGURU-R1>
Oct 21 2014 16:00:42.930.1-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12227: RIP 1: Sending response
on interface GigabitEthernet0/0/0 from 10.0.13.1 to 224.0.0.9
Oct 21 2014 16:00:42.930.2-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12247: Packet: Version 2, Cmd r
esponse, Length 24
Oct 21 2014 16:00:42.930.3-08:00 CLIGURU-R1 RIP/7/DBG: 6: 12315: Dest 10.0.1.0/24, Nextho
p 0.0.0.0, Cost 1, Tag 0
RIPv1 de cihaz network id leri ve diğer route güncellemelerini subnet mask bilgisi olmadan gönderir. RIPv2 de subnetting desteği vardır ve route’lar subnet bilgileri ile gönderilir.
 
Final…
<CLIGURU-R1>display current-configuration
#
sysname CLIGURU-R1
#
interface GigabitEthernet0/0/0
ip address 10.0.13.1 255.255.255.0
#
interface LoopBack0
ip address 10.0.1.1 255.255.255.0
#
rip 1
version 2
network 10.0.0.0
#
user-interface con 0
#
return
<CLIGURU-R2>display current-configuration
#
sysname CLIGURU-R2
#
interface GigabitEthernet0/0/0
ip address 10.0.13.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
#
interface LoopBack0
ip address 10.0.2.2 255.255.255.0
#
rip 1
version 2
network 10.0.0.0
#
user-interface con 0
user-interface vty 0 4
#
return
<CLIGURU-R3>display current-configuration
#
sysname CLIGURU-R3
#
interface GigabitEthernet0/0/0
ip address 10.0.12.3 255.255.255.0
#
interface LoopBack0
ip address 10.0.3.3 255.255.255.0
#
rip 1
version 2
network 10.0.0.0
#
user-interface con 0
user-interface vty 0 4
#
return