3.7.d Implement optimize and troubleshoot routing policies

3.7.d [iv] Communities, extended communities

here is a nice lab from evil routers that illustrates the use of communities to manipulate route preference…

http://evilrouters.net/2009/03/18/using-bgp-communities-to-influence-routing/

it is imperative that you use ip bgp-community new-format on the routers or you get this:

R3(config)#do sh ip bgp 172.31.0.0
BGP routing table entry for 172.31.0.0/24, version 13
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
2
65001
172.16.12.1 (inaccessible) from 172.16.23.2 (172.16.23.2)
Origin IGP, metric 0, localpref 100, valid, internal
65001
172.16.13.1 from 172.16.13.1 (172.31.3.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 4259971272

versus:

R3(config)#ip bgp-community new-format
R3(config)#do sh ip bgp 172.31.0.0
BGP routing table entry for 172.31.0.0/24, version 13
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
2
65001
172.16.12.1 (inaccessible) from 172.16.23.2 (172.16.23.2)
Origin IGP, metric 0, localpref 100, valid, internal
65001
172.16.13.1 from 172.16.13.1 (172.31.3.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: 65002:200