




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、實(shí)驗(yàn)RIPv2 配置【實(shí)驗(yàn)名稱(chēng)】RIPv2 配置?!緦?shí)驗(yàn)?zāi)康摹坷斫?RIP 兩個(gè)版本之間的區(qū)別,掌握如何配置 RIPv2?!颈尘懊枋觥考僭O(shè)在校園網(wǎng)在地理上分為 2 個(gè)區(qū)域,每個(gè)區(qū)域內(nèi)分別有一臺(tái)路由器連接了 2 個(gè)子網(wǎng),需要將兩臺(tái)路由器通過(guò)以太網(wǎng)鏈路連接在一起并進(jìn)行適當(dāng)?shù)呐渲茫詫?shí)現(xiàn)這 4 個(gè)子網(wǎng)之間的互聯(lián)互通。為了在未來(lái)每個(gè)校園區(qū)域擴(kuò)充子網(wǎng)數(shù)量的時(shí)候,管理員不需要同時(shí)更改路由器的配置,計(jì)劃使用 RIP 路由協(xié)議實(shí)現(xiàn)子網(wǎng)之間的互通?!拘枨蠓治觥?jī)膳_(tái)路由器通過(guò)快速以太網(wǎng)端口連接在一起,每個(gè)路由器上設(shè)置 2 個(gè) Loopback 端口模擬子網(wǎng),在所有端口運(yùn)行 RIP 路由協(xié)議,實(shí)現(xiàn)所有子網(wǎng)間的互通。
2、【實(shí)驗(yàn)拓?fù)洹繄D 72 實(shí)驗(yàn)拓?fù)鋱D【實(shí)驗(yàn)設(shè)備】路由器2 臺(tái)【預(yù)備知識(shí)】路由器的工作原理和基本配置方法,距離矢量路由協(xié)議,RIP 工作原理,RIPv1 和 RIPv2的區(qū)別,RIPv2 的配置方法【實(shí)驗(yàn)原理】RIP 協(xié)議有兩個(gè)版本 RIPv1 和 RIPv2。RIPv1 屬于有類(lèi)路由協(xié)議,不支持 VLSM(變長(zhǎng)子網(wǎng)掩碼),RIPv1 是以廣播的形式進(jìn)行路由信息的更新的;更新周期為 30 秒。RIPv2 屬于無(wú)類(lèi)路由協(xié)議,支持 VLSM(變長(zhǎng)子網(wǎng)掩碼),RIPv2 是以組播的形式進(jìn)行路由信息的更新的,組播地址是 224.0.0.9。RIPv2 還支持基于端口的認(rèn)證,提高網(wǎng)絡(luò)的安全性。【實(shí)驗(yàn)步驟】第一
3、步:配置兩臺(tái)路由器的主機(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第二步:在兩臺(tái)路由器上啟用 RIPv2,但不關(guān)閉自動(dòng)匯總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 類(lèi)主網(wǎng)絡(luò) 172.16.0.0/16 和 A 類(lèi)主網(wǎng)絡(luò) 10.0.0.0/8 出現(xiàn)在路由表之中。雖然 RIPv2 支持 VLSM,但 RouterA 和 RouterB 都是邊界路由器,分別是 B 類(lèi)主網(wǎng)絡(luò) 172.16.0.0/16 和 C 類(lèi)主網(wǎng)絡(luò) 192.168.1.0/24 的邊界、A 類(lèi)主網(wǎng)絡(luò) 10.0.0.0/8和 C 類(lèi)主網(wǎng)絡(luò) 1
10、92.168.1.0/24 的邊界,因此在執(zhí)行自動(dòng)的路由匯總。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)閉自動(dòng)路由匯總RouterA(config)#router ripRouterA(config-router)#no auto-summary!關(guān)閉 RIPv2 的自動(dòng)路由匯總功能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 的更新報(bào)文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ù)庫(kù)中保存了子網(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第六步:測(cè)試網(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ā)生路由更新的情況下面是一個(gè)完整的 RIPv2 路由
35、器接收更新和發(fā)送更新的過(guò)程,從中可以看到 RouterB接收到了 RouterA 發(fā)送的更新,其中包含兩條路由信息 172.16.1.0 和 172.16.2.0(可以看到水平分割原則的作用),然后刷新了路由表。RouterB 本身發(fā)送的更新報(bào)文則在 Fa0/0、Lo0 和 Lo1 三個(gè)端口發(fā)出,使用組播方式,組播地址為 224.0.0.9,使用的是 UDP 520 端口。在水平分割的原則下,每個(gè)端口發(fā)送的路由信息均不相同。注意 RIPv2 的更新報(bào)文格式和 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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 勞動(dòng)合同范本002
- 中標(biāo)人支付合同范本
- 割草合同范例
- 印章保管合同范本律師
- 發(fā)電機(jī)保養(yǎng)合同范本
- 合資做房子合同范例
- 到期不住合同范本
- 醫(yī)院工程材料采購(gòu)合同范本
- 廠房阻力合同范本
- 人贅婿合同范本
- 特殊工種操作人員體檢表
- 常用橋牌詞語(yǔ)(中英文對(duì)照)
- 加盟招商方案PPT模板
- 中石油HSE培訓(xùn)試題集(共33頁(yè))
- 雙碳視角看歐盟綠色新政政策篇
- 備電綜合解決方案服務(wù)合同
- 噴(烤)漆房VOCs治理設(shè)施日常運(yùn)行臺(tái)賬
- 往復(fù)式壓縮機(jī)組單機(jī)試運(yùn)方案
- 區(qū)域環(huán)境概況
- 爆破片面積計(jì)算
- 設(shè)備安裝檢驗(yàn)批表格
評(píng)論
0/150
提交評(píng)論