OSPF綜合實驗一

 OSPF綜合實驗一

實驗要求:

1.R1 爲ISP,其上只能配置IP地址。
2.R2-R7地址爲172.16.0.0/16,R3上不運行OSPF協議,僅進行IP配置。
3.R2/R4/R5間組建MGRE環境,R2 爲中心站點。
4.R2-R7 除了R3均可訪問R1環回。
5.R5-R7間R5爲DR和無BDR。
7.除R3外路由器均有一個PC。

實驗拓撲圖:

OSPF綜合實驗一拓撲圖

 Web IOU 模擬器拓撲書寫及IOS選擇:

NETMAP:

1:0/0 2:0/0
2:0/1 3:0/0
3:0/1 4:0/0
3:0/2 5:0/0
5:0/1 8:0/0
8:0/1 6:0/0
8:0/2 7:0/0

Web IOU 模擬器 OSPF綜合實驗一IOS 選擇

 

IP地址規劃: 

路由器 接口 IP地址
R1

E0/0

12.1.1.1/24
R2 E0/0 12.1.1.2/24
R2 E0/1 172.16.0.1/25
R2 tunnel0 172.16.1.129/25
R3 E0/0 172.16.0.2/25
R3

E0/1

172.16.0.129/25
R3 E0/2 172.16.1.1/25
R4 E0/0 172.16.0.130/25
R4 tunnel0 172.16.1.130/25
R5 E0/0 172.16.1.2/25
R5 E0/1 172.16.32.1/25
R5 tunnel0 172.16.1.131/25
R6 E0/0 172.16.32.2/25
R7 E0/0 172.16.32.3/25

環回地址

路由器 IP地址 R1 1.1.1.1/25 R2 172.16.2.1/25 R4 172.16.4.1/25 R5 172.16.5.1/25 R6 172.16.32.129/25 R7 172.16.33.1/25

注:掩碼/25位是255.255.255.128

配置:

       1.配置IP地址。

       2.R2上配置NAT。

       3.R2 R4  R5之間配置MGRE環境(R2 R4 R5 之間寫浮動靜態路由)。

       4.除R1 R3外起ospf路由協議。

 詳細配置:

 1.MGRE配置:

R2配置

interface tunnel 0
ip address  172.16.1.129 255.255.255.128  
tunnel source serial 1/2         //定義Tunnel的源
tunnel mode gre multipoint    //修改模式爲gre多點
ip nhrp map multicast  dynamic   //本地成爲NHRP的server;
ip nhrp network-id 100   //工作ID
ip ospf network point-to-multipoint   //工作模式改爲點到多點

R4和R5的配置

interface tunnel 0
ip address 172.16.1.130 255.255.255.128
 // R4的tunnel地址 172.16.1.130    R5的tunnel地址 172.16.1.131
tunnel source serial 1/2
tunnel mode gre multipoint
ip nhrp nhs 172.16.1.129  // 定義NHRP的server,此處必須爲tunnel口地址
ip nhrp map 172.16.1.129 172.16.0.1   //映射tunnel的公網地址
ip nhrp network-id 100
ip ospf network point-to-multipoint  //更改工作方式點到多點
p nhrp map multicast 172.16.1.129  //開啓僞廣播

 

  2.NAT配置  (R2 上進行配置)

interface e0/0 
ip nat outside 
exit
interface tunnel 0
ip nat inside 
exit
ip nat inside source list 1 interface e0/1 overload  
access-list 1 permit 192.168.0.0 0.0.255.255  //創建acl
exit
ip route 0.0.0.0 0.0.0.0 10.1.1.2  //靜態缺省
router ospf 1  //1是起的路由協議ospf的進程號
redistribute static subnets    //把缺省重發布到ospf中

 

 3.OSPF宣告

r2(config)#router ospf 1 

r2(config-router)#router-id 2.2.2.2  

r1(config-router)#network 172.16.1.1290.0.0.0 area 0

r1(config-router)#network 172.16.2.1 0.0.0.0 area 0

//注:其他ospf宣告同R2 ,R2 R4 R5 R6 R7 R8 進行ospf宣告。

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章