[上課筆記] RIP動態路由協定

**本練習題不做.pka檔,因需自行判斷網路是否完成設定

1. 請依圖示完成Router與PC之IP設定(本練習Switch暫時不設管控IP)
2. 請於三顆Router啟動RIPv1,觀察是否能正常運作?若不行,請問解決方案為何?請執行之。

3. 請判斷三顆Router是否都有些介面無須傳遞RIP更新?請使用passive-interface的方式將其RIP update關閉。

4.請判斷環境中是否需要設定預設路由?若需要,請設定之?

5.請測試每一台PC皆可ping到200.200.200.1這一台web server。


看到這題目,先把最簡單的幹掉吧!把兩台PC的IP先設定好後,我們再來談討題目

這題的指令碼似乎很長,但實際上與前面所曾做過的LAB差不多,只是多一個RIP協定,只要前幾次的作業很熟,這一次的也不難到哪哩,多參入幾行數據而已,話不多說,直接設定三顆Router吧,一樣透過指令碼與註解的搭配,迅速了解要做什麼~


-----------------------R 1------------------------
  • R1>en
  • R1#config t
  • R1(config)#int s0/2/0 //從這裡開始設定各介面的IP位置
  • R1(config-if)#ip address 100.100.100.2 255.255.255.0
  • R1(config-if)#no shutdown
  • R1(config-if)#exit
  • R1(config)#int s0/0/0
  • R1(config-if)#ip address 192.168.1.1 255.255.255.252
  • R1(config-if)#no shutdown
  • R1(config-if)#clock rate 64000 //你可以透過指令#sh con s0/0/0就知道這裡是DCE還是PTE
  • R1(config-if)#exit
  • R1(config)#int s0/0/1
  • R1(config-if)#ip address 192.168.1.5 255.255.255.252
  • R1(config-if)#no shutdown
  • R1(config-if)#clock rate 64000 //要注意哪種線路需要設定clock,通常DCE的地方都是
  • R1(config-if)#exit //這裡以上都是設定介面IP
  • R1(config)#ip route 0.0.0.0 0.0.0.0 s0/2/0 //別忘了對外的Router需要手動設定對外的靜態預設路由
  • R1(config)#router rip //開始設定動態協定RIP
  • R1(config-router)#version 2 //這裡我們使用RIP是為了要支援CIDR與更新Default Route
  • R1(config-router)#network 192.168.1.0 //輸入鄰接的網域,採用Class級別
  • R1(config-router)#no auto-summary //當你發現網域非唯一使用,在其他末端也有相同網域,就取消他的合併功能,因為會認為是送到同一個末端,進一步採取風險處理方式兩邊都各傳一半,造成實際上失誤率50%
  • R1(config-router)#passive-interface s0/2/0 //開啟RIP會將自己的路由表丟給附近的設備,但部分設備根本看不懂該資訊,如Switch與不理你的ISP業者,故為了保護機密要把這些介面給關掉,亦可解省封包阻塞。
  • R1(config-router)#redistribute static //rip是動態而Default Route是靜態,開啟可以動靜態一起分享
  • R1(config-router)#end
  • R1#sh ip protocols //檢查一下rip是否成功開啟,失敗則無反應
  • Routing Protocol is "rip"
  • Sending updates every 30 seconds, next due in 6 seconds
  • Invalid after 0 seconds, hold down 0, flushed after 0
  • Outgoing update filter list for all interfaces is not set
  • Incoming update filter list for all interfaces is not set
  • Redistributing: rip, static
  • Default version control: send version 2, receive 2
  • Interface Send Recv Triggered RIP Key-chain
  • Serial0/0/0 2 2
  • Serial0/0/1 2 2
  • Automatic network summarization is not in effect
  • Maximum path: 4
  • Routing for Networks:
  • 192.168.1.0
  • Passive Interface(s):
  • Serial0/2/0
  • Routing Information Sources:
  • Gateway Distance Last Update
  • 0.0.0.0 120 02:16:46
  • Distance: (default is 120)
  • R1#sh ip route //檢查一下路由表是否成功有新資訊進來
  • Codes: C - connected, S - static, I - IGRP, 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, E - EGP
  • i - IS-IS, 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
  • Gateway of last resort is 0.0.0.0 to network 0.0.0.0
  • 100.0.0.0/24 is subnetted, 1 subnets
  • C 100.100.100.0 is directly connected, Serial0/2/0
  • 192.168.1.0/30 is subnetted, 2 subnets
  • C 192.168.1.0 is directly connected, Serial0/0/0
  • C 192.168.1.4 is directly connected, Serial0/0/1
  • S* 0.0.0.0/0 is directly connected, Serial0/2/0
  • R1#copy run start //別忘了存檔唷
  • Destination filename [startup-config]?
  • Building configuration...
  • [OK]
