خوش آموز درخت تو گر بار دانش بگیرد، به زیر آوری چرخ نیلوفری را


نحوه پیکربندی پروتکل RIPv1

نحوه پیکربندی پروتکل RIPv1
در این پست قصد داریم نحوه کانفیگ کردن پروتکل مسیریابی RIP را خدمت شما عزیزان آموزش دهیم. RIP اولین Dynamic Routing Protocol ای است که در دوره CCNA آموزش داده می شود. قبلا در خصوص ورژن های مختلف RIP پستی را در سایت قرار داده ایم که می توانید از طریق لین زیر به آن پست وارد شوید ولی چیزی که در اینجا بدان خواهیم پرداخت فقط نحوه کافیک کردن RIP است.

نرم افزار سامانه مودیان راهکار




نحوه محاسبه متریک در پروتکل مسیریابی RIP

تفاوت ورژن های مختلف RIP چیست

Metric چیست و چه کاربردی در مسیریابی دارد

Auto summarization چیست؟

نحوه محاسبه متریک در پروتکل مسیریابی RIP

البته لازم به ذکر است که پروتکل RIP در دسته Distance Vectore ها قرار دارد.


تفاوت الگوریتم های مسیریابی Distance vector و Link State

تفاوت static IP address و dynamic IP address

تفاوت بین Static route و Dynamic Route چیست

ضمن اینکه Administrative Distance در پروتکل مسیریابی RIP بصورت پیشفرض 120 است.


Administrative distance چیست

در پروسه ای ساده، با استفاده از روترهای 1841 سیسکو اقدام به راه اندازی پروتکل مسیریابی RIP خواهیم نمود و از پیکربندی و توپولوژی که در تصویر زیر مشاهده می کنید استفاده خواهیم کرد. شما در محیط Cisco packet tracer از همچین روترهایی می توانید استفاده کنید و صد البته که از روترهای دیگر هم می توانید استفاده کنید فقط باید توجه و حواستان به نوع اینترفیس ها باشد که اگر چنانچه روتر به جای اینترفیس های Fast ethernet، مجهز به اینترفیس های Gigabite Ethernet بود، دستورات را صحیح وارد کنید و گرنه اصلا مهم نیست که شما از چه روتر سیسکویی استفاده می کنید.

نحوه پیکربندی پروتکل RIPv1 . آموزشگاه رایگان خوش آموز

در دوره آموزشی ویدئویی CCNA نحوه IP Address دادن به اینترفیس ها را بررسی کردیم. چناچه با ip دادن به اینترفیس های روتر سیسکو آشنایی ندارید و یا احیانا دستورات آن را فراموش کرده اید می توانید به ویدئوهای دوره وارد شوید.
تمام IP هایی که به اینترفیس های روتر تخصیص داده شده در تصویر فوق و همینطور جدول زیر نشان داده شده است:

نحوه پیکربندی پروتکل RIPv1 . آموزشگاه رایگان خوش آموز

اجازه دهید قبل از پیکربندی RIP در روترها، نگاهی به تنظیمات موجود در روتر داشته باشیم. پس در محیط Privileged EXEC mode، دستور show version را برای مشاهده ورژن ios روتر وارد می کنیم و اطلاعاتی در خصوص خود روتر به ما نشان داده شود.

R1#show version
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 15.1(4)M1, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2011 by Cisco Systems, Inc.
Compiled Tue 14-Jun-11 16:51 by prod_rel_team

ROM: System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)

R1 uptime is 27 minutes
System returned to ROM by power-on
System image file is "flash:c1841-advipservicesk9-mz.151-4.M1.bin"
Last reload type: Normal Reload


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

Cisco 1841 (revision 7.0) with 239616K/22528K bytes of memory.
Processor board ID FHK1232273Y
2 FastEthernet interfaces
1 Virtual Private Network (VPN) Module
DRAM configuration is 64 bits wide with parity disabled.
191K bytes of NVRAM.
62720K bytes of ATA CompactFlash (Read/Write)


License Info:

License UDI:

-------------------------------------------------
Device# PID SN
-------------------------------------------------
*0 CISCO1841 FHK1232273Y



سپس با دستور show ip interface brief ، از وضعیت و همچنین ip هایی که به اینترفیس های روتر تخصیص داده ایم مطلع می شویم، این دستور را در هر روتر جداگانه اجرا کنید تا از ip هایی که به اینترفیس ها تخصیص داده اید مطمئن شوید.

R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.10.1 YES NVRAM up up
FastEthernet0/1 192.168.20.1 YES NVRAM up up
!--- Lists the R1 interface configuration information ---!
R1#show ip protocols *** IP Routing is NSF aware ***


سپس با دستور Show ip route از وضعیت Routing table روترها مطلع می شویم.

R1#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
+ - replicated route, % - next hop override

Gateway of last resort is not set

192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, FastEthernet0/0
L 192.168.10.1/32 is directly connected, FastEthernet0/0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.20.0/24 is directly connected, FastEthernet0/1
L 192.168.20.1/32 is directly connected, FastEthernet0/1
!--- Routing table of R1 lists the directly connected interfaces ---!


