Sie sind auf Seite 1von 10

BGP Communities

RST-2003 8109_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

Problem: Scale Routing Policy Solution: COMMUNITY


NOT in decision algorithm BGP route can be a member of many communities Typical communities:
Destinations learned from customers Destinations learned from ISPs or peers Destinations in VPN BGP community is fundamental to the operation of BGP VPNs
RST-2003 8109_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

Problem: Scale Routing Policy Solution: COMMUNITY


Communities: 1:100 Customer Routes 1:80 ISP Routes

ISP 2 ISP 1

ISP 3
0.0.0.0

ISP 4

Customer 1 (No Default, Wants Full Routes) RST-2003


8109_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

Customer 2 (Uses Default, Wants Your Routes)


3

Problem: Scale Routing Policy Solution: COMMUNITY


Communities: 1:100 Customer Routes 1:80 ISP Routes Set Community 1:80

ISP 2 ISP 1
Match Community 1:100

Match Community 1:100 1:80

Match Community 1:100

ISP 3
Set Community 1:100
0.0.0.0

ISP 4

Customer 1 (No Default, Wants Full Routes) RST-2003


8109_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

Customer 2 (Uses Default, Wants Your Routes)


4

BGP Attributes: COMMUNITY

Activated per neighbor/peer-group:


neighbor {peer-address | peer-group-name} send-community

Carried across AS boundaries Common convention is string of four bytes: <AS>:[0-65536]

RST-2003 8109_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

BGP Attributes: COMMUNITY (Cont.)

Each destination can be a member of multiple communities Using a route-map: set community
<1-4294967295> community number aa:nn none no-advertise no-export community number in aa:nn format No community attribute Do not advertise to any peer (well-known community) Do not export outside AS/confed (well-known community) additive Add to the existing community local-AS Do not send to EBGP peers (well-known community)

RST-2003 8109_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

Community Filters

Filter based on Community Strings


ip community-list <1-99> [permit|deny] comm ip community-list <100-199> [permit|deny] regexp

Per neighbor Inbound or outbound route-maps


Match community <number> [exact-match]

Exact match only for standard lists

RST-2003 8109_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

Community Filters
Example 1:
Mark some prefixes as part of the 1:120 community (+remove existing community!)

Configuration:
router bgp 1 neighbor 10.0.0.1 remote-as 2 neighbor 10.0.0.1 send-community neighbor 10.0.0.1 route-map set_community out ! route-map set_community 10 permit match ip address 1 set community 1:120 ! access-list 1 permit 10.10.0.0 0.0.255.255
RST-2003 8109_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

Community Filters
Example 2:
Set LOCAL_PREF depending on the community that the prefix belongs to

Configuration:
router bgp 1 neighbor 10.0.0.1 remote-as 2 neighbor 10.0.0.1 route-map filter_on_community in ! route-map filter_on_community 10 permit match community 1 set local-preference 150 ! ip community-list 1 permit 2:150
RST-2003 8109_05_2003_c1
2003, Cisco Systems, Inc. All rights reserved.

RST-2003 8109_05_2003_c1

2003, Cisco Systems, Inc. All rights reserved.

10

Das könnte Ihnen auch gefallen