BGP — regex match के साथ expanded community-list
- Routing
- मध्यम
- 12 मिनट
- 3 चरण
- Cisco IOS-style
Standard community-lists exact-value matching करते हैं। Expanded community-lists आपको printed <asn>:<n> form के against regex-match करने देते हैं — "65001: से शुरू होने वाली किसी भी community को match करें" के लिए useful। Prefix को 65001:777 से tag करके, एक expanded list ^65001: define करके, और verify करके दिखाएँ कि tagged prefix match करता है।
मुफ़्त · बिना इंस्टॉल · बिना अकाउंट
परिदृश्य
दो community-list flavours: | Type | Match form | Use case | | --- | --- | --- | | standard | exact value (जैसे 65001:100) | "permit अगर community exactly X हो" | | expanded | printed string पर regex | "permit अगर community 65001:* हो" | Expanded COMMUNITIES attribute के against match करता है जो space-separated <asn>:<n> string के रूप में render होता है — 65001:100 65001:200 ऐसे prefix के लिए जो दोनों carry करता है। ^ / $ से anchor करें; word boundaries के लिए \b उपयोग करें। Real Cisco से netverdict deviation: real IOS _ को boundary metacharacter मानता है (space, comma, start, end match करता है)। netverdict JavaScript का RegExp verbatim उपयोग करता है — boundaries के लिए \b उपयोग करें। इस lab में R1 192.168.1.0/24 को 65001:777 से tag करता है। R2 एक expanded list ^65001: define करता है और confirm करता है कि prefix match करता है।
टोपोलॉजी
2 × router · Cisco IOS-style
R1— routerR2— router
आप क्या करेंगे
R1 पर एक route-map define करें जो outbound prefixes को community
65001:777से tag करे और इसे eBGP neighbour से bind करें। (np-bgp-community-tag-and-filterसे pattern reuse कर रहे हैं।)R2 पर एक *expanded* community-list
ANY-65001define करें जो^65001:match करे (कोई भी community जिसका AS-part 65001 हो)।R2 पर
route-map MATCH-65001 permit 10कोmatch community ANY-65001औरset local-preference 200के साथ define करें। R1 को inbound bind करें।
इस विषय पर और लैब
- Syntax delta — static route (Extreme EXOS)शुरुआती · 4 मिनट
- Syntax delta — static route (Cisco IOS)शुरुआती · 4 मिनट
- Syntax delta — static route (Juniper Junos)शुरुआती · 5 मिनट
- Syntax delta — static route (VyOS)शुरुआती · 5 मिनट
- Static routes — hub-and-spoke ठीक करेंशुरुआती · 12 मिनट
- Static routes — egress-interface रूप (point-to-point)शुरुआती · 8 मिनट
यह लैब अन्य भाषाओं में
BGP — expanded community-list with regex matchBGP — expanded Community-List mit Regex-MatchBGP — community-list expandida con regexBGP — community-list expandida com match regexBGP — community-list expanded avec match regexBGP — 使用正则匹配的 expanded community-listBGP — community-list expanded con match regexBGP — 正規表現マッチ付き expanded community-listBGP — 정규식 매치를 가진 expanded community-listBGP — expanded community-list с regex-совпадениемBGP — regex eşleşmeli expanded community-listBGP — community-list expanded khớp regex