




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
1、實驗四 配置RIP一、實驗目標加深RIP協(xié)議原理的理解了解RIP實現(xiàn)運行的機制掌握RIP路由配置熟悉RIP路由維護二、實驗描述及組網(wǎng)圖通過配置Rip實現(xiàn)各個網(wǎng)段互通,在路由器上與主機相連的接口應用silent-interface命令。 圖 1-12、 實驗過程實驗任務一:配置RIPv1本實驗主要通過在路由器上配置RIPv1協(xié)議,達到PC之間能夠互訪的目的。通過本次實驗,學院應該能夠掌握RIP協(xié)議的基本配置。步驟一:建立物理連接按照圖1-1進行連接。確保路由器配置為出示狀態(tài),如配置不符合要求,請學員在用戶模式下查出設備中的配置文件,然后重啟路由器以使系統(tǒng)采用缺省的配置參數(shù)進行初始化。<Ro
2、uterA>reset saved-configuration <RouterA>reboot 步驟二:在PC和路由器上配置IP地址 表1-1 IP地址列表 設備名稱 接口 IP地址 網(wǎng)關 RouterA S1/0 192.168.1.1/24 - Eth0/0 192.168.0.1/24 - RouterB S1/0 192.168.1.2/24 - Eth0/0 192.168.2.1/24 - PCA - 192.168.0.2/24 192.168.0.1/24 PCB - 192.168.2.2/24 192.168.2.1/24按表1-1所示在路由器接口上配置I
3、P地址。測試PC到網(wǎng)關的可達性,以RouterA為例C:Documents and SettingsAdministrator>ping 192.168.0.1 Pinging 192.168.0.1 with 32 bytes of data:Reply from 192.168.0.1: bytes=32 time<1ms TTL=255Reply from 192.168.0.1: bytes=32 time<1ms TTL=255Reply from 192.168.0.1: bytes=32 time<1ms TTL=255Reply from 192.168
4、.0.1: bytes=32 time<1ms TTL=255Ping statistics for 192.168.0.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms再測試PC之間的可達性。例如:在PCA上用Ping命令測試到PCB的可達性,如下:C:Documents and SettingsAdministrator>ping 192.
5、168.2.2Pinging 192.168.2.2 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 192.168.2.2:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),查看路由器的路由表,以RouterA為例:<RouterA>display ip routing-table Routing Tables: Public Destinati
6、ons : 7 Routes : 7Destination/Mask Proto Pre Cost NextHop Interface127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.0.0/24 Direct 0 0 192.168.0.1 Eth0/0192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.0/24 Direct 0 0 192.168.1.1 S1/0192.168.1.1/32 Direct 0
7、 0 127.0.0.1 InLoop0192.168.1.2/32 Direct 0 0 192.168.1.2 S1/0步驟三:啟用RIP配置RouterA:RouterAripRouterA-rip-1network 192.168.0.0RouterA-rip-1network 192.168.1.0配置RouterB:RouterBripRouterB-rip-1network 192.168.1.0RouterB-rip-1network 192.168.2.0查看路由表,以RouterA為例:RouterAdis ip routing-table Routing Tables:
8、Public Destinations : 8 Routes : 8Destination/Mask Proto Pre Cost NextHop Interface127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.0.0/24 Direct 0 0 192.168.0.1 Eth0/0192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.0/24 Direct 0 0 192.168.1.1 S1/0192.168
9、.1.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.2/32 Direct 0 0 192.168.1.2 S1/0192.168.2.0/24 RIP 100 1 192.168.1.2 S1/0測試PC之間的可達性。在PCA上使用Ping命令測試到PCB的可達性。C:Documents and SettingsAdministrator>ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=22ms TTL=
10、62Reply from 192.168.2.2: bytes=32 time=21ms TTL=62Reply from 192.168.2.2: bytes=32 time=20ms TTL=62Reply from 192.168.2.2: bytes=32 time=20ms TTL=62Ping statistics for 192.168.2.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 20ms, Max
11、imum = 22ms, Average = 20ms可以看到PC之間實現(xiàn)了互通。步驟四:查看RIP運行狀態(tài)在RouterA上用命令display rip 查看:RouterAdisplay ripPublic VPN-instance name : RIP process : 1 RIP version : 1 /RIP版本一 Preference : 100 Checkzero : Enabled Default-cost : 0 Summary : Enabled Hostroutes : Enabled Maximum number of balanced paths : 8 Upda
12、te time : 30 sec(s) Timeout time: 180 sec(s) /RIP的三個 Suppress time : 120 sec(s) Garbage-collect time :120 sec(s) /更新計時器 update output delay : 20(ms) output count : 3 TRIP retransmit time : 5 sec(s) TRIP response packets retransmit count : 36 Silent interfaces : None Default routes : Disabled Verify-
13、source : Enabled Networks : 192.168.1.0 192.168.0.0 Configured peers : None Triggered updates sent : 1 Number of routes changes : 1 Number of replies to queries : 1步驟五:水平分割和毒性逆轉在路由器啟用了RIP之后,默認水平分割是開啟的。我們來查看開啟了水平分割之后路由的更新報文,以RouterA的S1/0接口為例,如下:<RouterA>terminal monitor<RouterA>terminal d
14、ebugging<RouterA>debugging rip 1 packet*Apr 2 14:29:25:825 2010 RouterA RM/6/RMDEBUG: RIP 1 : Sending response on interface Ethernet0/0 from 192.168.0.1to 255.255.255.255/RIPv1廣播發(fā)送更新報文*Apr 2 14:29:25:825 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 44*Apr 2 14:29:25:826 201
15、0 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.1.0, cost 1*Apr 2 14:29:25:826 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.2.0, cost 2*Apr 2 14:29:25:826 2010 RouterA RM/6/RMDEBUG: RIP 1 : Sending response on interface Serial1/0 from 192.168.1.1 to 255.255.255.255*Apr 2 14:29:25:826 2010 RouterA RM/6
16、/RMDEBUG: Packet : vers 1, cmd response, length 24*Apr 2 14:29:25:827 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.0.0, cost 1*Apr 2 14:29:39:725 2010 RouterA RM/6/RMDEBUG: RIP 1 : Receive response from 192.168.1.2 on Serial1/0*Apr 2 14:29:39:725 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd res
17、ponse, length 24*Apr 2 14:29:39:726 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.2.0, cost 1* 現(xiàn)在我們在RouterA上的S1/0口上取消水平分割,觀察收發(fā)協(xié)議報文的情況。RouterA-Serial1/0undo rip split-horizon / 關閉水平分割<RouterA>debugging rip 1 packet*Apr 2 14:38:49:825 2010 RouterA RM/6/RMDEBUG: RIP 1 : Sending response on inter
18、face Ethernet0/0 from 192.168.0.1 to 255.255.255.255*Apr 2 14:38:49:825 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 44*Apr 2 14:38:49:826 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.1.0, cost 1*Apr 2 14:38:49:826 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.2.0, cost 2*Apr
19、2 14:38:49:826 2010 RouterA RM/6/RMDEBUG: RIP 1 : Sending response on interface Serial1/0 from 192.168.1.1 to 255.255.255.255*Apr 2 14:38:49:827 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 64*Apr 2 14:38:49:827 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.0.0, cost 1*Apr 2 14:
20、38:49:827 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.1.0, cost 1*Apr 2 14:38:49:827 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.2.0, cost 2 RouterA從S1/0接口發(fā)送了從該接口學到的路由192.168.1.0和dest 192.168.2.0*Apr 2 14:38:58:866 2010 RouterA RM/6/RMDEBUG: RIP 1 : Receive response from 192.168.1.2 on Serial1
21、/0*Apr 2 14:38:58:867 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 24*Apr 2 14:38:58:867 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.2.0, cost 由以上輸出比較發(fā)現(xiàn),在水平分割功能關閉的情況下,RouterA在接口S1/0上發(fā)送的路由包括從該接口學到的路由,而在啟用水平分割的情況下,RouterA是不會從將從此接口學到的路由在更新協(xié)議包中進行發(fā)送的。* 另外一種避免環(huán)路的機制是毒性逆轉。在RouterA的S1/
22、0上啟用毒性逆轉,再觀察收發(fā)協(xié)議報文的情況。RouterA-Serial1/0rip poison-reverse /啟用毒性逆轉<RouterA>debugging rip 1 packet *Apr 2 14:56:18:825 2010 RouterA RM/6/RMDEBUG: RIP 1 : Sending response on interface Ethernet0/0 from 192.168.0.1 to 255.255.255.255*Apr 2 14:56:18:825 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, c
23、md response, length 44*Apr 2 14:56:18:825 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.1.0, cost 1*Apr 2 14:56:18:826 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.2.0, cost 2*Apr 2 14:56:18:826 2010 RouterA RM/6/RMDEBUG: RIP 1 : Sending response on interface Serial1/0 from 192.168.1.1 to 255.255
24、.255.255*Apr 2 14:56:18:826 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 44*Apr 2 14:56:18:827 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.0.0, cost 1*Apr 2 14:56:18:827 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.2.0, cost 16 RouterA 講從S1/0學到的路由度量值設置為無窮大發(fā)送出去*Apr 2 14:56:31
25、:138 2010 RouterA RM/6/RMDEBUG: RIP 1 : Receive response from 192.168.1.2 on Serial1/0*Apr 2 14:56:31:138 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 24*Apr 2 14:56:31:138 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.2.0, cost 1由以上輸出信息知,啟用毒性逆轉后,RouterA在接口S1/0上發(fā)送的路由更新包含了192.168
26、.2.0,但度量值為16(無窮大)。RouterA主動的去告訴RouterB,從RouterA的S1/0口不能到達192.168.2.0網(wǎng)段。步驟六:用silent-interface控制協(xié)議報文發(fā)送 在之前的試驗中,路由器從每個啟用rip的接口收發(fā)協(xié)議報文,包括與PC相連的接口。事實上,PC并不需要接收RIP協(xié)議報文,我們可以用silent-interface命令使接口只接收而不發(fā)送協(xié)議報文。配置RouterA:RouterA-rip-1silent-interface Ethernet 0/0配置RouterB:RouterB-rip-1silent-interface Ethernet
27、0/0配置完成后,我們用debugging命令查看,可以發(fā)現(xiàn),RIP不再從接口Eth0/0發(fā)送協(xié)議報文了。 RIP是通過計時器來維護路由表的,路由器在180s后沒收到對某路由項的更新,就會將該路由項從路由表中撤銷。下面我們來驗證一下:我們在RouterB的S1/0接口上使用silent-interface命令,接著我們在RouterA上查看路由表,如下:RouterAdis ip routing-table Routing Tables: Public Destinations : 8 Routes : 8Destination/Mask Proto Pre Cost NextHop Inte
28、rface127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.0.0/24 Direct 0 0 192.168.0.1 Eth0/0192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.0/24 Direct 0 0 192.168.1.1 S1/0192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.2/32 Direct 0 0 192.168.1.2 S1/0
29、192.168.2.0/24 RIP 100 1 192.168.1.2 S1/0可以看到,在RouterA的路由表中還有到192.168.2.0的路由。180s后,再來查看路由表:RouterAdis ip routing-table Routing Tables: Public Destinations : 7 Routes : 7Destination/Mask Proto Pre Cost NextHop Interface127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop01
30、92.168.0.0/24 Direct 0 0 192.168.0.1 Eth0/0192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.0/24 Direct 0 0 192.168.1.1 S1/0192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.2/32 Direct 0 0 192.168.1.2 S1/0可以看到路由192.168.2.0已經(jīng)不存在了。這時,我們來查看RIP路由表:RouterAdis rip 1 route Route Flags: R - RIP, T -
31、 TRIP P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect - Peer 192.168.1.2 on Serial1/0 Destination/Mask Nexthop Cost Tag Flags Sec 192.168.2.0/24 192.168.1.2 16 0 RSG 2 Garbage-collect計時器發(fā)現(xiàn)在RIP路由表中還存在該路由,120s以后:RouterAdis rip 1 route Route Flags: R - RIP, T - TRIP P - Permanent, A - Agi
32、ng, S - Suppressed, G - Garbage-collect -此時,該路由項已經(jīng)從路由器中徹底刪除了。實驗任務二:RIPv2的配置RIPv1協(xié)議本身存在有一定的不足,在主類網(wǎng)絡隔離非連續(xù)子網(wǎng)的情況下,不能夠正確的學習到路由。而RIPv2彌補了RIPv1的不足,同時可以支持驗證。步驟一:建立物理連接 按照圖1-1進行連接,確保路由器配置為出示狀態(tài),如配置不符合要求,請學員在用戶模式下查出設備中的配置文件,然后重啟路由器以使系統(tǒng)采用缺省的配置參數(shù)進行初始化。reset saved-configrationReboot步驟二:在PC和路由器上配置IP地址 表1-2 IP地址列表
33、設備名稱 接口 IP地址 網(wǎng)關 RouterA S1/0 192.168.1.1/24 - Eth0/0 10.0.1.1/24 - RouterB S1/0 192.168.1.2/24 - Eth0/0 10.0.0.1/24 - PCA - 10.0.1.2/24 10.0.1.1/24 PCB - 10.0.0.2/24 10.0.0.1/24按表1-2所示配置IP地址。步驟三:配置RIPv1,觀察路由表配置RouterA:RouterAripRouterA-rip-1network 192.168.1.0RouterA-rip-1network 10.0.0.0配置RouterB:R
34、outerBripRouterB-rip-1network 192.168.1.0RouterB-rip-1network 10.0.0.0查看路由表<RouterA>dis ip routing-table Routing Tables: Public Destinations : 7 Routes : 7Destination/Mask Proto Pre Cost NextHop Interface10.0.1.0/24 Direct 0 0 10.0.1.1 Eth0/010.0.1.1/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8
35、Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.0/24 Direct 0 0 192.168.1.1 S1/0192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.2/32 Direct 0 0 192.168.1.2 S1/0 RouterA的路由表中沒有10.0.0.0/24網(wǎng)段的路由。在RouterA上打開debugging:Apr 2 16:15:54:825 2010 RouterA RM/6/RMDEBUG: RIP 1
36、 : Sending response on interface Ethernet0/0 from 10.0.1.1 to 255.255.255.255*Apr 2 16:15:54:825 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 24*Apr 2 16:15:54:825 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 192.168.1.0, cost 1*Apr 2 16:15:54:826 2010 RouterA RM/6/RMDEBUG: RIP 1 : Sen
37、ding response on interface Serial1/0 from 192.168.1.1 to 255.255.255.255*Apr 2 16:15:54:826 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 24*Apr 2 16:15:54:826 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 10.0.0.0, cost 1*Apr 2 16:16:05:356 2010 RouterA RM/6/RMDEBUG: RIP 1 : Receive res
38、ponse from 192.168.1.2 on Serial1/0*Apr 2 16:16:05:356 2010 RouterA RM/6/RMDEBUG: Packet : vers 1, cmd response, length 24*Apr 2 16:16:05:356 2010 RouterA RM/6/RMDEBUG: AFI 2, dest 10.0.0.0, cost 1*Apr 2 16:16:05:357 2010 RouterA RM/3/RMDEBUG: RIP 1 : Ignoring route 10.0.0.0. Its major net addr is s
39、ame as the local interface's.分析:RIPv1發(fā)送的更新報文中不含有掩碼信息,因此出現(xiàn)錯誤。步驟四:配置RIPv2配置RouterA;RouterAripRouterA-rip-1version 2RouterA-rip-1undo summary配置RouterB:RouterBripRouterB-rip-1version 2RouterB-rip-1undo summary配置完成后,在RouterA上查看路由表,如下,RouterAdisplay ip routing-table Routing Tables: Public Destinations
40、 : 8 Routes : 8Destination/Mask Proto Pre Cost NextHop Interface10.0.0.0/24 RIP 100 1 192.168.1.2 S1/010.0.1.0/24 Direct 0 0 10.0.1.1 Eth0/010.0.1.1/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.0/24 Direct 0 0 192.168.1.1 S1/0192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0192.168.1.2/32 Direct 0 0 192.168.1.2 S1/0在RouterA上打開debugging,如下:<Route
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- T-ZHHX 004-2024 粉苞酸腳桿盆花生產(chǎn)技術規(guī)范
- 二零二五年度員工宿舍入住與退宿手續(xù)協(xié)議
- 2025年度水利工程監(jiān)理工程師合同管理與可持續(xù)發(fā)展
- 二零二五年度商鋪經(jīng)營權放棄及轉讓協(xié)議書
- 二零二五年度酒吧租賃合同書
- 2025年度潤滑油行業(yè)年度銷售排行榜合作合同
- 2025年度機關單位食堂餐飲培訓與咨詢服務合同
- 二零二五年度夫妻婚內(nèi)財產(chǎn)約定及家庭財務顧問服務協(xié)議
- 二零二五年度智慧城市項目實施團隊勞動合同
- 二零二五年度企業(yè)稅收籌劃與稅務籌劃培訓與實施合同
- 《智能家居系統(tǒng)》課件
- 基礎模塊下冊《中國人民站起來了》2
- 繼電保護業(yè)務技能實操題庫
- 個人理財(第三版)第01章導論
- 鉆機交接班記錄表
- 全國初中數(shù)學聯(lián)賽試題30套
- IATF16949質量體系基礎知識培訓
- 內(nèi)科學-高血壓病
- 廣州預拌混凝土行業(yè)發(fā)展專項規(guī)劃
- 【教案】 人民音樂家 教案高中人音版(2019)必修《音樂鑒賞》
- 河南省中等職業(yè)教育技能大賽組委會辦公室
評論
0/150
提交評論