Home » BGP Advanced: Route Reflectors, Confederations, Communities และ Filtering
BGP Advanced: Route Reflectors, Confederations, Communities และ Filtering
BGP Advanced: Route Reflectors, Confederations, Communities และ Filtering
BGP (Border Gateway Protocol) เป็น routing protocol ที่ขับเคลื่อน internet ทั้งหมด Advanced BGP techniques เช่น Route Reflectors ลด iBGP full-mesh requirement, Confederations แบ่ง AS ใหญ่เป็น sub-AS, Communities ใช้ tag routes เพื่อ policy control และ Filtering ป้องกัน route leaks + hijacks เป็นสิ่งจำเป็นสำหรับ ISP และ enterprise networks ขนาดใหญ่
iBGP ต้องการ full-mesh peering ระหว่างทุก BGP speakers ใน AS เดียวกัน (N×(N-1)/2 sessions) ซึ่ง ไม่ scale สำหรับ large networks Route Reflectors และ Confederations แก้ปัญหานี้ ส่วน Communities เป็นเครื่องมือสำคัญในการ implement routing policies ข้าม AS boundaries
iBGP Full-Mesh Problem
| Routers |
iBGP Sessions Required |
ปัญหา |
| 5 |
10 |
Manageable |
| 10 |
45 |
Getting complex |
| 50 |
1,225 |
Very difficult to manage |
| 100 |
4,950 |
Impractical |
| 500 |
124,750 |
Impossible |
Route Reflectors (RR)
| Feature |
รายละเอียด |
| คืออะไร |
Router ที่ทำหน้าที่ “reflect” iBGP routes ให้ clients (ไม่ต้อง full-mesh) |
| RR Client |
Router ที่ peer กับ RR → ไม่ต้อง peer กับ routers อื่น |
| Non-client |
Router ที่ไม่ใช่ client → ยังต้อง peer ตาม normal iBGP rules |
| Cluster ID |
Identifier สำหรับ RR cluster (ป้องกัน routing loops) |
| Originator ID |
Router-ID ของ route originator (ป้องกัน loops) |
| Reflection Rules |
Client→RR: reflect to all clients + non-clients | Non-client→RR: reflect to clients only | eBGP→RR: reflect to all |
| Redundancy |
ใช้ 2+ RRs per cluster (redundant RRs) |
| Hierarchy |
RR-of-RR: hierarchical RR design สำหรับ very large networks |
Confederations
| Feature |
รายละเอียด |
| คืออะไร |
แบ่ง 1 AS ใหญ่เป็นหลาย sub-AS (private AS numbers) |
| External View |
ภายนอกเห็นเป็น AS เดียว (confederation AS number) |
| Internal |
sub-AS ใช้ eBGP-like peering ระหว่างกัน (ไม่ต้อง full-mesh ข้าม sub-AS) |
| Within sub-AS |
ใช้ iBGP ปกติ (full-mesh หรือ RR ภายใน sub-AS) |
| AS_CONFED_SEQ |
BGP attribute ที่เก็บ confederation AS path (stripped ก่อนส่งออกนอก) |
| Use Case |
Very large ISPs ที่ต้องการแบ่ง administrative domains |
| RR vs Confederation |
RR ง่ายกว่า + ใช้กันมากกว่า, Confederation ซับซ้อนแต่ provide better path diversity |
BGP Communities
| Type |
Format |
Purpose |
| Standard Community |
ASN:Value (e.g., 65000:100) |
32-bit value — tag routes สำหรับ policy |
| Extended Community |
Type:ASN:Value |
64-bit — ใช้กับ VPNv4, EVPN (Route Targets) |
| Large Community |
ASN:Value1:Value2 (RFC 8092) |
96-bit — รองรับ 4-byte ASNs |
| Well-Known: NO_EXPORT |
0xFFFFFF01 |
ห้าม advertise ออกนอก AS |
| Well-Known: NO_ADVERTISE |
0xFFFFFF02 |
ห้าม advertise ให้ใครเลย |
| Well-Known: NO_EXPORT_SUBCONFED |
0xFFFFFF03 |
ห้าม advertise ออกนอก sub-AS |
Community Use Cases
| Use Case |
Community |
Action |
| Blackhole |
ASN:666 |
Upstream drops traffic to this prefix (DDoS mitigation) |
| Local Preference |
ASN:100/200/300 |
Set local-pref ตาม community (traffic engineering) |
| Prepend |
ASN:1/2/3 |
Prepend AS path 1/2/3 times (make path less preferred) |
| No Export to Peers |
ASN:nopeer |
Don’t advertise to peering partners |
| Region Tag |
ASN:region_code |
Tag routes by geographic region |
| Customer vs Peer vs Transit |
ASN:type |
Tag routes by relationship type |
BGP Filtering
| Filter Type |
วิธีทำ |
Purpose |
| Prefix List |
Match specific prefixes (permit/deny) |
Allow only customer prefixes, block bogons |
| AS-Path Filter |
Match AS path regex |
Allow only routes originating from specific ASNs |
| Community Filter |
Match community values |
Apply policy based on community tags |
| IRR/RPKI Filtering |
Validate routes against IRR/RPKI databases |
Prevent route hijacks + leaks |
| Max Prefix |
Limit number of prefixes from neighbor |
Protect against route leaks (peer sends too many routes) |
| Bogon Filtering |
Block RFC 1918, documentation, reserved prefixes |
Prevent bogon routes from entering routing table |
RPKI (Resource Public Key Infrastructure)
| Feature |
รายละเอียด |
| คืออะไร |
Cryptographic framework สำหรับ validate BGP route origins |
| ROA (Route Origin Authorization) |
Signed statement: “AS X is authorized to originate prefix Y” |
| Validation States |
Valid (ROA matches), Invalid (ROA doesn’t match), Not Found (no ROA) |
| Action |
Valid = accept, Invalid = reject, Not Found = accept (with lower preference) |
| Benefit |
ป้องกัน route hijacking (unauthorized AS originating someone else’s prefix) |
| Adoption |
เพิ่มขึ้นเรื่อยๆ (Tier-1 ISPs enforce RPKI validation) |
BGP Best Practices
| Practice |
รายละเอียด |
| Use RRs for iBGP |
Redundant RRs แทน full-mesh (scalable, manageable) |
| Implement RPKI |
Sign ROAs + validate incoming routes (prevent hijacks) |
| Filter aggressively |
Prefix lists + AS-path filters + max-prefix limits ทุก peering |
| Use communities |
Tag routes สำหรับ traffic engineering + policy control |
| MD5 authentication |
TCP MD5 signature ทุก BGP session (ป้องกัน session hijacking) |
| GTSM (TTL Security) |
Accept BGP packets only with TTL=255 (ป้องกัน remote attacks) |
| Monitor BGP |
Monitor prefix count, AS path changes, community changes → detect anomalies |
ทิ้งท้าย: BGP Advanced = Scalable + Secure Internet Routing
BGP Advanced Route Reflectors: eliminate iBGP full-mesh (reflect routes to clients) Confederations: split AS into sub-AS (eBGP-like between sub-AS) Communities: tag routes for policy (blackhole, local-pref, prepend, no-export) Filtering: prefix lists + AS-path + community + RPKI (prevent hijacks/leaks) RPKI: cryptographic route origin validation (ROA = authorized origin) Best practice: redundant RRs + RPKI + aggressive filtering + communities + MD5/GTSM
อ่านเพิ่มเติมเกี่ยวกับ IS-IS Routing Protocol และ MPLS Fundamentals ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com