RIP協議跨越主類網路邊界

2021-10-24 20:32:17 字數 2965 閱讀 9934

1:使用ripv1協議跨越主類網路邊界

step1:輸入必打命令

undo terminal monitor(關閉自動彈窗) 

system-view (進入系統檢視)

[huawei]sysname r1(命名路由器為r1)

[r1]user-inte***ce console 0

[r1-ui-console0]idle-timeout 0 0(設定永不超時)

[r1-ui-console0]quit

r2、r3、r4同理

step2:設定路由器的ip,如圖所示。並開始ping左右路由器。

r2、r3、r4同理

step3:設定協議為rip

[r1]rip

[r1-rip-1]network 10.0.0.0 (network後跟著主類ip位址)

[r1-rip-1]quit

r2、r3、r4同理

step4:觀察實驗現象

[r1]display ip routing-table 

destination/mask proto pre cost flags nexthop inte***ce

10.1.1.0/24 direct 0 0 d 10.1.1.1 gigabitethernet

0/0/0

10.1.1.1/32 direct 0 0 d 127.0.0.1 gigabitethernet

0/0/0

12.0.0.0/8 rip 100 2 d 10.1.1.2 gigabitethernet

0/0/0

127.0.0.0/8 direct 0 0 d 127.0.0.1 inloopback0

127.0.0.1/32 direct 0 0 d 127.0.0.1 inloopback0

172.16.0.0/16 rip 100 1 d 10.1.1.2 gigabitethernet

0/0/0

跨越主類網路邊界的路由器會自動把路由彙總成主類顯示,子網掩碼變為主類網路預設,如r1中的,12.0.0.0/8,如果沒有跨越則不會彙總。

2:使用ripv1協議不跨越主類網路邊界

step1:輸入必打命令

undo terminal monitor(關閉自動彈窗) 

system-view (進入系統檢視)

[huawei]sysname r1(命名路由器為r1)

[r1]user-inte***ce console 0

[r1-ui-console0]idle-timeout 0 0(設定永不超時)

[r1-ui-console0]quit

r2、r3、r4同理

step2:設定路由器的ip,如圖所示。並開始ping左右路由器。

r2、r3、r4同理

step3:設定協議為rip

[r1]rip

[r1-rip-1]network 10.0.0.0 (network後跟著主類ip位址)

[r1-rip-1]quit

r2、r3、r4同理

step4:觀察實驗現象

destination/mask proto pre cost flags nexthop inte***ce

10.1.1.0/24 direct 0 0 d 10.1.1.5 gigabitethernet

0/0/0

10.1.1.5/32 direct 0 0 d 127.0.0.1 gigabitethernet

0/0/0

10.1.2.0/24 rip 100 1 d 10.1.1.6 gigabitethernet

0/0/0

10.1.3.0/24 rip 100 2 d 10.1.1.6 gigabitethernet

0/0/0

127.0.0.0/8 direct 0 0 d 127.0.0.1 inloopback0

127.0.0.1/32 direct 0 0 d 127.0.0.1 inloopback0

不跨越主類網路邊界,則不會自動彙總,如10.1.3.0/24。

實驗3:設定為ripv2協議跨越主類網路邊界

步驟同1,增加變更rip協議的步驟。

step5:變更rip協議為ripv2

[r1]rip

[r1-rip-1]version 2(修改為版本2,預設為1)

[r1-rip-1]undo summary(關閉自動彙總)

step6:觀察現象

[r1]display ip routing-table

destination/mask proto pre cost flags nexthop inte***ce

10.1.1.0/24 direct 0 0 d 10.1.1.1 gigabitethernet

0/0/0

10.1.1.1/32 direct 0 0 d 127.0.0.1 gigabitethernet

0/0/0

12.1.1.0/24 rip 100 2 d 10.1.1.2 gigabitethernet

0/0/0

127.0.0.0/8 direct 0 0 d 127.0.0.1 inloopback0

127.0.0.1/32 direct 0 0 d 127.0.0.1 inloopback0

172.16.1.0/24 rip 100 1 d 10.1.1.2 gigabitethernet

0/0/0

可以看出ip位址未被自動彙總,是12.1.1.0/24

網路初級RIP協議之我見

在討論動態路由協議前,我們不妨先聊聊靜態路由的優缺點。靜態路由的缺點 1 配置量繁瑣 2 無法針對拓撲的變化而自動變化,無法實時更新 靜態路由的優點 1 不占用裝置和鏈路資源 2 安全問題 故建議在小型網路使用靜態,大型或複雜網路使用動態路由協議 在使用動態路由協議時,盡量的控制更新量,保障安全,規...

rip協議實現 網路實驗6

rip協議實現 實驗要求 實現rip協議更新路由資訊過程,版本 不限 根據給定資料檔案,輸出路由初始狀 態,更新路由資訊並輸出,直至收斂,輸出收斂狀態 示例 資料檔案內容 0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,上述資料為如下拓撲結構的鄰接...

網路層 內部閘道器協議RIP

rip是一種分布式的基於距離向量的路由選擇協議 rip協議的 距離 也稱為 跳數 因為每經過乙個路由器,跳數 就加1.rip協議的特點是 rip的距離向量演算法 這裡我打算引用書裡的講解 這樣做是為了便於進行本路由表的更新.假設從位於位址x的相鄰路由器傳送的rip報文的某乙個專案是 net2,3,y...