1.OSPF的資料庫表
OSPF使用LSA進行更新;LSA(LSU)-鍊路狀态通告
資料庫表就是所有LSA的集合-LSDB-鍊路狀态資料庫
OSPF協定存在12種不同類别的LSA,每種LSA所攜帶的資訊是不一樣的;現階段隻存在6類LSA`
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsICM38FdsYkRGZkRG9lcvx2bjxiNx8VZ6l2cs0TPR1kenpmT5NmeNBDOsJGcohVYsR2MMBjVtJWd0ckW65UbM5WOHJWa5kHT20ESjBjUIF2X0hXZ0xCMx81dvRWYoNHLrdEZwZ1Rh5WNXp1bwNjW1ZUba9VZwlHdssmch1mclRXY39CXldWYtlWPzNXZj9mcw1ycz9WL49zZuBnL3ETN5EDNwEjMxITMwkTMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.png)
注:
O 通過本區域内的拓撲本地計算生成
O IA 其他區域的路由,通過ABR導入
O E1 非OSPF協定産生的路由,通過ASBR重釋出進入
O E2 OSPF協定不同程序産生的路由條目,通過ASBR重釋出進入
O N1 非OSPF協定産生的路由條目,通過ASBR重釋出進入,所在區域為NSSA區域
O N2 OSPF協定不同程序産生的路由條目,通過ASBR重釋出導入,所在區域為NSSA區域
2.OSPF的優化:減少LSA的更新
1.特殊區域-優化非骨幹區域
條件:不能為骨幹區域,不能存在虛鍊路
【1】不能存在ASBR
1.末梢區域-拒絕4、5類LSA;産生一條3類預設
配置:
r3(config)#router ospf 1
r3(config-router)#area 1 stub 該區域内所有裝置均需配置
2.完全末梢區域-在末梢區域的基礎上進一步拒絕3類的LSA,保留一條3類的預設,現将該區域配置為末梢區域,然後僅需要在ABR上定義為完全末梢即可
配置:
r3(config)#router ospf 1
r3(config-router)#area 1 stub no-summary
【2】存在ASBR
1.NSSA-拒絕4、5類的LSA,不自動生成3類預設;5類在NSSA區域内被轉換為7類轉發;離開該區域後還原為5類
配置:
r1(config)#router ospf 1
r1(config-router)#area 2 nssa
2.完全的NSSA-在NSSA的基礎上,進一步拒絕3、4、5類LSA,5類轉7類;自動生成預設指向ABR
配置:
r1(config)#router ospf 1
r1(config-router)#area 2 nssa no-summary
2.彙總-優化骨幹區域
1.域間路由彙總-在ABR上操作
配置:
r3(config)#router ospf 1
r3(config-router)#area 1 range 4.4.4.0 255.255.254.0
通過該區域的1、2類LSA計算所得路由才能進行彙總
2.域外路由彙總-在ASBR上操作
配置:
r5(config)#router ospf 1
r5(config-router)#summary-address 99.1.0.0 255.255.252.0
域外路由可以為5、7類
3.OSPF優化實驗
【1】網絡拓撲圖
注:R12和R14各存在兩個環回,其餘所有路由器存在1個換回
【2】.實驗要求
1.R3-R5部分為Internet,R4為ISP,其上隻能配置IP位址
2.R1-R3該段ip為192.168.1.0/24
3.R5-R14位址為172.16.0.0/16
4.合理規劃IP位址,盡量減少LSA更新量
5.R1-R3可以直接同 R5-R14通信
【3】.實驗規劃
1.R1-R2-R3内網劃分
R1-R2-R3之間使用192.168.1.0/24網段
R1環回位址使用1.1.1.0/24網段,R2位址使用2.2.2.0/24網段,R3位址使用3.3.3.0/24網段
R1-R2-R3起OSPF動态路由協定程序号為101
2.外網劃分
ISP包括R3-R4-R5部分
R4環回使用4.4.4.0/24網段,R3-R4之間使用34.1.1.0/24網段.
R4-R5之間使用45.1.1.0/24網段.
3.R5-R14區域劃分IP位址
R5-R14進行區域劃分
R5-R8為OSPF100 area0
R5環回位址使用172.16.4.0/22. R6環回位址使用172.16.8.0/22.
R7環回位址使用172.16.12.0/22. R8環回位址使y172.16.16.0/22
R8-R10為OSPF100 area1
R8-R9之間172.16.32.0/21 R9環回172.16.40.0/21
R9-R10之間172.16.48.0/21 R10環回172.16.56.0/21
R6-R11-R12為OSPF100 area2
R6-R11之間172.16.64.0/21 R11-R12之間172.16.72.0/21 R11環回172.16.80.0/21
R7-R13之間為OSPF100 area3
R7-R13之間172.16.96.0/20 R13環回172.16.112.0/20
R13-R14之間為OSPF103 area4
R13-R14之間172.16.128.0/21 R14環回0口172.16.136.0/21 R14環回1口172.16.144.0/21
R12為OSPF102 area5
R12環回0口172.16.160.0/20 R12環回1口172.16.176.0/20
4.多程序雙向重釋出
R13為ASBR,在R13上做多程序雙向重釋出(OSPF 100,103)
R12為ASBR,在R12上做多程序雙向重釋出(OSPF 100,102)
R3-R5上做Tunnel,跨營運商進行通信
5.OSPF的優化
OSPF100 area3定義為完全NSSA區域,OSPF100 area2定義為完全NSSA區域,OSPF100 area1定義為完全stub區域
R6,R7,R8上做區域彙總,R12上做域外路由彙總
【4】.實驗配置
R1
Router>enable
Router#configure terminal
Router(config)#hostname R1
R1(config)#no ip domain-lookup
R1(config)#line console 0
R1(config-line)#logging synchronous
R1(config-line)#exec-timeout 0 0
R1(config-line)#exit
**環回0口**
R1(config)#interface loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#exit
**R1-R2-R3**
R1(config)#interface e0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
**OSPF**
R1(config)#router ospf 101
R1(config-router)#router-id 1.1.1.1
R1(config-router)#exit
R1(config)#interface loopback 0
R1(config-if)#ip ospf 100 area 0
R1(config-if)#exit
R1(config)#interface e0/0
R1(config-if)#ip ospf 100 area 0
R1(config-if)#exit
R2
Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#no ip domain-lookup
R2(config)#line console 0
R2(config-line)#logging synchronous
R2(config-line)#exec-timeout 0 0
R2(config-line)#exit
**環回0口**
R2(config)#interface loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.0
R2(config-if)#exit
**R1-R2-R3**
R2(config)#interface e0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
**OSPF**
R2(config)#router ospf 101
R2(config-router)#router-id 2.2.2.2
R2(config-router)#exit
R2(config)#interface loopback 0
R2(config-if)#ip ospf 100 area 0
R2(config-if)#exit
R2(config)#interface e0/0
R2(config-if)#ip ospf 100 area 0
R2(config-if)#exit
R3
Router>enable
Router#configure terminal
Router(config)#hostname R3
R3(config)#no ip domain-lookup
R3(config)#line console 0
R3(config-line)#logging synchronous
R3(config-line)#exec-timeout 0 0
R3(config-line)#exit
**環回0口**
R3(config)#interface loopback 0
R3(config-if)#ip address 3.3.3.3 255.255.255.0
R3(config-if)#exit
**R1-R2-R3**
R3(config)#interface e0/0
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
**R3-R4**
R3(config)#interface s3/0
R3(config-if)#ip address 34.1.1.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
**OSPF**
R3(config)#router ospf 101
R3(config-router)#router-id 3.3.3.3
R3(config-router)#exit
R3(config)#interface loopback 0
R3(config-if)#ip ospf 100 area 0
R3(config-if)#exit
R3(config)#interface e0/0
R3(config-if)#ip ospf 100 area 0
R3(config-if)#exit
**R1-R2-R3通路外網**
R3(config)#interface s3/0
R3(config-if)#ip nat outside
R3(config-if)#exit
R3(config)#interface e0/0
R3(config-if)#ip nat inside
R3(config-if)#exit
R3(config)#ip route 0.0.0.0 0.0.0.0 s3/0
R3(config)#router ospf 101
R3(config-router)#default-information originate
R3(config-router)#exit
R3(config)#access-list 1 permit any
R3(config)#ip nat inside source list 1 interface s3/0
**Tunnel**
R3(config)#interface tunnel 0
R3(config-if)#ip address 192.168.2.1 255.255.255.0
R3(config-if)#tunnel source s3/0
R3(config-if)#tunnel destination 45.1.1.2
注:将Tunnel宣告進OSPF通過OSPF進行通信
R3(config-if)#ip ospf 101 area 0
R4
Router>enable
Router#configure terminal
Router(config)#hostname R4
R4(config)#no ip domain-lookup
R4(config)#line console 0
R4(config-line)#logging synchronous
R4(config-line)#exec-timeout 0 0
R4(config-line)#exit
**環回0口**
R4(config)#interface loopback 0
R4(config-if)#ip address 4.4.4.4 255.255.255.0
R4(config-if)#exit
**R4-R3**
R4(config)#interface s3/1
R4(config-if)#ip address 34.1.1.2 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
**R4-R5**
R4(config)#interface s3/0
R4(config-if)#ip address 45.1.1.1 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
R5
Router>enable
Router#configure terminal
Router(config)#hostname R5
R5(config)#no ip domain-lookup
R5(config)#line console 0
R5(config-line)#logging synchronous
R5(config-line)#exec-timeout 0 0
R5(config-line)#exit
**環回0口**
R5(config)#interface loopback 0
R5(config-if)#ip address 172.16.4.1 255.255.252.0
R5(config-if)#exit
**R5-R8**
R5(config)#interface e0/0
R5(config-if)#ip address 172.16.0.1 255.255.252.0
R5(config-if)#no shutdown
R5(config-if)#exit
**OSPF**
R5(config)#router ospf 100
R5(config-router)#router-id 5.5.5.5
R5(config-router)#exit
R5(config)#interface loopback 0
R5(config-if)#ip ospf 100 area 0
R5(config-if)#exit
R5(config)#interface e0/0
R5(config-if)#ip ospf 100 area 0
R5(config-if)#exit
**R5-R14通路外網**
R5(config)#interface s3/1
R5(config-if)#ip nat outside
R5(config-if)#exit
R5(config)#interface e0/0
R5(config-if)#ip nat inside
R5(config-if)#exit
R5(config)#ip route 0.0.0.0 0.0.0.0 s3/1
R5(config)#router ospf 100
R5(config-router)#default-information originate
R5(config-router)#exit
R5(config)#access-list 1 permit any
R5(config)#ip nat inside source list 1 interface s3/1
**Tunnel**
R5(config)#interface tunnel 0
R5(config-if)#ip address 192.168.2.2 255.255.255.0
R5(config-if)#tunnel source s3/1
R5(config-if)#tunnel destination 34.1.1.1
注:将Tunnel宣告進OSPF進行通信
R5(config-if)#ip ospf 100 area 0
R6
Router>enable
Router#configure terminal
Router(config)#hostname R6
R6(config)#no ip domain-lookup
R6(config)#line console 0
R6(config-line)#logging synchronous
R6(config-line)#exec-timeout 0 0
R6(config-line)#exit
**環回0口**
R6(config)#interface loopback 0
R6(config-if)#ip address 172.16.8.1 255.255.252.0
R6(config-if)#exit
**R5-R8**
R6(config)#interface e0/0
R6(config-if)#ip address 172.16.0.2 255.255.252.0
R6(config-if)#no shutdown
R6(config-if)#exit
**R6-R11**
R6(config)#interface s3/0
R6(config-if)#ip address 172.16.64.1 255.255.248.0
R6(config-if)#no shutdown
R6(config-if)#exit
**OSPF**
R6(config)#router ospf 100
R6(config-router)#router-id 6.6.6.6
R6(config-router)#exit
R6(config)#interface loopback 0
R6(config-if)#ip ospf 100 area 0
R6(config-if)#exit
R6(config)#interface e0/0
R6(config-if)#ip ospf 100 area 0
R6(config-if)#exit
注:
R6(config)#interface s3/0
R6(config-if)#ip ospf 100 area 2
R6(config-if)#exit
**OSPF的優化,定義area2區域為完全NSSA區域**
R6(config)#router ospf 100
R6(config-router)#area 2 nssa no-summary
R6(config-router)#exit
**OSPF的優化,OSPF100 area2區域彙總**
R6(config)#router ospf 100
R6(config-router)#area 2 range 172.16.64.0 255.255.224.0
R6(config-router)#exit
R7
Router>enable
Router#configure terminal
Router(config)#hostname R7
R7(config)#no ip domain-lookup
R7(config)#line console 0
R7(config-line)#logging synchronous
R7(config-line)#exec-timeout 0 0
R7(config-line)#exit
**環回0口**
R7(config)#interface loopback 0
R7(config-if)#ip address 172.16.12.1 255.255.252.0
R7(config-if)#exit
**R5-R8**
R7(config)#interface e0/0
R7(config-if)#ip address 172.16.0.3 255.255.252.0
R7(config-if)#no shutdown
R7(config-if)#exit
**R7-R13**
R7(config)#interface s3/0
R7(config-if)#ip address 172.16.96.1 255.255.240.0
R7(config-if)#no shutdown
R7(config-if)#exit
**OSPF**
R7(config)#router ospf 100
R7(config-router)#router-id 7.7.7.7
R7(config-router)#exit
R7(config)#interface loopback 0
R7(config-if)#ip ospf 100 area 0
R7(config-if)#exit
R7(config)#interface e0/0
R7(config-if)#ip ospf 100 area 0
R7(config-if)#exit
注:
R7(config)#interface s3/0
R7(config-if)#ip ospf 100 area 3
R7(config-if)#exit
**OSPF的優化,定義OSPF100 area3區域為完全NSSA區域**
R7(config)#router ospf 100
R7(config-router)#area 3 nssa no-summary
R7(config-router)#exit
**OSPF的優化,OSPF100 area3區域彙總**
R7(config)#router ospf 100
R7(config-router)#area 3 range 172.16.96.0 255.255.224.0
R7(config-router)#exit
R8
Router>enable
Router#configure terminal
Router(config)#hostname R8
R8(config)#no ip domain-lookup
R8(config)#line console 0
R8(config-line)#logging synchronous
R8(config-line)#exec-timeout 0 0
R8(config-line)#exit
**環回0**
R8(config)#interface loopback 0
R8(config-if)#ip address 172.16.16.1 255.255.252.0
R8(config-if)#exit
**R5-R8**
R8(config)#interface e0/0
R8(config-if)#ip address 172.16.0.4 255.255.252.0
R8(config-if)#no shutdown
R8(config-if)#exit
**R8-R9**
R8(config)#interface s3/0
R8(config-if)#ip address 172.16.32.1 255.255.248.0
R8(config-if)#no shutdown
R8(config-if)#exit
**OSPF**
R8(config)#router ospf 100
R8(config-router)#router-id 8.8.8.8
R8(config-router)#exit
R8(config)#interface loopback 0
R8(config-if)#ip ospf 100 area 0
R8(config-if)#exit
R8(config)#interface e0/0
R8(config-if)#ip ospf 100 area 0
R8(config-if)#exit
注:
R8(config)#interface s3/0
R8(config-if)#ip ospf 100 area 1
R8(config-if)#exit
**OSPF的優化,定義OSPF100 area1區域為完全STUB區域**
R8(config)#router ospf 100
R8(config-router)#area 1 stub no-summary
R8(config-router)#exit
**OSPF的優化,OSPF100 area1區域彙總**
R8(config)#router ospf 100
R8(config-router)#area 1 range 172.16.32.0 255.255.224.0
R8(config-router)#exit
R9
Router>enable
Router#configure terminal
Router(config)#hostname R9
R9(config)#no ip domain-lookup
R9(config)#line console 0
R9(config-line)#logging synchronous
R9(config-line)#exec-timeout 0 0
R9(config-line)#exit
**環回0口**
R9(config)#interface loopback 0
R9(config-if)#ip address 172.16.40.1 255.255.248.0
R9(config-if)#exit
**R9-R8**
R9(config)#interface s3/1
R9(config-if)#ip address 172.17.32.2 255.255.248.0
R9(config-if)#no shutdown
R9(config-if)#exit
**R9-R10**
R9(config)#interface s3/0
R9(config-if)#ip address 172.16.48.1 255.255.248.0
R9(config-if)#no shutdown
R9(config-if)#exit
**OSPF**
R9(config)#router ospf 100
R9(config-router)#router-id 9.9.9.9
R9(config-router)#exit
R9(config)#interface loopback 0
R9(config-if)#ip ospf 100 area 1
R9(config-if)#exit
R9(config)#interface s3/1
R9(config-if)#ip ospf 100 area 1
R9(config-if)#exit
R9(config)#interface s3/0
R9(config-if)#ip ospf 100 area 1
R9(config-if)#exit
**OSPF的優化,定義OSPF100 area1區域為STUB區域**
R9(config)#router ospf 100
R9(config-router)#area 1 stub
R9(config-router)#exit
R10
Router>enable
Router#configure terminal
Router(config)#hostname R10
R10(config)#no ip domain-lookup
R10(config)#line console 0
R10(config-line)#logging synchronous
R10(config-line)#exec-timeout 0 0
R10(config-line)#exit
**環回0口**
R10(config)#interface loopback 0
R10(config-if)#ip address 172.16.56.1 255.255.248.0
R10(config-if)#exit
**R10-R9**
R10(config)#interface s3/1
R10(config-if)#ip address 172.16.48.2 255.255.248.0
R10(config-if)#no shutdown
R10(config-if)#exit
**OSPF**
R10(config)#router ospf 100
R10(config-router)#router-id 10.10.10.10
R10(config-router)#exit
R10(config)#interface loopback 0
R10(config-if)#ip ospf 100 area 1
R10(config-if)#exit
R10(config)#interface s3/1
R10(config-if)#ip ospf 100 area 1
R10(config-if)#exit
**OSPF的優化,定義OSPF100 area1區域為STUB區域**
R10(config)#router ospf 100
R10(config-router)#area 1 stub
R10(config-router)#exit
R11
Router>enable
Router#configure terminal
Router(config)#hostname R11
R11(config)#no ip domain-lookup
R11(config)#line console 0
R11(config-line)#logging synchronous
R11(config-line)#exec-timeout 0 0
R11(config-line)#exit
**環回0口**
R11(config)#interface loopback 0
R11(config-if)#ip address 172.16.80.1 255.255.248.0
R11(config-if)#exit
**R11-R6**
R11(config)#interface s3/1
R11(config-if)#ip address 172.16.64.2 255.255.248.0
R11(config-if)#no shutdown
R11(config-if)#exit
**R11-R12**
R11(config)#interface s3/0
R11(config-if)#ip address 172.16.72.1 255.255.248.0
R11(config-if)#no shutdown
R11(config-if)#exit
**OSPF**
R11(config)#router ospf 100
R11(config-router)#router-id 11.11.11.11
R11(config-router)#exit
R11(config)#interface loopback 0
R11(config-if)#ip ospf 100 area 2
R11(config-if)#exit
R11(config)#interface s3/1
R11(config-if)#ip ospf 100 area 2
R11(config-if)#exit
R11(config)#interface s3/0
R11(config-if)#ip ospf 100 area 2
R11(config-if)#exit
**OSPF的優化,定義OSPF100 area2區域為NSSA區域**
R11(config)#router ospf 100
R11(config-router)#area 2 nssa
R11(config-router)#exit
R12
Router>enable
Router#configure terminal
Router(config)#hostname R12
R12(config)#no ip domain-lookup
R12(config)#line console 0
R12(config-line)#logging synchronous
R12(config-line)#exec-timeout 0 0
R12(config-line)#exit
**環回0口**
R12(config)#interface loopback 0
R12(config-if)#ip address 172.16.160.1 255.255.240.0
R12(config-if)#exit
**環回1口**
R12(config)#interface loopback 1
R12(config-if)#ip address 172.16.176.1 255.255.240.0
R12(config-if)#exit
**R11-R12**
R12(config)#interface s3/1
R12(config-if)#ip address 172.16.72.2 255.255.248.0
R12(config-if)#no shutdown
R12(config-if)#exit
**OSPF**
R12(config)#router ospf 100
R12(config-router)#router-id 12.12.12.12
R12(config-router)#exit
R12(config)#interface s3/1
R12(config-if)#ip ospf 100 area 2
R12(config-if)#exit
注:
R12(config)#router ospf 102
R12(config-router)#router-id 12.12.13.12
R12(config-router)#exit
R12(config)#interface loopback 0
R12(config-if)#ip ospf 102 area 5
R12(config-if)#exit
R12(config)#interface loopback 1
R12(config-if)#ip ospf 102 area 5
R12(config-if)#exit
**多程序雙向重釋出**
R12(config)#router ospf 100
R12(config-router)#redistribute ospf 102 subnets
R12(config-router)#exit
R12(config)#router ospf 102
R12(config-router)#redistribute ospf 100 subnets
R12(config-router)#exit
**OSPF的優化,定義OSPF100 area2區域為NSSA區域**
R12(config)#router ospf 100
R12(config-router)#area 2 nssa
R12(config-router)#exit
**OSPF的優化,域外路由彙總**
R12(config)#router ospf 100
R12(config-router)#summary-address 172.16.160.0 255.255.224.0
R12(config-router)#exit
R13
Router>enable
Router#configure terminal
Router(config)#hostname R13
R13(config)#no ip domain-lookup
R13(config)#line console 0
R13(config-line)#logging synchronous
R13(config-line)#exec-timeout 0 0
R13(config-line)#exit
**環回0口**
R13(config)#interface loopback 0
R13(config-if)#ip address 172.16.112.1 255.255.240.0
R13(config-if)#exit
**R13-R7**
R13(config)#interface s3/1
R13(config-if)#ip address 172.16.96.2 255.255.240.0
R13(config-if)#no shutdown
R13(config-if)#exit
**R13-R14**
R13(config)#interface s3/0
R13(config-if)#ip address 172.16.128.1 255.255.248.0
R13(config-if)#no shutdown
R13(config-if)#exit
**OSPF**
R13(config)#router ospf 100
R13(config-router)#router-id 13.13.13.13
R13(config-router)#exit
R13(config)#interface loopback 0
R13(config-if)#ip ospf 100 area 3
R13(config-if)#exit
R13(config)#interface s3/1
R13(config-if)#ip ospf 100 area 3
R13(config-if)#exit
注:
R13(config)#router ospf 103
R13(config-router)#router-id 13.13.13.14
R13(config-router)#exit
R13(config)#interface s3/0
R13(config-if)#ip ospf 103 area 4
R13(config-if)#exit
**多程序雙向重釋出**
R13(config)#router ospf 100
R13(config-router)#redistribute ospf 103 subnets
R13(config-router)#exit
R13(config)#router ospf 103
R13(config-router)#redistribute ospf 100 subnets
R13(config-router)#exit
**OSPF的優化,定義OSPF100 area3區域為NSSA區域**
R13(config)#router ospf 100
R13(config-router)#area 3 nssa
R13(config-router)#exit
R14
Router>enable
Router#configure terminal
Router(config)#hostname R14
R14(config)#no ip domain-lookup
R14(config)#line console 0
R14(config-line)#logging synchronous
R14(config-line)#exec-timeout 0 0
R14(config-line)#exit
**環回0口**
R14(config)#interface loopback 0
R14(config-if)#ip address 172.16.136.1 255.255.248.0
R14(config-if)#exit
**環回1口**
R14(config)#interface loopback 1
R14(config-if)#ip address 172.16.144.1 255.255.248.0
R14(config-if)#exit
**R14-R13**
R14(config)#interface s3/1
R14(config-if)#ip address 172.16.128.2 255.255.248.0
R14(config-if)#no shutdown
R14(config-if)#exit
**OSPF**
R14(config)#router ospf 103
R14(config-router)#router-id 14.14.14.14
R14(config-router)#exit
R14(config)#interface loopback 0
R14(config-if)#ip ospf 103 area 4
R14(config-if)#exit
R14(config)#interface loopback 1
R14(config-if)#ip ospf 103 area 4
R14(config-if)#exit
R14(config)#interface s3/1
R14(config-if)#ip ospf 103 area 4
R14(config-if)#exit
【5】.實驗測試
R1通路外網
R12通路外網
R14通路外網
R5的路由表,離開NSSA區域7類LSA轉為5類LSA(O N2-O E2)
R13路由表,完全NSSA區域拒絕3,4,5類LSA生成3類預設
R7路由表,5類在NSSA區域轉為7類LSA(O N2)
R12路由表,完全NSSA區域拒絕3,4,5類LSA生成3類預設
R6路由表,5類在NSSA區域轉為7類LSA(O N2)
R10路由表,完全STUB區域拒絕3,4,5類LSA産生一條3類預設
R8路由表
`