BGP: Difference between revisions
Content added Content deleted
Line 221: | Line 221: | ||
*Configuration |
*Configuration |
||
;R1 Config: |
|||
<pre> |
<pre> |
||
ip bgp-community new-format |
ip bgp-community new-format |
||
Line 233: | Line 234: | ||
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> |
||
;R2 Config(Before applying any policies): |
|||
<pre> |
|||
router bgp 12 |
|||
nei 192.168.12.1 remot 12 |
|||
sh ip bgp 150.1.1.0 |
|||
BGP routing table entry for 150.1.1.0/24, version 2 |
|||
Paths: (1 available, best #1, table Default-IP-Routing-Table) |
|||
Flag: 0x820 |
|||
Not advertised to any peer |
|||
Local |
|||
192.168.12.1 from 192.168.12.1 (192.168.127.1) |
|||
Origin IGP, metric 0, localpref 100, valid, internal, best |
|||
Community: 1:10 |
|||
</pre> |
|||
!-- Match the community using a standard community-list |
|||
R2(config)#ip community-list 1 permit 1:10 |
|||
R2(config)#route-map COM |
|||
R2(config-route-map)#match community 1 |
|||
R2(config-route-map)#set metric 100 |
|||
R2(config)#router bgp 12 |
|||
R2(config-router)#nei 192.168.12.1 route-map COM in |
|||
!-- After applying the policy the metric changed to 100 |
|||
R2#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) |
|||
Flag: 0x800 |
|||
Not advertised to any peer |
|||
Local |
|||
192.168.12.1 from 192.168.12.1 (192.168.127.1) |
|||
Origin IGP, metric 100, localpref 100, valid, internal, best |
|||
Community: 1:10 |
|||
= Route Aggregation = |
= Route Aggregation = |