BGP: Difference between revisions

Content added Content deleted
Line 232: Line 232:
neighbor 192.168.12.2 send-community
neighbor 192.168.12.2 send-community


network 150.1.1.0 mask 255.255.255.0 route-map SETCOM ==> Network 150.1.1.0 is advertised with community 1:10
network 150.1.1.0 mask 255.255.255.0 route-map SETCOM ==> Network 150.1.1.0 is advertised with community 1:10
</pre>
</pre>


Line 248: Line 248:
Local
Local
192.168.12.1 from 192.168.12.1 (192.168.127.1)
192.168.12.1 from 192.168.12.1 (192.168.127.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Origin IGP, metric 0, localpref 100, valid, internal, best ==> Metric is 0
Community: 1:10
Community: 1:10 ==> Community is 1:10
</pre>
</pre>


!-- Match the community using a standard community-list
;Match the community using a standard community-list
R2(config)#ip community-list 1 permit 1:10
ip community-list 1 permit 1:10
R2(config)#route-map COM
route-map COM
R2(config-route-map)#match community 1
match community 1
R2(config-route-map)#set metric 100
set metric 100


R2(config)#router bgp 12
router bgp 12
R2(config-router)#nei 192.168.12.1 route-map COM in
nei 192.168.12.1 route-map COM in


!-- After applying the policy the metric changed to 100
;After applying the policy:

R2#sh ip bgp 150.1.1.0/24
BGP routing table entry for 150.1.1.0/24, version 3
sh ip bgp 150.1.1.0/24
BGP routing table entry for 150.1.1.0/24, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x800
Flag: 0x800
Not advertised to any peer
Not advertised to any peer
Local
Local
192.168.12.1 from 192.168.12.1 (192.168.127.1)
192.168.12.1 from 192.168.12.1 (192.168.127.1)
Origin IGP, metric 100, localpref 100, valid, internal, best
Origin IGP, metric 100, localpref 100, valid, internal, best ==> Metric changed to 100
Community: 1:10
Community: 1:10


= Route Aggregation =
= Route Aggregation =