حالا که اطلاعاتی در خصوص اینترفیس های روتر بدست آوردیم و همچنین از جداول مسیریابی آنها اطلاعات کسب کردیم وقت این است که stack پروتکل rip را فعال و شبکه های Connected به هر روتر را معرفی کنیم. پس دستورات را به ترتیب وارد می کنیم.

configure terminal

!- Enters global configuration mode. -!

router rip

!- Enables a RIP routing process and enters router configuration mode -!

network ip-address

!- Associates a network interface with a RIP routing process. -!

end


!- Exits router configuration mode and returns to privileged EXEC mode. -!


در دستور فوق به جای IP Address باید ip address مربوط به اینترفیس های Connected هر روتر را وارد کنیم. این دستورات باید در هر روتر جداگانه وارد شود.
اما با هم اینکارها را انجام میدهیم.
ابتدا به سراغ R1 می رویم و آن را پیکربندی می کنیم:

R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ?
bgp Border Gateway Protocol (BGP)
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
isis ISO IS-IS
iso-igrp IGRP for OSI networks
lisp Locator/ID Separation Protocol
mobile Mobile routes
odr On Demand stub Routes
ospf Open Shortest Path First (OSPF)
rip Routing Information Protocol (RIP)


R1(config)#router rip
R1(config-router)#?
Router configuration commands:
address-family Enter Address Family command mode
auto-summary Enable automatic network number summarization
default Set a command to its defaults
default-information Control distribution of default information
default-metric Set metric of redistributed routes
distance Define an administrative distance
distribute-list Filter networks in routing updates
exit Exit from routing protocol configuration mode
flash-update-threshold Specify flash update threshold in second
help Description of the interactive help system
input-queue Specify input queue depth
maximum-paths Forward packets over multiple paths
neighbor Specify a neighbor router
network Enable routing on an IP network
no Negate a command or set its defaults
offset-list Add or subtract offset from RIP metrics
output-delay Interpacket delay for RIP updates
passive-interface Suppress routing updates on an interface
redistribute Redistribute information from another routing
protocol
timers Adjust routing timers
traffic-share How to compute traffic share over alternate paths
validate-update-source Perform sanity checks against source address of
routing updates
version Set routing protocol version

R1(config-router)#network 192.168.10.0
!--- Associates interface 192.168.10.1 with the RIP routing process. ---!
R1(config-router)#network 192.168.20.0
!--- Associates interface 192.168.20.1 with the RIP routing process. ---!
R1(config-router)#exit
R1(config)#^Z
R1#


هر اینترفیسی را که در RIP معرفی کنید، در بازی این Routing Protocol وارد خواهد شد و روی آن اینترفیس ها Advertise روت ها انجام خواهد شد. در ضمن ما از RIP V1 استفاده می کنیم پس تمامی شبکه ها باید بصورت Classful باشند در غیر اینصورت در Routing مشکل خواهیم داشت. برای مثال وقتی شبکه 192.168.20.0 را معرفی می کنیم، آن را Classful فرض می کند(یعنی 255.255.255.0).
حالا با استفاده از دستور show ip protocols از وضعیت پروتکل های فعال در این روتر و همینطور با استفاده از دستورshow ip route از وضعیت routing table این روتر اگاهی می یابیم.


R1#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "rip"
!--- We can see that RIP is active on the router ---!
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 17 seconds
!--- The time between routing updates ---!
Invalid after 180 seconds, hold down 180, flushed after 240
!--- The timer vales for invalid, hold-down and flushed ---!
Redistributing: rip

Default version control: send version 1, receive any version
!--- By default RIP only sends RIPv1 updates. However it receives RIPv1 & RIPv2 ---!
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 1 1 2
FastEthernet0/1 1 1 2

!--- By default RIP only sends RIPv1 updates. However it receives RIPv1 & RIPv2 ---!
Automatic network summarization is in effect
!--- By default automatic network summarization is enabled ---!
Maximum path: 4

Routing for Networks:
192.168.10.0
192.168.20.0

!--- Networks for which the routing process is currently injecting routes ---!
Routing Information Sources:
Gateway Distance Last Update

!--- Lists all the routing sources that the Cisco IOS software is using to build its routing table ---!
Distance: (default is 120)
!--- Lists the Administrative Distance ---!



R1#show ip protocols | section Default
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 1 1 2
FastEthernet0/1 1 1 2


R1#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
+ - replicated route, % - next hop override

Gateway of last resort is not set

192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, FastEthernet0/0
L 192.168.10.1/32 is directly connected, FastEthernet0/0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.20.0/24 is directly connected, FastEthernet0/1
L 192.168.20.1/32 is directly connected, FastEthernet0/1

از آنجایی که هنوز در روترهای دیگر، RIP را فعال نکرده ایم، پس هنوز جداول مسیریابی آن روترها advertise نمی شوند و هنوز روترها با هم ارتباط ندارند.
پس به سراغ روتر R2 می رویم.


