OSPF


※ Router Role ※


  • Internal Router
  • Backbone Router
  • Area Border Router
  • Autonomous System Border Routers

※ Neighbour & Adjacency ※


Down沒發Hello
Init剛向對方發Hello
2-Way (Neighbor)DROTHER終點, 選DR/BDR
ExStart預備交換Link State
ExChange給對方LSA Menu(DBD)
Loading正在交換LSA
Full (Adjacency)同Area的Topo是一樣

※ LSA ※


LSA 1 (From/To: 同Area所有Router)自己的 (neighbor+Cost)
LSA 2 (From: DR, To: non-DR)DR的 (neighbor+Cost)
LSA 3 (From: ABR, To: 同Area所有Router)ABR的 (network+Cost)
LSA 4 (From: ABR, To: 同Area所有Router)ABR的 (ASBR+Cost)
LSA 5 (From: ASBR, To: OSPF所有Router)ASBR的 (network+Cost)

※ Route Table 表示 ※


O IA 192.168.12.0/24 [110/20]

IA: 誇Area
E2: Advertise Metric
E1: Advertise Metric + neighbor cost
110: AD
20: Metric

E2:
R1(config-router)# redistribute eigrp 100 metric-type 2 metric 99
E1:
R1(config-router)# redistribute eigrp 100 metric-type 1 metric 99


※ Stub Area ※


  • Stubby Area (All route next hops are the same, why not combine? External route -> 0.0.0.0 LSA3)
    • LSA4/5化成LSA3
    • O E2 192.168.67.0/24 [110/20] via 192.168.12.2
    • O*IA 192.168.0.0/0 [110/11] via 192.168.12.2
  • Totally Stubby Area (把all LSA3都化成0.0.0.0)
    • 把LSA4/5化成LSA3, 然後再把LSA3都化成0.0.0.0
    • O IA 192.168.12.0/24 [110/20] via 192.168.12.2
    • O*IA 0.0.0.0/0 [110/11] via 192.168.12.2
  • Not So Stubby Area (NSSA) (stub連接External Network時用, external route -> LSA 7 N route)
    • 把LSA4/5化成LSA7 (去External Network)
    • O E2 192.168.67.0/24 [110/20] via 192.168.56.6
    • O N2 192.168.67.0/24 [110/20] via 192.168.56.6
  • Totally Not So Stubby Area (LSA7連去External Network)(LSA3連去Internal Network) (把LSA3都化成0.0.0.0 and keep LSA 7 N route)
    • 把LSA4/5化成LSA7, LSA3都化成0.0.0.0
    • O IA 192.168.34.0/24 [110/20] via 192.168.56.6
    • O*IA 0.0.0.0/0 [110/11] via 192.168.45.4

R1(config-router)# area stub
R1(config-router)# area stub no-summary
R1(config-router)# area nssa
R1(config-router)# area nssa no-summary


※ Metric ※


Metric = Cost + Cost + Cost…
Cost = (Reference BW, 100Mbit) / Interface BW

R1(config-if)# ip ospf cost 50 (把cost變成50)
R1(config-if)# bandwidth 5000 (把bandwidth變成5Mbit)
R1(config-router)# auto-cost reference-bandwidth 1000 (把bandwidth變成1000Mbit)


Route選舉


O > O IA > E1/N1 > E2/N2


※ Load Balancing ※


相同Metric
maximum-paths <no of path>, max.16


※ Virtual Link ※


把其他Area與Area 0連起來, 或把兩個Area 0相連
area virtual-link 3.3.3.3


※ Summarisation ※


ABR
Area Range (同時產生Null Route)

R1(config-router)# area 0 range 172.16.0.0 255.255.254.0
R1(config-router)# no discard-route internal //去除Null Route

ASBR
Summary Address (同時產生Null0 Route)

R1(config-router)# summary-address 172.16.2.0 255.255.254.0
R1(config-router)# no discard-route external //去除Null Route


※ 優化 ※


Pacing Timer
問題:
OSPF每1800秒就重新發佈Link State
解決:
每次重新發佈一條Link State很浪費CPU, 相約buffer 240秒後一起發佈
timers pacing lsa-group 240
問題:
Link State放到interface的LSA Flood List一個一個發出
解決:
每33msecs發一次Update Packet一次過update
timers pacing flood 33
問題:
發出LSA後, 對方回傳ACK表示收到LSA, 如沒回傳就retransmission
解決:
Retansmission time 更改
timers pacing retransmission 100

SPF Throttle Timer
問題:
SPF有時會突然收到大量的Link State 改變, 浪費CPU
解決: 等待hold time一次過處理, Initial (處理第一波Link State Event)|Increment(處理之後波Link State Event)|max wait
timers throttle spf 10000 20000 100000, msecs, 初始hold時間, 下次event來時加holding time, 最多hold時間

LSA Throttle Timer
問題:
Router 因Local Link改變而產生LSA, 浪費CPU
解決: 等待hold time一次過處理, Initial (處理第一波Link State Event)|Increment(處理之後波Link State Event)|max wait
timers throttle lsa 20000 30000 50000, msecs, 初始hold時間, 下次event來時加holding time, 最多hold時間

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Open chat
💬How Can We Help?
Hello 👋How can we help you?