BGP Communities: Standard, Extended, Large Communities และ Use Cases

BGP Communities: Standard, Extended, Large Communities และ Use Cases

BGP Communities เป็น optional transitive attribute ที่ใช้ “tag” routes เพื่อ apply routing policies BGP Communities ช่วยให้ ISPs และ enterprises ควบคุม route propagation, traffic engineering และ policy enforcement ได้อย่างยืดหยุ่น Standard Communities ใช้ 32-bit value, Extended Communities ใช้ 64-bit (สำหรับ VPN, QoS) และ Large Communities ใช้ 96-bit (สำหรับ 4-byte ASN)

BGP routes มี attributes มากมาย (AS-path, local-pref, MED) แต่ Communities เป็น attribute เดียวที่ออกแบบมาเพื่อ “tag” routes สำหรับ policy processing ถ้าไม่มี communities ต้อง match routes ด้วย prefix lists หรือ AS-path filters ซึ่งไม่ flexible Communities ทำให้สามารถ tag route ที่ origin → apply policy ที่ downstream routers โดยไม่ต้อง know specific prefixes

Community Types

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

Well-Known Standard Communities

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

Standard Community Use Cases

Use Case Community Action
Route Origin Tagging 65000:1 = customer, 65000:2 = peer, 65000:3 = transit Tag routes ตาม origin type สำหรับ downstream policy
Geographic Tagging 65000:100 = Bangkok, 65000:200 = Singapore Tag routes ตาม location สำหรับ traffic engineering
Local Preference Control Customer sends 65000:500 → ISP sets local-pref 500 Customer ควบคุม inbound traffic path
Prepend Control Customer sends 65000:3001 → ISP prepends 1× to specific peer Customer ควบคุม AS-path length ไปหา specific peer
Blackhole Customer sends 65535:666 → ISP blackholes prefix DDoS mitigation: drop attack traffic at ISP edge
No Export to Peer 65000:9001 = don’t export to Peer A Prevent route from being sent to specific peer

Extended Communities

Type Use Case ตัวอย่าง
Route Target (RT) MPLS VPN route import/export RT:65000:100 → import routes เข้า VRF ที่มี RT match
Route Origin (RO) Identify route origin (SOO) SoO:65000:1 → prevent routing loops in multi-homed sites
OSPF Domain ID OSPF inter-domain routing Different OSPF domains ใน MPLS VPN
BGP Cost IGP cost community Influence best path selection using cost
Encapsulation Tunnel type (VXLAN, GRE, MPLS) Specify encapsulation type สำหรับ EVPN
MAC Mobility EVPN MAC move detection Sequence number สำหรับ track MAC movements

Large Communities

Feature รายละเอียด
Why Standard communities ใช้ 16-bit ASN field → ไม่พอสำหรับ 4-byte ASNs (> 65535)
Format GlobalAdmin:LocalData1:LocalData2 (แต่ละ field 32-bit)
ตัวอย่าง 400000:100:200 (ASN 400000, function 100, parameter 200)
Backward Compatible ทำงานร่วมกับ standard communities ได้ (separate attribute)
Adoption Major ISPs + IXPs adopt large communities สำหรับ 4-byte ASN policies

ISP Community Design

Category Community Range Purpose
Informational ASN:1xx Route origin (customer, peer, transit, IXP)
Geographic ASN:2xx Location (city, country, PoP)
Local Pref ASN:3xx Customer sets local-pref (primary, backup)
Prepending ASN:4xx Customer requests prepend to specific peers
Blackhole ASN:666 RTBH (remotely triggered blackhole)
No Export ASN:9xx Don’t export to specific peers/upstreams

RTBH (Remotely Triggered Blackhole)

Feature รายละเอียด
Purpose DDoS mitigation: announce /32 target prefix with blackhole community
Community 65535:666 (well-known) หรือ ISP-specific (e.g., ASN:666)
Action ISP receives → sets next-hop to null route → drops all traffic to prefix
Source-based RTBH Blackhole traffic from specific source (uRPF + blackhole)
Limitation Drops ALL traffic to target (legitimate + attack) — victim offline
Alternative FlowSpec (BGP) สำหรับ granular filtering (port, protocol specific)

Best Practices

Practice รายละเอียด
Document community schema Publish community meanings (customers + peers ต้องรู้)
Use ASN:Value format ใช้ own ASN เป็น first part (avoid conflicts)
Strip customer communities Strip/replace communities จาก customers ที่ ingress (security)
Large communities for 4-byte ASN ถ้า ASN > 65535 → ใช้ Large Communities
Test policies in lab ทดสอบ community-based policies ก่อน production
Monitor community usage Track ว่า customers ส่ง community อะไรมา (abuse detection)

ทิ้งท้าย: BGP Communities = Flexible Route Tagging

BGP Communities Standard (32-bit ASN:Value), Extended (64-bit, for VPN/EVPN), Large (96-bit, for 4-byte ASN) Well-known: NO_EXPORT, NO_ADVERTISE, BLACKHOLE (65535:666) Use cases: origin tagging, geographic tagging, local-pref control, prepend control, RTBH ISP design: informational (1xx), geographic (2xx), local-pref (3xx), prepend (4xx), blackhole (666) RTBH: DDoS mitigation → announce /32 + blackhole community → ISP drops traffic

อ่านเพิ่มเติมเกี่ยวกับ BGP Route Filtering และ OSPF Advanced Areas LSA ที่ 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