R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router rip
R2(config-router)#network 192.168.20.0
R2(config-router)#network 192.168.30.0
R2(config-router)#end
R2#
*Jan 1 08:12:41.107: %SYS-5-CONFIG_I: Configured from console by console
!--- End of R2 Configuration ---!




R2#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 1 1 2
FastEthernet0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.20.0
192.168.30.0

Routing Information Sources:
Gateway Distance Last Update
192.168.20.1 120 00:00:14
Distance: (default is 120)

!--- We can see R2 is learning routing updates from R1 ---!



R2#show ip protocols | section Defaults 
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 1 1 2
FastEthernet0/1 1 1 2


R2#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
+ - replicated route, % - next hop override

Gateway of last resort is not set


R 192.168.10.0/24 [120/1] via 192.168.20.1, 00:00:00, FastEthernet0/0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.20.0/24 is directly connected, FastEthernet0/0
L 192.168.20.2/32 is directly connected, FastEthernet0/0
192.168.30.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.30.0/24 is directly connected, FastEthernet0/1
L 192.168.30.2/32 is directly connected, FastEthernet0/1

!--- R2 has learned about network 192.168.10.0 from R1 ---!


خب حالا که روی روتر R2 پروتکل RIP فعال شد و شبکه های متصل به این روتر هم معرفی گردید، بیایید به سراغ روتر R1 برویم و دستور Show ip route را اجرا کنیم. این بار خواهید دید که routing table تغییراتی کرده است.

R1#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
+ - replicated route, % - next hop override

Gateway of last resort is not set

192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, FastEthernet0/0
L 192.168.10.1/32 is directly connected, FastEthernet0/0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.20.0/24 is directly connected, FastEthernet0/1
L 192.168.20.1/32 is directly connected, FastEthernet0/1

R 192.168.30.0/24 [120/1] via 192.168.20.2, 00:00:12, FastEthernet0/1
!--- R1 has learned a dynamic route from R2 ---!


کاملا مسیرهای مربوط به روتر R2 در R1 و بر عکس Advertise شده اند.
به سراغ روتر R3 رفته و آن را هم Config کنیم:

R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

R3(config)#router rip
R3(config-router)#network 192.168.30.0
R3(config-router)#network 192.168.40.0
R3(config-router)#end
R3#


از وضعیت پروتکل فعال شده اطلاع کسب کنیم:

R3#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 1 1 2
FastEthernet0/1 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
192.168.30.0
192.168.40.0

Routing Information Sources:
Gateway Distance Last Update
192.168.30.2 120 00:00:07
Distance: (default is 120)

!--- R3 is learning routes from R2 ---!



همینطور نگاهی هم به Routing table روتر R3 داشته باشیم.

R3#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
+ - replicated route, % - next hop override

Gateway of last resort is not set


R 192.168.10.0/24 [120/2] via 192.168.30.2, 00:00:18, FastEthernet0/1
R 192.168.20.0/24 [120/1] via 192.168.30.2, 00:00:18, FastEthernet0/1

192.168.30.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.30.0/24 is directly connected, FastEthernet0/1
L 192.168.30.3/32 is directly connected, FastEthernet0/1
192.168.40.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.40.0/24 is directly connected, FastEthernet0/0
L 192.168.40.3/32 is directly connected, FastEthernet0/0

!--- R3 has learned about 192.168.10.0 & 192.168.20.0 from R2 ---!

روتر R2

R2#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
+ - replicated route, % - next hop override

Gateway of last resort is not set

R 192.168.10.0/24 [120/1] via 192.168.20.1, 00:00:09, FastEthernet0/0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.20.0/24 is directly connected, FastEthernet0/0
L 192.168.20.2/32 is directly connected, FastEthernet0/0
192.168.30.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.30.0/24 is directly connected, FastEthernet0/1
L 192.168.30.2/32 is directly connected, FastEthernet0/1

R 192.168.40.0/24 [120/1] via 192.168.30.3, 00:00:21, FastEthernet0/1
!--- R2 is learning route 192.168.10.0 from R1 and 192.168.40.0 from R3 ---!


روتر R1

R1#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
+ - replicated route, % - next hop override

Gateway of last resort is not set

192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, FastEthernet0/0
L 192.168.10.1/32 is directly connected, FastEthernet0/0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.20.0/24 is directly connected, FastEthernet0/1
L 192.168.20.1/32 is directly connected, FastEthernet0/1

R 192.168.30.0/24 [120/1] via 192.168.20.2, 00:00:01, FastEthernet0/1
R 192.168.40.0/24 [120/2] via 192.168.20.2, 00:00:01, FastEthernet0/1

!--- R1 is also learning two routes. 192.168.30.0 & 192.168.40.0 from R2 ---!


حالا با ایجاد اتصال کامپیوتر به روترها یا حتی ایجاد loopback interface در روترها می توانید تست ارتباط را در این پروتکل مسیریابی انجام دهید.



نمایش دیدگاه ها (0 دیدگاه)

دیدگاه خود را ثبت کنید:

انتخاب تصویر ویرایش حذف
توجه! حداکثر حجم مجاز برای تصویر 500 کیلوبایت می باشد.


دسته بندی مطالب خوش آموز