Home » OSPF Design: Area Types, Stub, NSSA และ Route Summarization
OSPF Design: Area Types, Stub, NSSA และ Route Summarization
OSPF Design: Area Types, Stub, NSSA และ Route Summarization
OSPF (Open Shortest Path First) เป็น link-state routing protocol ที่นิยมใช้มากที่สุดใน enterprise networks การออกแบบ OSPF areas อย่างเหมาะสมเป็นกุญแจสำคัญในการ scale OSPF ให้รองรับ network ขนาดใหญ่ได้อย่างมีประสิทธิภาพ ลด routing table size, ลด LSA flooding และเร่ง convergence
หลายองค์กร ใช้ OSPF single area (Area 0) สำหรับทุกอย่าง ซึ่งทำงานได้ดีใน network ขนาดเล็ก แต่เมื่อ network โตขึ้น routing table ใหญ่ขึ้น SPF calculation ช้าลง และ LSA flooding กิน bandwidth มากขึ้น การแบ่ง areas อย่างเหมาะสมช่วยแก้ปัญหาเหล่านี้
OSPF Area Types
| Area Type |
LSA Types ที่อนุญาต |
External Routes |
Default Route |
| Normal Area |
1, 2, 3, 4, 5 |
มี (LSA Type 5) |
ไม่จำเป็น |
| Stub Area |
1, 2, 3 |
ไม่มี (block Type 4, 5) |
ABR inject default route (Type 3) |
| Totally Stubby |
1, 2 |
ไม่มี (block Type 3, 4, 5) |
ABR inject default route (Type 3) |
| NSSA |
1, 2, 3, 7 |
มี (LSA Type 7 → แปลงเป็น 5 ที่ ABR) |
ไม่จำเป็น (configurable) |
| Totally NSSA |
1, 2, 7 |
มี (Type 7 local) |
ABR inject default route |
| Backbone (Area 0) |
1, 2, 3, 4, 5 |
มี |
ไม่จำเป็น |
LSA Types
| LSA Type |
ชื่อ |
สร้างโดย |
Scope |
| Type 1 |
Router LSA |
ทุก router |
Within area |
| Type 2 |
Network LSA |
DR (Designated Router) |
Within area |
| Type 3 |
Summary LSA |
ABR (Area Border Router) |
Between areas |
| Type 4 |
ASBR Summary LSA |
ABR |
Between areas (ชี้ไป ASBR) |
| Type 5 |
External LSA |
ASBR |
Entire OSPF domain |
| Type 7 |
NSSA External LSA |
ASBR ใน NSSA |
Within NSSA (แปลงเป็น Type 5 ที่ ABR) |
เมื่อไหร่ใช้ Stub vs NSSA
| สถานการณ์ |
ใช้ Area Type |
เหตุผล |
| Branch office ไม่มี redistribution |
Stub |
ลด routing table ไม่ต้องรู้ external routes |
| Branch office ต้องการ routing table เล็กที่สุด |
Totally Stubby |
Block ทั้ง inter-area + external ใช้ default route |
| Area มี ASBR (redistribute จาก protocol อื่น) |
NSSA |
Stub ไม่ได้เพราะมี ASBR → ใช้ NSSA + Type 7 |
| Area มี ASBR + ต้องการ routing table เล็ก |
Totally NSSA |
Block inter-area summaries + มี local redistribution |
Route Summarization
| Summarization Type |
ทำที่ |
Command |
| Inter-area Summarization |
ABR (ระหว่าง areas) |
area X range A.B.C.D/mask |
| External Summarization |
ASBR (redistribute routes) |
summary-address A.B.C.D/mask |
ประโยชน์ของ Summarization
| ประโยชน์ |
รายละเอียด |
| ลด Routing Table Size |
หลาย prefixes → 1 summary route |
| ลด LSA Flooding |
น้อย LSAs = น้อย bandwidth + CPU |
| เร็ว SPF Calculation |
LSDB เล็กลง = SPF คำนวณเร็วขึ้น |
| Stability |
Flapping subnet ไม่กระทบ areas อื่น (hidden by summary) |
OSPF Design Best Practices
| Practice |
รายละเอียด |
| ใช้ hierarchical areas |
Area 0 (backbone) + non-backbone areas ที่เชื่อมกับ Area 0 |
| Summarize ที่ ABR |
ทุก area ควร summarize routes ก่อนส่งไป Area 0 |
| ใช้ stub/NSSA ที่ branch |
Branch offices ไม่จำเป็นต้องรู้ทุก route ใช้ default route |
| วางแผน IP addressing |
ใช้ contiguous subnets per area เพื่อ summarize ได้ |
| จำกัด routers per area |
แนะนำ ≤ 50-100 routers per area |
| ใช้ passive-interface |
Interface ที่ไม่ต้องรัน OSPF (user-facing) ใช้ passive |
| Authentication |
ใช้ OSPF MD5/SHA authentication ป้องกัน rogue routers |
| Tune timers |
ปรับ hello/dead timers ตาม link type (fast timers สำหรับ critical links) |
OSPF Virtual Link
| Feature |
รายละเอียด |
| ใช้เมื่อ |
Area ไม่สามารถเชื่อมต่อกับ Area 0 ได้โดยตรง |
| วิธีทำงาน |
สร้าง virtual link ผ่าน transit area ไป Area 0 |
| ข้อจำกัด |
Transit area ต้องเป็น normal area (ไม่ใช่ stub/NSSA) |
| Best Practice |
หลีกเลี่ยง virtual links ถ้าเป็นไปได้ (redesign topology แทน) |
ตัวอย่าง OSPF Design
| Area |
Type |
Subnet |
Summary |
| Area 0 |
Backbone |
10.0.0.0/16 |
Core + transit |
| Area 1 |
Normal |
10.1.0.0/16 |
10.1.0.0/16 (summarize at ABR) |
| Area 2 |
Stub |
10.2.0.0/16 |
10.2.0.0/16 + default route |
| Area 3 |
NSSA |
10.3.0.0/16 |
10.3.0.0/16 + local redistribution |
| Area 4 |
Totally Stubby |
10.4.0.0/16 |
default route only |
ทิ้งท้าย: OSPF Design = Scale + Stability
OSPF Area Design สำคัญสำหรับ network ที่โตขึ้น Stub/Totally Stubby: ลด routing table ที่ branch NSSA: ใช้เมื่อ area มี ASBR (redistribution) Summarize ที่ ABR เสมอ → ลด LSA flooding + เร็ว convergence วางแผน IP addressing ให้ contiguous per area
อ่านเพิ่มเติมเกี่ยวกับ BGP Route Filtering และ Network Segmentation ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com