BGP Communities: Standard, Extended และ Large Communities

BGP Communities: Standard, Extended และ Large Communities

BGP Communities เป็น attribute ที่ใช้ tag routes ด้วยค่าที่กำหนดเอง เพื่อให้สามารถ apply routing policies แบบ group ได้ง่าย แทนที่จะ match ทีละ prefix Communities ช่วยให้ service providers และ enterprises สื่อสาร routing intent ระหว่าง BGP peers ได้อย่างมีประสิทธิภาพ

การจัดการ BGP routing policies โดยไม่ใช้ communities จะซับซ้อนมากเมื่อมี prefixes จำนวนมาก เพราะต้อง match ทีละ prefix ใน route-map Communities ช่วยให้ tag routes เป็นกลุ่ม แล้ว apply policy ตาม community value ทำให้ configuration สั้นลงและ maintain ง่ายขึ้น

Community Types

Type Format Size RFC
Standard Community ASN:Value (e.g., 65000:100) 32-bit RFC 1997
Extended Community Type:ASN:Value 64-bit RFC 4360
Large Community ASN:Value1:Value2 (e.g., 65000:100:200) 96-bit (3×32-bit) RFC 8092

Standard Communities

Format รายละเอียด
ASN:Value 16-bit ASN : 16-bit value (0-65535 : 0-65535)
ตัวอย่าง 65000:100 = routes จาก customer type 100
Multiple Route หนึ่งมีได้หลาย communities พร้อมกัน
Transitive ส่งต่อไปยัง BGP peers ถัดไป (by default)

Well-Known Communities

Community Value Action
NO_EXPORT 65535:65281 ไม่ advertise route ออกไปนอก confederation/AS
NO_ADVERTISE 65535:65282 ไม่ advertise route ให้ BGP peer ใดเลย
NO_EXPORT_SUBCONFED 65535:65283 ไม่ advertise ออกนอก sub-AS ใน confederation
NOPEER 65535:65284 ไม่ advertise ให้ bilateral peers
BLACKHOLE 65535:666 Remote Triggered Blackhole (RTBH) — drop traffic

Extended Communities

Feature รายละเอียด
Size 64-bit (ใหญ่กว่า standard 2 เท่า)
Structure Type (2 bytes) + Value (6 bytes)
Use Case หลัก MPLS VPN (Route Target, Route Origin)
Route Target (RT) กำหนดว่า route อยู่ใน VRF ไหน (import/export)
Route Origin (SOO) ป้องกัน routing loops ใน multi-homed sites
Transitive บาง type transitive บาง type non-transitive

Large Communities

Feature รายละเอียด
Size 96-bit (3 × 32-bit fields)
Format Global Admin : Local Data 1 : Local Data 2
ทำไมต้องมี Standard community รองรับแค่ 16-bit ASN แต่ 4-byte ASN (>65535) ใส่ไม่ได้
ตัวอย่าง 4200000001:100:200 (4-byte ASN ได้)
Flexibility 3 fields ให้ encode ข้อมูลได้มากกว่า

Common Community Designs

Community ความหมาย ใช้สำหรับ
ASN:1xx Route origin (customer, peer, transit) กำหนดว่า route มาจากไหน
ASN:2xx Region/location กำหนดว่า route เรียนรู้ที่ POP ไหน
ASN:3xx Local preference modifier Customer กำหนด local-pref ได้
ASN:666 Blackhole Customer request blackhole route
ASN:0 Do not announce ไม่ advertise route นี้

Community Use Cases

Use Case วิธีใช้
Traffic Engineering Customer set community เพื่อ prepend/no-export ที่ specific peers
Blackhole Routing Tag route ด้วย blackhole community → upstream drop traffic to that prefix
Route Filtering Filter routes ตาม community (accept/reject based on tag)
Local Preference Set local-pref ตาม community (customer control inbound traffic)
MPLS VPN Extended community (RT) กำหนด VRF membership
Inter-provider TE Signal routing intent ระหว่าง ISPs ผ่าน communities

RTBH (Remote Triggered Blackhole)

Step Action
1. Customer ถูก DDoS Traffic จำนวนมากมาที่ prefix ของ customer
2. Customer announce /32 Announce /32 ของ target IP + blackhole community (65535:666)
3. ISP match community ISP route-map match blackhole community → set next-hop null0
4. Traffic dropped Traffic ไปยัง /32 ถูก drop ที่ ISP edge (ไม่เข้า network)

Best Practices

Practice รายละเอียด
Document community scheme สร้าง community map ที่ชัดเจน (ASN:value = ความหมาย)
ใช้ Large Communities ถ้าใช้ 4-byte ASN ต้องใช้ Large Communities
Strip communities ขาเข้า Remove unwanted communities จาก customer routes (security)
Consistent scheme ใช้ numbering scheme เดียวกันทั้ง network
Publish community list แจ้ง customers ว่ามี communities อะไรให้ใช้

ทิ้งท้าย: BGP Communities = Routing Policy Language

BGP Communities = tag routes เพื่อ apply policy เป็นกลุ่ม Standard (32-bit) = ใช้ทั่วไป, Extended (64-bit) = MPLS VPN Large (96-bit) = รองรับ 4-byte ASN Well-known: NO_EXPORT, BLACKHOLE (RTBH) ใช้สำหรับ TE, filtering, blackhole, VPN

อ่านเพิ่มเติมเกี่ยวกับ BGP Route Filtering และ MPLS Traffic Engineering ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com

จัดส่งรวดเร็วส่งด่วนทั่วประเทศ
รับประกันสินค้าเคลมง่าย มีใบรับประกัน
ผ่อนชำระได้บัตรเครดิต 0% สูงสุด 10 เดือน
สะสมแต้ม รับส่วนลดส่วนลดและคะแนนสะสม

© 2026 SiamLancard — จำหน่ายการ์ดแลน อุปกรณ์ Server และเครื่องพิมพ์ใบเสร็จ

SiamLancard
Logo
Free Forex EA Download — XM Signal · EA Forex ฟรี
iCafeForex.com - สอนเทรด Forex | SiamCafe.net
Shopping cart