Use the
set community
command in route maps to configure the community
attributes. By default, the community attribute is not sent to BGP peers. To send the
community attribute to a neighbor, use the
neighbor send-community
command.
Consider the network structure shown in Figure 26 on page 93. The following sample
configurations illustrate some of the capabilities of using the community attribute.
Figure 26: Communities
The following commands configure router NY to apply route map
setcomm
to routes
going out to 10.72.4.3. If the community attribute of such a route matches instance
10 of the route map, router NY sets the community attribute to 31:15. All locally
originated routes will match this instance of the route map.
host1(config)#
router bgp 31
host1(config-router)#
network 10.16.22.0 mask 255.255.254.0
host1(config-router)#
neighbor 10.72.4.3 remote-as 425
host1(config-router)#
neighbor 10.72.4.3 send-community
host1(config-router)#
neighbor 10.72.4.3 route-map setcomm out
host1(config-router)#
exit
host1(config)#
ip as-path access-list 1 permit ^$
host1(config)#
route-map setcomm permit 10
host1(config-route-map)#
match as-path 1
host1(config-route-map)#
set community 31:15
The following commands configure router LA to apply route map
matchcomm
to
routes coming in from 10.72.4.2. If the community attribute of such a route matches
instance 10 of the route map, router LA sets the weight of the route to 25.
host2(config)#
router bgp 425
host2(config-router)#
network 172.24.160 mask 255.255.224.0
host2(config-router)#
neighbor 10.72.4.2 remote-as 31
host2(config-router)#
neighbor 10.72.4.2 send-community
host2(config-router)#
neighbor 10.72.4.2 route-map matchcomm in
host2(config-router)#
neighbor 10.5.5.1 remote-as 122
host2(config-router)#
neighbor 10.5.5.1 send-community
host2(config-router)#
exit
host2(config)#
ip community-list 1 permit 31:15
host2(config)#
route-map matchcomm permit 10
host2(config-route-map)#
match community 1
host2(config-route-map)#
set weight 25
Configuring BGP Routing Policy
■
93
Chapter 1: Configuring BGP Routing
Summary of Contents for JUNOSE
Page 6: ...vi...
Page 8: ...viii JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 24: ...xxiv Table of Contents JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 37: ...Part 1 Border Gateway Protocol Configuring BGP Routing on page 3 Border Gateway Protocol 1...
Page 38: ...2 Border Gateway Protocol JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 234: ...198 Monitoring BGP JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 236: ...200 Multiprotocol Layer Switching JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 298: ...262 Point to Multipoint LSPs Configuration JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 536: ...500 Monitoring BGP MPLS VPNs JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 538: ...502 Layer 2 Services Over MPLS JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 604: ...568 Virtual Private LAN Service JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 618: ...582 VPLS References JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 674: ...638 Virtual Private Wire Service JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 718: ...682 Monitoring MPLS Forwarding Table for VPWS JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 719: ...Part 6 Index Index on page 685 Index 683...
Page 720: ...684 Index JUNOSe 11 0 x BGP and MPLS Configuration Guide...