Home » BGP Advanced: Route Reflectors, Confederations, Communities และ Path Selection
BGP Advanced: Route Reflectors, Confederations, Communities และ Path Selection
BGP Advanced: Route Reflectors, Confederations, Communities และ Path Selection
BGP (Border Gateway Protocol) เป็น routing protocol ที่ขับเคลื่อน internet ทั้งหมด Route Reflectors แก้ปัญหา iBGP full-mesh requirement, Confederations แบ่ง AS ใหญ่เป็น sub-AS ที่จัดการง่ายขึ้น, Communities เป็น tags ที่ติดกับ routes เพื่อ policy control และ Path Selection Algorithm กำหนดว่า BGP เลือก best path อย่างไรจากหลาย paths ที่ได้รับ
Enterprise และ service provider networks ที่ใช้ BGP มักมี routers จำนวนมาก iBGP full-mesh ระหว่าง N routers ต้องการ N×(N-1)/2 sessions: 10 routers = 45 sessions, 50 routers = 1,225 sessions, 100 routers = 4,950 sessions Route Reflectors และ Confederations แก้ปัญหา scalability นี้
iBGP Full-Mesh Problem
| Routers (N) |
iBGP Sessions Required |
Complexity |
| 5 |
10 |
Manageable |
| 10 |
45 |
Getting complex |
| 50 |
1,225 |
Very complex |
| 100 |
4,950 |
Unmanageable |
| 500 |
124,750 |
Impossible |
Route Reflectors (RR)
| Feature |
รายละเอียด |
| คืออะไร |
Router ที่ reflect iBGP routes ไปยัง clients (แก้ full-mesh requirement) |
| RR Client |
Router ที่ peer กับ RR (ไม่ต้อง full-mesh กับ clients อื่น) |
| Non-Client |
Router ที่ไม่ใช่ client → ยัง full-mesh กับ RR และ non-clients อื่น |
| Cluster |
RR + clients ของมัน = 1 cluster (Cluster ID = RR’s router-id) |
| Reflection Rules |
Route จาก client → reflect ไปทุก client + non-client | Route จาก non-client → reflect ไป clients เท่านั้น |
| Loop Prevention |
ORIGINATOR_ID (ไม่ส่งกลับ originator) + CLUSTER_LIST (ไม่ส่งกลับ cluster) |
| Redundancy |
2 RRs per cluster (redundancy — ถ้า 1 ล่ม อีกตัวทำงานต่อ) |
| Hierarchy |
RR สามารถเป็น client ของ RR อีกตัวได้ (hierarchical RR) |
RR Design
| Design |
Topology |
Use Case |
| Single Cluster |
1-2 RRs + all routers เป็น clients |
Small networks (< 50 routers) |
| Multiple Clusters |
RR per region/site → each RR has own clients |
Medium networks (regional RRs) |
| Hierarchical |
Top-level RRs + regional RRs (RR of RRs) |
Large SP networks (hundreds of routers) |
| Dedicated RR |
RR ไม่อยู่ใน data path (dedicated server/VM) |
Best practice (RR ไม่ต้อง forward traffic) |
Confederations
| Feature |
รายละเอียด |
| คืออะไร |
แบ่ง 1 AS ใหญ่เป็นหลาย sub-AS → iBGP full-mesh เฉพาะภายใน sub-AS |
| Sub-AS |
Private AS numbers (64512-65534) สำหรับ internal sub-AS |
| Between Sub-AS |
eBGP-like behavior (AS_PATH includes sub-AS but stripped to external peers) |
| Within Sub-AS |
iBGP behavior (full-mesh หรือ RR ภายใน sub-AS) |
| External View |
ภายนอกเห็นเป็น AS เดียว (sub-AS ถูกซ่อน) |
| Use Case |
Very large AS ที่มีหลาย administrative regions |
| vs Route Reflectors |
Confederation = administrative separation | RR = simpler, more common |
BGP Communities
| Type |
Format |
Use Case |
| Standard Community |
ASN:VALUE (e.g., 65000:100) |
Basic tagging (customer, peer, transit) |
| Extended Community |
Type:ASN:VALUE (e.g., RT:65000:100) |
VPN Route Targets, SoO (Site of Origin) |
| Large Community |
ASN:FUNC:VALUE (e.g., 65000:1:100) |
4-byte AS support, more flexible |
| Well-Known: NO_EXPORT |
Preset |
ไม่ advertise route ออก AS (keep within AS) |
| Well-Known: NO_ADVERTISE |
Preset |
ไม่ advertise route ให้ใคร (keep local) |
| Well-Known: LOCAL_AS |
Preset |
ไม่ advertise ออก confederation sub-AS |
Community Use Cases
| Community |
Meaning |
Action |
| 65000:100 |
Customer routes |
Prefer highest, advertise to all |
| 65000:200 |
Peer routes |
Medium preference, don’t advertise to other peers |
| 65000:300 |
Transit routes |
Lowest preference, don’t advertise to peers |
| 65000:666 |
Blackhole |
Drop traffic to this prefix (DDoS mitigation) |
| 65000:10X |
Prepend X times |
AS-PATH prepend 1-3 times to specific peers |
BGP Path Selection Algorithm
| Step |
Attribute |
Prefer |
| 1 |
Weight (Cisco-specific) |
Highest weight |
| 2 |
LOCAL_PREF |
Highest LOCAL_PREF (default 100) |
| 3 |
Locally originated |
Locally originated routes (network, redistribute, aggregate) |
| 4 |
AS_PATH length |
Shortest AS_PATH |
| 5 |
ORIGIN |
IGP (i) > EGP (e) > Incomplete (?) |
| 6 |
MED |
Lowest MED (compared only between same AS) |
| 7 |
eBGP > iBGP |
eBGP-learned preferred over iBGP-learned |
| 8 |
IGP metric to next-hop |
Lowest IGP cost to reach BGP next-hop |
| 9 |
Oldest route |
Oldest eBGP route (stability) |
| 10 |
Router ID |
Lowest Router ID of neighbor |
| 11 |
Cluster List length |
Shortest Cluster List |
| 12 |
Neighbor IP |
Lowest neighbor IP address |
BGP Security
| Feature |
Purpose |
| MD5 Authentication |
Authenticate BGP sessions (prevent unauthorized peers) |
| Prefix Limits |
Maximum prefix limit per neighbor (prevent route leaks flooding) |
| RPKI (Resource PKI) |
Validate route origins (ROA — Route Origin Authorization) |
| BGPsec |
Validate entire AS_PATH (not just origin) — still limited adoption |
| GTSM (TTL Security) |
Accept BGP only if TTL = 255 (prevent remote attacks) |
| Bogon Filtering |
Filter RFC 1918, documentation, reserved prefixes |
ทิ้งท้าย: BGP = The Routing Protocol of the Internet
BGP Advanced Route Reflectors: eliminate iBGP full-mesh (RR reflects routes to clients, loop prevention via ORIGINATOR_ID + CLUSTER_LIST) Confederations: split AS into sub-AS (eBGP between sub-AS, iBGP within) Communities: route tagging for policy (standard, extended, large, well-known) Path Selection: weight → LOCAL_PREF → AS_PATH → ORIGIN → MED → eBGP/iBGP → IGP metric → oldest → RID Security: MD5 auth, prefix limits, RPKI (origin validation), GTSM, bogon filtering Design: dedicated RRs (not in data path), 2 RRs per cluster, hierarchical for large networks
อ่านเพิ่มเติมเกี่ยวกับ OSPF Advanced Areas LSA Types และ Network Design Patterns Spine-Leaf ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com