国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 網絡通信 > 正文

OSPF實驗過程詳解(OSPF在NBMA上實現法)

2019-11-04 12:03:56
字體:
來源:轉載
供稿:網友

實驗拓撲圖:(拓撲圖制作:鑫飄雪)
OSPF實驗過程詳解(OSPF在NBMA上實現法)
實驗環境說明:
1.將路由器R5的Fa0/0端口的ip設為:192.168.4.5/24;S1/1端口的ip設為:192.168.3.5/24
2.將路由器R1的S1/1端口的ip設為:192.168.3.1/24;S1/2端口的ip設為:192.168.2.1/24
3.將路由器R2的S1/2端口的ip設為:192.168.2.2/24;Fa0/0端口的ip設為:192.168.1.2/24
 
前言:我們都知道,OSPF的網絡類型有:廣播型(也稱多路訪問)、點到點、點到多點、非廣播多路訪問(NBMA),除了非廣播型多點訪問類型以外的其它類型都會自動選擇DR和BDR,這樣才會形成鄰居,它們之間才可以互相通信。而我們今天要演示的OSPF在NBMA中的實現,就是要克服這種非廣播型多路訪問中無法自動選出DR和BDR而無法發現鄰居。沒有鄰居的路由器之間是無法通信的。我們的解決思路主要有:1、手工為相應的端口指定鄰居;2、改變相應端口的網絡類型。下面請看我們的具體配置過程:
 
配置過程清單:
 
交換機SW1的配置:
分別將Fa1/11、Fa1/14端口設置為全雙工模式:
SW1(config)#int fa1/11
SW1(config-if)#speed 100
SW1(config-if)#duplex full
SW1(config-if)#no shut
SW1(config-if)#exit

SW1(config)#int fa1/14
SW1(config-if)#speed 100
SW1(config-if)#duplex full
SW1(config-if)#no shut
SW1(config-if)#exit
路由器R2的配置清單:
1、分別為路由器R2的S1/2、Fa0/0端口設置iP:
R2(config)#int s1/2
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no shut
 
R2(config)#int fa0/0
R2(config-if)#speed 100
R2(config-if)#duplex full
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
 
2、在路由器R2上配置OSPF:
R2(config)#router ospf 100
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network
R2(config-router)#network 192.168.2.2 0.0.0.0 a 0
R2(config-router)#network 192.168.1.2 0.0.0.0 a 0
R2(config-router)#exit
 
路由器R1的配置清單:
1、為路由器R1的S1/1端口設置ip并封裝楨中繼:
R1(config)#int s1/1
R1(config-if)#ip add 192.168.3.1 255.255.255.0
R1(config-if)#encapsulation frame-relay
R1(config-if)#frame-relay map ip 192.168.3.5 105 br
R1(config-if)#no frame-relay inverse-arp
R1(config-if)#no shut
 
2、為路由器R1的S1/2端口設置ip:
R1(config)#int s1/2
R1(config-if)#ip add 192.168.2.1 255.255.255.0
R1(config-if)#no shut
 
3、在路由器R1上配置OSPF:
R1(config)#router ospf 100
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.168.3.1 0.0.0.0 a 0
R1(config-router)#network 192.168.2.1 0.0.0.0 a 0
R1(config-router)#exit
 
路由器R5的配置清單:
1、為路由器R5的S1/1端口配置ip并封裝楨中繼:
R5(config)#int s1/1
R5(config-if)#ip add 192.168.3.5 255.255.255.0
R5(config-if)#encapsulation frame-relay
R5(config-if)#frame-relay map ip 192.168.3.1 501 br
R5(config-if)#no frame-relay inverse-arp
R5(config-if)#no shut
R5(config-if)#exit

 
2、為路由器R5的Fa0/0端口配置ip并設為全雙工模式:
R5(config)#int fa0/0
R5(config-if)#speed 100
R5(config-if)#duplex full
R5(config-if)#ip add 192.168.4.5 255.255.255.0
R5(config-if)#no shut
R5(config-if)#exit
 
3、在路由器R5上配置OSPF:
R5(config)#router ospf 100
R5(config-router)#router-id 5.5.5.5
R5(config-router)#network 192.168.4.5 0.0.0.0 a 0
R5(config-router)#network 192.168.3.5 0.0.0.0 a 0
R5(config-router)#exit
 
以上為正常的配置過程,假如我們來通過#show ip ospf nei命令來看看R1、R5的鄰居表,你會發現它們的鄰居表中根本沒有對方,也就是說,它們之間根本沒有發現鄰居,這時它們之間是無法互相通信。在前面我們已經說過,非廣播型多路訪問是不會自動選出DR和BDR的,需要我們手工來指定。這時我們就有了兩種思路:1改變R1 、R5之間的網絡類型,將它們改變為點對多點(point-to-mu);2、手工為它們指定鄰居。請看下面的配置,這就是要害所在:
A:改變網絡類型實現OSPF在楨中繼可以發現鄰居:
1、改變R1的S1/1的網絡類型為“點對多點”:
R1(config)#int s1/1
R1(config-if)#ip ospf network point-to-mu
R1(config-if)#no shut
 
2、改變R5的S1/1的網絡類型為“點對多點”:
R5(config)#int s1/1
R5(config-if)#ip ospf network point-to-mu
R5(config-if)#no shut
 
這時,我們使用#show ip ospf nei命令來查看R1的鄰居表:
R1#show ip ospf nei
Neighbor ID     PRi   State           Dead Time   Address         Interface
5.5.5.5           0   FULL/  -        00:01:47    192.168.3.5     Serial1/1
2.2.2.2           0   FULL/  -        00:00:33    192.168.2.2     Serial1/2
 
看到了吧,路由器R1的鄰居表里面已經有了R5和R2,這時,我們再用ping命令來驗證一下,我們用R1來pingR5:
R1#ping 192.168.4.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.5, timeout is 2 seconds:
!!!!!
SUCcess rate is 100 percent (5/5), round-trip min/avg/max = 44/73/112 ms
 
成功了!同樣的道理,R5我們就不再驗證了,您看明白了嗎?
 
B:手工為R1、R5指定鄰居:(//后面為注釋)
R1(config)#router ospf 100
R1(config)#nei 192.168.3.5  //指定R5是R1的鄰居,這里寫對方的ip
 
R5(config)#router ospf 100
R5(config)#nei 192.168.3.1  //指定R1是R5的鄰居,這里寫對方的ip


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 松滋市| 门源| 崇州市| 日喀则市| 廉江市| 金昌市| 康定县| 渑池县| 上虞市| 岗巴县| 高平市| 永昌县| 东辽县| 会昌县| 西峡县| 富顺县| 达州市| 习水县| 来安县| 清新县| 周口市| 通化县| 嘉祥县| 石棉县| 彰化县| 天水市| 洪湖市| 拉萨市| 门源| 大厂| 平定县| 荃湾区| 肇州县| 东阿县| 琼海市| 正阳县| 高雄县| 社会| 马鞍山市| 繁峙县| 延吉市|