鐵之狂傲

 取回密碼
 註冊
搜尋

名望的英雄

KUSO四格畫家

切換到指定樓層
1#
置頂的軟體分享有操作方式供複習用

首先我們開啟Paket Tracer後建立以下的拓樸



路由器:倒數第二顆的"Generic"

接線:左邊的介面都是Serial DCE

詳細設定:

R1(config)# interface fastEthernet 0/0
R1(config-if)# ip address 172.16.1.254 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface fastEthernet 0/1
R1(config-if)# ip address 172.16.2.254 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface serial 2/0
R1(config-if)# ip address 192.168.2.1 255.255.255.0
R1(config-if)# clock rate 64000
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# router rip
R1(config-router)# network 172.16.0.0

RIPv1會自動總結相同Class的IP路徑
172.16.1.0和172.16.2.0兩條會總結172.16.0.0
所以我們在這直接設定172.16.0.0就好了...˙ˇ˙


R1(config-router)# network 192.168.2.0
R1(config-router)# passive-interface fastEthernet 0/0
R1(config-router)# passive-interface fastEthernet 1/0

解釋一下這行,這指令會將乙太介面改為被動介面

因為沒有Router在這介面上而是連接PC,故不必主動送出更新路由表訊息

R1(config-router)# ^Z (按下CTRL+Z就會顯示這行並回到底層特權模式)

R2的設定:

R2(config)# interface fastEthernet 0/0
R2(config-if)# ip address 192.168.1.254 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit
R2(config)# interface serial 2/0
R2(config-if)# ip address 192.168.2.2 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit
R2(config)# interface serial 3/0
R2(config-if)# ip address 10.10.1.1 255.255.255.0
R2(config-if)# clock rate 64000
R2(config-if)# no shutdown
R2(config-if)# exit
R2(config)# router rip
R2(config-router)# passive-interface fastEthernet 0/0
R2(config-router)# network 192.168.1.0
R2(config-router)# network 192.168.2.0
R2(config-router)# default-information originate

這行在邊界路由器有很大的作用
會將預設靜態繞送的設定送到LAN中所有的RIP路由器上
這樣LAN端才能完全連接

R2(config-router)#exit
R2(config)# ip route 0.0.0.0 0.0.0.0 serial 3/0

解釋R2為何不在10.10.1.0這段上設定RIP
因為右邊是WAN端ISP,邊界路由器必須對著ISP設定靜態預設繞送
而ISP也必須對所有RIP協定連接網段設定靜態路由

WAN-ISP的設定:

ISP(config)# interface serial 3/0
ISP(config-if)# ip address 10.10.1.2 255.255.255.0
ISP(config-if)# no shutdown
ISP(config-if)# exit
ISP(config)# ip route 172.16.0.0 255.255.0.0 serial 3/0
ISP(config)# ip route 192.168.1.0 255.255.255.0 serial 3/0
ISP(config)# ip route 192.168.2.0 255.255.255.0 serial 3/0


其實這三行可以用 ip route 0.0.0.0 0.0.0.0 serial 3/0 取代
因為採用這行代表的意思是告訴路由器 "只要東西(封包)不是我的就往外丟"


指令做到這,沒意外的話各主機都可以互相PING的通

接著我們來查看一下各路由器的路由表

回到底層輸入 show ip route

R1的路由表:

172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, FastEthernet0/0
C       172.16.2.0 is directly connected, FastEthernet1/0
R    192.168.1.0/24 [120/1] via 192.168.2.2, 00:00:00, Serial2/0
C    192.168.2.0/24 is directly connected, Serial2/0
R*   0.0.0.0/0 [120/1] via 192.168.2.2, 00:00:00, Serial2/0

R* 代表的是預設繞送那顆路由器(R2)傳來的資訊
R 就是從R2的Serial 2/0傳來的資訊
C 是直接連接的介面

R2的路由表:

C       10.10.1.0 is directly connected, Serial3/0
R    172.16.0.0/16 [120/1] via 192.168.2.1, 00:00:19, Serial2/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
C    192.168.2.0/24 is directly connected, Serial2/0
S*   0.0.0.0/0 is directly connected, Serial3/0

這邊有個S* 意思是"靜態的預設繞送",只要是有加上星號的通常都會是預設路由

S 代表的就是靜態路由

這裡的R 172.16.0.0/16 就是從左邊兩顆路由器得到192.168.1.1  192.168.2.1  172.16.0.0的資訊

ISP的路由表:

C       10.10.1.0 is directly connected, Serial3/0
S    172.16.0.0/16 is directly connected, Serial3/0
S    192.168.1.0/24 is directly connected, Serial3/0
S    192.168.2.0/24 is directly connected, Serial3/0
C    192.168.3.0/24 is directly connected, FastEthernet0/0

三條都是靜態路由

但是如果我設定的是 ip route 0.0.0.0 0.0.0.0 serial 3/0 這樣的預設繞送

路由表又會有什麼樣的差異呢?


     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.1.0 is directly connected, Serial3/0
C    192.168.3.0/24 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 is directly connected, Serial3/0

變的更簡單,反正不是我的東西就往外丟 /ˇ/

但是這樣的作法通常不會被採用

因為ISP端這樣設定的話會變成其他有連接的路由器都能送來資訊

除了管理上的不便之外還有頻寬佔用的問題,故我們依然採用設定三條靜態路由的作法


如果四台主機互相都能PING通,則實驗成功

檔案附件是這次的LAB原始檔

可以下載下來研究或者自己再做一次

-----


LAB結束

[ 本文最後由 墮夜 於 08-5-18 03:08 AM 編輯 ]

[ 本文章最後由 墮夜 於 08-5-30 23:57 編輯 ]

RIPv1.rar

4.08 KB, 下載次數: 766, 下載積分: 鐵幣 -5 元

 
轉播0 分享0 收藏0

回覆 使用道具 檢舉

全世界最先進的跳動筆

WAN-ISP那邊好像沒設到fa0/0的樣子
補一下XD
ISP(config)# interface fa0/0
ISP(config-if)# ip address 192.168.3.254 255.255.255.0
ISP(config-if)# no shutdown
 

回覆 使用道具 檢舉

好像不能下載喔~~
謝謝大大
 

回覆 使用道具 檢舉

你需要登入後才可以回覆 登入 | 註冊

存檔|手機版|聯絡我們|新聞提供|鐵之狂傲

GMT+8, 24-4-24 09:25 , Processed in 1.858250 second(s), 23 queries , Gzip On.

回頂部