-----------------------R 2------------------------
  • R2>en
  • R2#config t
  • R2(config)#int s0/0/0
  • R2(config-if)#ip address 192.168.1.2 255.255.255.252
  • R2(config-if)#no shutdown
  • R2(config-if)# exit
  • R2(config)#int s0/0/1
  • R2(config-if)#ip address 192.168.1.9 255.255.255.252
  • R2(config-if)#no shutdown
  • R2(config-if)#clock rate 64000
  • R2(config-if)#exit
  • R2(config)#int fa0/0
  • R2(config-if)#ip address 10.1.1.254 255.255.255.0
  • R2(config-if)#no shutdown
  • R2(config-if)#exit
  • R2(config)#router rip
  • R2(config-router)#version 2
  • R2(config-router)#network 10.0.0.0
  • R2(config-router)#network 192.168.1.0
  • R2(config-router)#no auto-summary
  • R2(config-router)#passive-interface fa0/0
  • R2(config-router)#end
  • R2#sh ip protocols
  • Routing Protocol is "rip"
  • Sending updates every 30 seconds, next due in 6 seconds
  • Invalid after 180 seconds, hold down 180, flushed after 240
  • Outgoing update filter list for all interfaces is not set
  • Incoming update filter list for all interfaces is not set
  • Redistributing: rip
  • Default version control: send version 2, receive 2
  • Interface Send Recv Triggered RIP Key-chain
  • Serial0/0/0 2 2
  • Serial0/0/1 2 2
  • Automatic network summarization is not in effect
  • Maximum path: 4
  • Routing for Networks:
  • 10.0.0.0
  • 192.168.1.0
  • Passive Interface(s):
  • FastEthernet0/0
  • Routing Information Sources:
  • Gateway Distance Last Update
  • 192.168.1.1 120 00:00:03
  • Distance: (default is 120)
  • R2#copy run start
  • Destination filename [startup-config]?
  • Building configuration...
  • [OK]
-----------------------R 3------------------------
  • R3>en
  • R3#config t
  • R3(config)#int s0/0/0
  • R3(config-if)#ip address 192.168.1.6 255.255.255.252
  • R3(config-if)#no shutdown
  • R3(config-if)#exit
  • R3(config)#int s0/0/1
  • R3(config-if)#ip address 192.168.1.10 255.255.255.252
  • R3(config-if)#no shutdown
  • R3(config-if)#exit
  • R3(config-if)#int fa0/0
  • R3(config-if)#ip address 10.2.2.254 255.255.255.0
  • R3(config-if)#no shutdown
  • R3(config-if)#exit
  • R3(config)#router rip
  • R3(config-router)#ver 2
  • R3(config-router)#network 10.0.0.0
  • R3(config-router)#network 192.168.1.0
  • R3(config-router)#no auto-summary
  • R3(config-router)#passive-interface fa0/0
  • R3(config-router)#end
  • R3#sh ip protocols
  • Routing Protocol is "rip"
  • Sending updates every 30 seconds, next due in 24 seconds
  • Invalid after 180 seconds, hold down 180, flushed after 240
  • Outgoing update filter list for all interfaces is not set
  • Incoming update filter list for all interfaces is not set
  • Redistributing: rip
  • Default version control: send version 2, receive 2
  • Interface Send Recv Triggered RIP Key-chain
  • Serial0/0/0 2 2
  • Serial0/0/1 2 2
  • Automatic network summarization is not in effect
  • Maximum path: 4
  • Routing for Networks:
  • 10.0.0.0
  • 192.168.1.0
  • Passive Interface(s):
  • FastEthernet0/0
  • Routing Information Sources:
  • Gateway Distance Last Update
  • 192.168.1.5 120 00:00:04
  • 192.168.1.9 120 00:00:02
  • Distance: (default is 120)
  • R3#copy run start
  • Destination filename [startup-config]?
  • Building configuration...
  • [OK]
------------------------------------------------------------
完成之後,隨便找一台PC對ISP下Ping指令看看吧

留言