版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、實驗RIPv2 配置【實驗名稱】RIPv2 配置?!緦嶒?zāi)康摹坷斫?RIP 兩個版本之間的區(qū)別,掌握如何配置 RIPv2?!颈尘懊枋觥考僭O(shè)在校園網(wǎng)在地理上分為 2 個區(qū)域,每個區(qū)域內(nèi)分別有一臺路由器連接了 2 個子網(wǎng),需要將兩臺路由器通過以太網(wǎng)鏈路連接在一起并進(jìn)行適當(dāng)?shù)呐渲?,以實現(xiàn)這 4 個子網(wǎng)之間的互聯(lián)互通。為了在未來每個校園區(qū)域擴(kuò)充子網(wǎng)數(shù)量的時候,管理員不需要同時更改路由器的配置,計劃使用 RIP 路由協(xié)議實現(xiàn)子網(wǎng)之間的互通?!拘枨蠓治觥績膳_路由器通過快速以太網(wǎng)端口連接在一起,每個路由器上設(shè)置 2 個 Loopback 端口模擬子網(wǎng),在所有端口運(yùn)行 RIP 路由協(xié)議,實現(xiàn)所有子網(wǎng)間的互通。
2、【實驗拓?fù)洹繄D 72 實驗拓?fù)鋱D【實驗設(shè)備】路由器2 臺【預(yù)備知識】路由器的工作原理和基本配置方法,距離矢量路由協(xié)議,RIP 工作原理,RIPv1 和 RIPv2的區(qū)別,RIPv2 的配置方法【實驗原理】RIP 協(xié)議有兩個版本 RIPv1 和 RIPv2。RIPv1 屬于有類路由協(xié)議,不支持 VLSM(變長子網(wǎng)掩碼),RIPv1 是以廣播的形式進(jìn)行路由信息的更新的;更新周期為 30 秒。RIPv2 屬于無類路由協(xié)議,支持 VLSM(變長子網(wǎng)掩碼),RIPv2 是以組播的形式進(jìn)行路由信息的更新的,組播地址是 224.0.0.9。RIPv2 還支持基于端口的認(rèn)證,提高網(wǎng)絡(luò)的安全性?!緦嶒灢襟E】第一
3、步:配置兩臺路由器的主機(jī)名、接口 IP 地址RSR20#configure terminalEnter configuration commands, one per line. End with CNTL/Z.RSR20(config)#hostname RouterARouterA(config)#RouterA(config)#interface fastEthernet 0/0RouterA(config-if)#ip address 192.168.1.1 255.255.255.0RouterA(config-if)#no shutdownRouterA(config-if)#ex
4、itRouterA(config)#RouterA(config)#interface loopback 0RouterA(config-if)#Aug 15 23:46:32 RouterA %7:%LINE PROTOCOL CHANGE:Interface Loopback 0, changed state to UPRouterA(config-if)#ip address 172.16.1.1 255.255.255.0RouterA(config-if)#exitRouterA(config)#RouterA(config)#interface loopback 1RouterA(
5、config-if)#Aug 15 23:47:00 RouterA %7:%LINE PROTOCOL CHANGE:Interface Loopback 1, changed state to UPRouterA(config-if)#ip address 172.16.2.1 255.255.255.0RouterA(config-if)#exitRSR20#configure terminalEnter configuration commands, one per line. End with CNTL/Z.RSR20(config)#hostname RouterBRouterB(
6、config)#RouterB(config)#interface fastEthernet 0/0RouterB(config-if)#ip address 192.168.1.2 255.255.255.0RouterB(config-if)#no shutdownRouterB(config-if)#exitRouterB(config)#RouterB(config)#interface loopback 0RouterB(config-if)#Aug 8 21:00:00 RouterB %7:%LINE PROTOCOL CHANGE:Interface Loopback 0, c
7、hanged state to UPRouterB(config-if)#ip address 10.1.1.1 255.255.255.0RouterB(config-if)#exitRouterB(config)#RouterB(config)#interface loopback 1RouterB(config-if)#Aug 8 21:00:28 RouterB %7:%LINE PROTOCOL CHANGE:Interface Loopback 1, changed state to UPRouterB(config-if)#ip address 10.2.2.1 255.255.
8、255.0RouterB(config-if)#exit第二步:在兩臺路由器上啟用 RIPv2,但不關(guān)閉自動匯總RouterA(config)#router ripRouterA(config-router)#network 192.168.1.0RouterA(config-router)#network 172.16.1.0RouterA(config-router)#version 2!配置使用 RIPv2RouterA(config-router)#exitRouterB(config)#router ripRouterB(config-router)#network 192.168.
9、1.0RouterB(config-router)#network 10.0.0.0RouterB(config-router)#version 2RouterB(config-router)#exit第三步:查看路由表從路由表中可以看到,仍然只有 B 類主網(wǎng)絡(luò) 172.16.0.0/16 和 A 類主網(wǎng)絡(luò) 10.0.0.0/8 出現(xiàn)在路由表之中。雖然 RIPv2 支持 VLSM,但 RouterA 和 RouterB 都是邊界路由器,分別是 B 類主網(wǎng)絡(luò) 172.16.0.0/16 和 C 類主網(wǎng)絡(luò) 192.168.1.0/24 的邊界、A 類主網(wǎng)絡(luò) 10.0.0.0/8和 C 類主網(wǎng)絡(luò) 1
10、92.168.1.0/24 的邊界,因此在執(zhí)行自動的路由匯總。RouterA#show ip routeCodes: C - connected, S - static, R - RIP B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia -
11、 IS-IS inter area* - candidate defaultGateway of last resort is no setRCCCCCC10.0.0.0/8 120/1 via 192.168.1.2, 00:00:10, FastEthernet 0/0172.16.1.0/24 is directly connected, Loopback 0172.16.1.1/32 is local host.172.16.2.0/24 is directly connected, Loopback 1172.16.2.1/32 is local host.192.168.1.0/2
12、4 is directly connected, FastEthernet 0/0192.168.1.1/32 is local host.RouterB#show ip routeCodes: C - connected, S - static, R - RIP B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 -
13、IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate defaultGateway of last resort is no setC 10.1.1.0/24 is directly connected, Loopback 0C 10.1.1.1/32 is local host.C 10.2.2.0/24 is directly connected, Loopback 1C 10.2.2.1/32 is local host.RCC172.16.0.0/16 120/1 via 192.168.1.1, 0
14、0:00:02, FastEthernet 0/0192.168.1.0/24 is directly connected, FastEthernet 0/0192.168.1.2/32 is local host.第四步:關(guān)閉自動路由匯總RouterA(config)#router ripRouterA(config-router)#no auto-summary!關(guān)閉 RIPv2 的自動路由匯總功能RouterA(config-router)#endRouterB(config)#router ripRouterB(config-router)#no auto-summaryRouterB
15、(config-router)#end第五步:查看 RIP 配置信息,路由表RouterA#show ip routeCodes: C - connected, S - static, R - RIP B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-
16、2, ia - IS-IS inter area* - candidate defaultGateway of last resort is no setR 10.1.1.0/24 120/1 via 192.168.1.2, 00:00:03, FastEthernet 0/0R 10.2.2.0/24 120/1 via 192.168.1.2, 00:00:03, FastEthernet 0/0C 172.16.1.0/24 is directly connected, Loopback 0C 172.16.1.1/32 is local host.C 172.16.2.0/24 is
17、 directly connected, Loopback 1C 172.16.2.1/32 is local host.C 192.168.1.0/24 is directly connected, FastEthernet 0/0C 192.168.1.1/32 is local host.!可以看到 RIP 路由表中已經(jīng)學(xué)習(xí)到了子網(wǎng)的路由RouterA#show ip ripRouting Protocol is ripSending updates every 30 seconds, next due in 23 secondsInvalid after 180 seconds, fl
18、ushed after 120 secondsOutgoing update filter list for all interface is: not setIncoming update filter list for all interface is: not setDefault redistribution metric is 1Redistributing:Default version control: send version 2, receive version 2Interface Send Recv Key-chainFastEthernet 0/0 2 2Loopbac
19、k 0 2 2Loopback 1 2 2Routing for Networks:172.16.0.0192.168.1.0Distance: (default is 120)!在配置 RIPv2 版本后,RIP 路由器將只接收和發(fā)送版本 2 的更新報文RouterA#show ip rip database10.0.0.0/8 auto-summary10.1.1.0/241 via 192.168.1.2 FastEthernet 0/0 00:2810.2.2.0/241 via 192.168.1.2 FastEthernet 0/0 00:28172.16.0.0/16 auto-
20、summary172.16.1.0/241 directly connected, Loopback 0172.16.2.0/241 directly connected, Loopback 1192.168.1.0/24 auto-summary192.168.1.0/241 directly connected, FastEthernet 0/0!RIP 的數(shù)據(jù)庫中保存了子網(wǎng)條目的信息RouterA#show ip rip interfaceFastEthernet 0/0 is up, line protocol is upRouting Protocol: RIPReceive RIP
21、v2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:192.168.1.1/24FastEthernet 0/1 is down, line protocol is downRIP is not enabled on this interfaceNull 0 is
22、up, line protocol is upRIP is not enabled on this interfaceLoopback 0 is up, line protocol is upRouting Protocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not Configured
23、IP interface address:172.16.1.1/24Loopback 1 is up, line protocol is upRouting Protocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:172.
24、16.2.1/24RouterB#show ip routeCodes: C - connected, S - static, R - RIP B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - c
25、andidate defaultGateway of last resort is no setC 10.1.1.0/24 is directly connected, Loopback 0C 10.1.1.1/32 is local host.C 10.2.2.0/24 is directly connected, Loopback 1C 10.2.2.1/32 is local host.RRCC172.16.1.0/24 120/1 via 192.168.1.1, 00:00:22, FastEthernet 0/0172.16.2.0/24 120/1 via 192.168.1.1
26、, 00:00:22, FastEthernet 0/0192.168.1.0/24 is directly connected, FastEthernet 0/0192.168.1.2/32 is local host.RouterB#show ip ripRouting Protocol is ripSending updates every 30 seconds, next due in 22 secondsInvalid after 180 seconds, flushed after 120 secondsOutgoing update filter list for all int
27、erface is: not setIncoming update filter list for all interface is: not setDefault redistribution metric is 1Redistributing:Default version control: send version 2, receive version 2Interface Send Recv Key-chainFastEthernet 0/0Loopback 0Loopback 1222222Routing for Networks:10.0.0.0192.168.1.0Distanc
28、e: (default is 120)RouterB#RouterB#show ip rip datRouterB#show ip rip database10.0.0.0/8 auto-summary10.1.1.0/241 directly connected, Loopback 010.2.2.0/241 directly connected, Loopback 1172.16.0.0/16 auto-summary172.16.1.0/241 via 192.168.1.1 FastEthernet 0/0 00:02172.16.2.0/241 via 192.168.1.1 Fas
29、tEthernet 0/0 00:02192.168.1.0/24 auto-summary192.168.1.0/241 directly connected, FastEthernet 0/0RouterB#show ip rip interfaceFastEthernet 0/0 is up, line protocol is upRouting Protocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcas
30、t: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:192.168.1.2/24FastEthernet 0/1 is down, line protocol is downRIP is not enabled on this interfaceNull 0 is up, line protocol is upRIP is not enabled on this interfaceLoopback 0 is up, line protocol is upRo
31、uting Protocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:10.1.1.1/24Loopback 1 is up, line protocol is upRouting Protocol: RIPReceive
32、RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:10.2.2.1/24第六步:測試網(wǎng)絡(luò)連通性RouterA#ping 10.1.1.1Sending 5, 100-byte ICMP Echoes to 10.1.1.1, timeout is 2 sec
33、onds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 msRouterA#ping 10.2.2.1Sending 5, 100-byte ICMP Echoes to 10.2.2.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msRouterB#ping 172.16.1.1Sending 5, 100-byte ICMP Echoes to 172.16.1.1,
34、 timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msRouterB#ping 172.16.2.1Sending 5, 100-byte ICMP Echoes to 172.16.2.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms第七步:用 debug 命令觀察路由器接收和發(fā)生路由更新的情況下面是一個完整的 RIPv2 路由
35、器接收更新和發(fā)送更新的過程,從中可以看到 RouterB接收到了 RouterA 發(fā)送的更新,其中包含兩條路由信息 172.16.1.0 和 172.16.2.0(可以看到水平分割原則的作用),然后刷新了路由表。RouterB 本身發(fā)送的更新報文則在 Fa0/0、Lo0 和 Lo1 三個端口發(fā)出,使用組播方式,組播地址為 224.0.0.9,使用的是 UDP 520 端口。在水平分割的原則下,每個端口發(fā)送的路由信息均不相同。注意 RIPv2 的更新報文格式和 RIPv1 的不同。RouterB#debug ip ripRouterB#Aug 8 21:58:08 RouterB %7: RIP
36、 RIP recveived packet, sock=2125src=192.168.1.1 len=44Aug 8 21:58:08 RouterB %7: RIP Cancel peer remove timerAug 8 21:58:08 RouterB %7:RIP Peer remove timer shedule.Aug 8 21:58:08 RouterB %7: RIP Both do not need auth, Auth okAug 8 21:58:08 RouterB %7: route-entry: family 2 tag 0 ip 172.16.1.0mask 2
37、55.255.255.0 nhop 0.0.0.0 metric 1Aug 8 21:58:08 RouterB %7: route-entry: family 2 tag 0 ip 172.16.2.0mask 255.255.255.0 nhop 0.0.0.0 metric 1Aug 8 21:58:08 RouterB %7: RIP Received version 2 response packetAug 8 21:58:08 RouterB %7: RIProutesrc=192.168.1.1 intf=1Aug 8 21:58:08 RouterB %7: RIProutes
38、rc=192.168.1.1Old path is: nhop=192.168.1.1New path is: nhop=192.168.1.1Aug8 21:58:08 RouterB %7: RIP 172.16.1.0/24 RIP route refresh!Aug 8 21:58:08 RouterB %7: RIP 172.16.1.0/24 RIP distance apply from192.168.1.1!Aug 8 21:58:08 RouterB %7: RIP 172.16.1.0/24 ready to refresh kernel.Aug 8 21:58:08 Ro
39、uterB %7: RIP NSM refresh: IPv4 RIP Route 172.16.1.0/24distance=120 metric=1 nexthop_num=1 distance=120 nexhop=192.168.1.1 ifindex=1Aug 8 21:58:08 RouterB %7: RIP 172.16.1.0/24 cancel route timerAug 8 21:58:08 RouterB %7: RIP 172.16.1.0/24 route timer schedule.Aug 8 21:58:08 RouterB %7: RIProutesrc=
40、192.168.1.1 intf=1Aug 8 21:58:08 RouterB %7: RIPOld path is: nhop=192.168.1.1New path is: nhop=192.168.1.1routesrc=192.168.1.1Aug 8 21:58:08 RouterB %7: RIP 172.16.2.0/24 RIP route refresh!Aug 8 21:58:08 RouterB %7: RIP 172.16.2.0/24 RIP distance apply from192.168.1.1!Aug 8 21:58:08 RouterB %7: RIP
41、172.16.2.0/24 ready to refresh kernel.Aug 8 21:58:08 RouterB %7: RIP NSM refresh: IPv4 RIP Route 172.16.2.0/24distance=120 metric=1 nexthop_num=1 distance=120 nexhop=192.168.1.1 ifindex=1Aug 8 21:58:08 RouterB %7: RIP 172.16.2.0/24 cancel route timerAug 8 21:58:08 RouterB %7: RIP 172.16.2.0/24 route
42、 timer schedule.Aug 8 21:58:23 RouterB %7: RIP Output timer expired to send reponseAug 8 21:58:23 RouterB %7: RIP Prepare to send MULTICAST response.Aug 8 21:58:23 RouterB %7: RIP Building update entries on FastEthernet 0/0Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:10.1.1.0/24 via 0.0.0.0 m
43、etric 1 tag 010.2.2.0/24 via 0.0.0.0 metric 1 tag 0Aug 8 21:58:23 RouterB %7: RIP Send packet to 224.0.0.9 Port 520 onFastEthernet 0/0Aug 8 21:58:23 RouterB %7: RIP Prepare to send MULTICAST response.Aug 8 21:58:23 RouterB %7: RIP Building update entries on Loopback 0Aug 8 21:58:23 RouterB %7:Aug 8
44、21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:10.2.2.0/24 via 0.0.0.0 metric 1 tag 0172.16.1.0/24 via 0.0.0.0 metric 2 tag 0172.16.2.0/24 via 0.0.0.0 metric 2 tag 0192.168.1.0/24 via 0.0.0.0 metric 1 tag 0Aug 8 21:58:23 RouterB %7: RIP Send packet to 224.0.0.9 Port 520 onLo
45、opback 0Aug 8 21:58:23 RouterB %7: RIP Prepare to send MULTICAST response.Aug 8 21:58:23 RouterB %7: RIP Building update entries on Loopback 1Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:10.1.1.0/24 via 0.0.0.0 metric 1 tag 0172.16.1.0/24 via 0.0.0.
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026新疆博州聯(lián)通小營盤營業(yè)廳招聘考試參考題庫及答案解析
- 2026浙江寧波市余姚市農(nóng)業(yè)農(nóng)村局招聘下屬單位編外人員2人考試參考題庫及答案解析
- 2026年濟(jì)寧鄒城市教體系統(tǒng)急需緊缺人才招聘(70名)筆試備考試題及答案解析
- 2026年福建泉州仰恩大學(xué)招聘6名工作人員筆試模擬試題及答案解析
- 2026廣西國土規(guī)劃集團(tuán)團(tuán)隊帶頭人招聘5人考試參考題庫及答案解析
- 2026四川巴中市巴州區(qū)公益性崗位安置5人考試參考題庫及答案解析
- 2026年徽商銀行客服代表(勞務(wù)派遣制)招聘筆試模擬試題及答案解析
- 天府三中小學(xué)部2026年教師招聘備考題庫及參考答案詳解一套
- 2026年永豐縣國豐資產(chǎn)營運(yùn)有限公司面向社會公開招聘工作人員備考題庫及一套參考答案詳解
- 2026年河?xùn)|區(qū)婦幼保健計劃生育服務(wù)中心招聘派遣制工作人員備考題庫及一套答案詳解
- 骨科跟骨骨折課件
- 2026年美團(tuán)商業(yè)分析師崗位筆試解析與面試問答技巧
- 某高校十五五教育大數(shù)據(jù)治理中心與智慧校園支撐平臺建設(shè)方案
- 2026年山西警官職業(yè)學(xué)院單招綜合素質(zhì)考試備考試題帶答案解析
- (2026春新版)人教版二年級數(shù)學(xué)下冊全冊教學(xué)設(shè)計
- 汽修廠文件檔案歸檔制度
- 高校科研項目立項及管理規(guī)范
- 鈑噴質(zhì)檢員考試題及答案
- 學(xué)生安全教育家長會課件
- 2026年云南省高二物理學(xué)業(yè)水平合格考試卷試題(含答案詳解)
- 《事故隱患排查治理資金使用專項制度》
評論
0/150
提交評論