CCNP第四天 OSPF綜合實驗(1)

來源:互聯網
上載者:User

標籤:blog   http   os   strong   width   io   

ospf綜合實驗(1)

本實驗主要考察ospf中的介面上的多種工作方式

實驗:

所用拓撲為CCNP標準版,:


-------------------------------------------------------------------------------------------------------------------------------------


1. 全網可達

由於CCNP中框架轉送是預設全部開啟,而且是全連通的,所以在物理介面和多點子介面上建議關閉逆向arp功能,來手寫map,否則會有很多與實驗圖不符合的map

而對於點對點子介面,由於其只有兩端,且不考慮ip地址,所以不需要關閉逆向arp功能

R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.0

R1(config-if)#int s1/2
R1(config-if)#encapsulation frame-relay
R1(config-if)#no shutdown

R1(config)#int s1/2.1 multipoint
R1(config-subif)#no frame-relay inverse-arp
R1(config-subif)#no arp frame-relay
R1(config-subif)#ip add 145.1.1.1 255.255.255.0
R1(config-subif)#frame-relay map ip 145.1.1.4 104 broadcast
R1(config-subif)#frame-relay map ip 145.1.1.5 105 broadcast

R1(config)#int s1/2.2 point-to-point
R1(config-subif)#ip add 16.1.1.1 255.255.255.0
R1(config-subif)#frame-relay interface-dlci 106


R1(config)#int s1/2.3 point-to-point
R1(config-subif)#ip add 123.1.1.1 255.255.255.0
R1(config-subif)#frame-relay interface-dlci 102

----------------------------------------------------------------------------------------------------------------------------------------

R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config)#int s1/2
R2(config-if)#encapsulation frame-relay
R2(config-if)#no frame-relay inverse-arp
R2(config-if)#no arp frame-relay
R2(config-if)#ip add 123.1.1.2 255.255.255.0
R2(config-if)#frame-relay map ip 123.1.1.1 201 broadcast
R2(config-if)#frame-relay map ip 123.1.1.3 203 broadcast
R2(config-if)#no shutdown

-----------------------------------------------------------------------------------------------------------------------------------------

R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config)#int s1/2
R3(config-if)#encapsulation frame-relay
R3(config-if)#no frame-relay inverse-arp
R3(config-if)#no arp frame-relay
R3(config-if)#ip add 123.1.1.3 255.255.255.0
R3(config-if)#frame-relay map ip 123.1.1.2 302 broadcast

----------------------------------------------------------------------------------------------------------------------------------------

R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.0

R4(config)#int s1/2
R4(config-if)#encapsulation frame-relay
R4(config-if)#no shutdown

R4(config)#int s1/2.1 point-to-point
R4(config-subif)#ip add 145.1.1.4 255.255.255.0
R4(config-subif)#frame-relay interface-dlci 401

R4(config)#int s1/2.2 point-to-point
R4(config-subif)#ip add 45.1.1.4 255.255.255.0
R4(config-subif)#frame-relay interface-dlci 405

-----------------------------------------------------------------------------------------------------------------------------------------

R5(config)#int lo0
R5(config-if)#ip add 5.5.5.5 255.255.255.0

R5(config-if)#int s1/2
R5(config-if)#encapsulation frame-relay
R5(config-if)#no shutdown


R5(config)#int s1/2.1 point-to-point
R5(config-subif)#ip add 45.1.1.5 255.255.255.0
R5(config-subif)#frame-relay interface-dlci 504

R5(config)#int s1/2.2 multipoint
R5(config-subif)#no frame-relay inverse-arp
R5(config-subif)#no arp frame-relay
R5(config-subif)#ip add 145.1.1.5 255.255.255.0
R5(config-subif)#frame-relay map ip 145.1.1.1 501 broadcast

-------------------------------------------------------------------------------------------------------------------------------------------

R6(config)#int lo0
R6(config-if)#ip add 6.6.6.6 255.255.255.0

R6(config)#int s1/2
R6(config-if)#encapsulation frame-relay
R6(config-if)#no frame-relay inverse-arp
R6(config-if)#no arp frame-relay
R6(config-if)#ip add 16.1.1.6 255.255.255.0
R6(config-if)#frame-relay map ip 16.1.1.1 601 broadcast
R6(config-if)#no shutdown

R6(config)#int f0/0
R6(config-if)#ip add 10.1.1.6 255.255.255.0
R6(config-if)#no shutdown

-------------------------------------------------------------------------------------------------------------------------------------------

R7(config-if)#int lo0
R7(config-if)#ip add 7.7.7.7 255.255.255.0

R7(config)#int f0/0
R7(config-if)#ip add 10.1.1.7 255.255.255.0
R7(config-if)#no shutdown

----------------------------------------------------------------------------------------------------------------------------------------------

R8(config)#int lo0
R8(config-if)#ip add 8.8.8.8 255.255.255.0

R8(config)#int f0/0
R8(config-if)#ip add 10.1.1.8 255.255.255.0
R8(config-if)#no shutdown

到目前為止,基本底層全部配置完畢,應該進行連通測試。 接來下,啟ospf協議
==========================================================================================

R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 145.1.1.1 0.0.0.0 area 0
R1(config-router)#network 123.1.1.1 0.0.0.0 area 0
R1(config-router)#network 16.1.1.1 0.0.0.0 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0

R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 123.1.1.2 0.0.0.0 area 0
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0

R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 123.1.1.1 0.0.0.0 area 0
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0

R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 145.1.1.4 0.0.0.0 area 0
R4(config-router)#network 45.1.1.4 0.0.0.0 area 0
R4(config-router)#network 4.4.4.4 0.0.0.0 area 0

R5(config)#router ospf 1
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 45.1.1.5 0.0.0.0 area 0
R5(config-router)#network 145.1.1.5 0.0.0.0 area 0
R5(config-router)#network 5.5.5.5 0.0.0.0 area 0

R6(config)#router ospf 1
R6(config-router)#router-id 6.6.6.6
R6(config-router)#network 16.1.1.6 0.0.0.0 area 0
R6(config-router)#network 6.6.6.6 0.0.0.0 area 0
R6(config-router)#network 10.1.1.6 0.0.0.0 area 1

R7(config)#router ospf 1
R7(config-router)#router-id 7.7.7.7
R7(config-router)#network 7.7.7.7 0.0.0.0 area 1
R7(config-router)#network 10.1.1.7 0.0.0.0 area 1

R8(config)#router ospf 1
R8(config-router)#router-id 8.8.8.8
R8(config-router)#network 8.8.8.8 0.0.0.0 area 1
R8(config-router)#network 10.1.1.8 0.0.0.0 area 1

此時R1到R8的路由協議ospf都已經啟起來了,但是路由表中還是不齊全,這是因為ospf在不同的介面上的工作方式不同,所以無法建立鄰接關係,即無法互動路由條目 下面修改介面成對應的工作方式。
--------------------------------------------------------------------------------------------------------------------------------------

因為R1 R4 R5構成145.1.1.0/24網段的是MA網路,所以修改這三個介面的工作方式為點到多點型

R1(config)#int s1/2.1
R1(config-subif)#ip ospf network point-to-multipoint

R4(config)#int s1/2.1
R4(config-subif)#ip ospf network point-to-multipoint

R5(config)#int s1/2.2
R5(config-subif)#ip ospf network point-to-multipoint

 

R1 R6構成的16.1.1.0/24網段中,因為R1介面是點到點工作方式, R6為物理介面,工作方式為非廣播,故修改R6介面工作方式為點到點

R6(config)#int s1/2
R6(config-if)#ip ospf network point-to-point

 

R1 R2 R3構成的網路和145.1.1.0/24網段類似,修改三個介面工作方式為點到多點

R1(config)#int s1/2.3
R1(config-subif)#ip ospf network point-to-multipoint

R2(config)#int s1/2
R2(config-if)#ip ospf network point-to-multipoint

R3(config)#int s1/2
R3(config-if)#ip ospf network point-to-multipoint

 

剩下的 R4 R5 因為兩端子介面都是點到點子介面,工作方式都是點對點,所以不用修改。

 

此時,稍等ospf收斂完成, R1 - R6的路由條目應該也全部習得,此時全網可達
:

----------------------------------------------------------------------------------------------------------------------------------------

2. R6-R8之間R6為DR, 無BDR

R6為DR,無BDR,即修改R7和R8的選舉優先順序為0

R7(config)#int f0/0
R7(config-if)#ip ospf priority 0

R8(config)#int f0/0
R8(config-if)#ip ospf priority 0

修改後:

R6

R7

R8

 

-----------------------------------------------------------------------------------------------------------------------------------------

 

聲明:

  本文為 大Yi巴狼 對自己所學的知識整理和實現。

  本文檔歡迎自由轉載,但請務必保持本文檔完整或註明來之本文檔。本文檔未經 大Yi巴狼 同意,不得用於商業用途。最後,如果您能從這個簡單文檔裡獲得些許協助,大Yi巴狼 將對自己的一點努力感到非常高興;由於作者本人水平有限,如果本文檔中包含的錯誤給您造成了不便,在此提前說聲抱歉。

  祝身體健康,工作順利。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.