R6
route-map commun permit 10
match ip address 1
set community no-export
!
route-map commun permit 20
match ip address 4
set community no-advertise
!
route-map commun permit 30
match ip address 5
set community 200:100
!
route-map commun permit 59
set community none
!
!
access-list 1 permit 69.1.0.0 0.0.255.255
access-list 4 permit 69.3.0.0 0.0.255.255
access-list 5 permit 69.2.0.0 0.0.255.255
----------------------------
router bgp 1.301
bgp asnotation dot
bgp log-neighbor-changes
network 66.6.6.6 mask 255.255.255.255
redistribute connected route-map permit
neighbor 1.1.1.1 remote-as 101
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 send-community
neighbor 1.1.1.1 route-map commun out
----------------------------------------
R1
'R1#sh ip bgp | in 69
*> 69.1.0.0/16 6.6.6.6 0 0 1.301 ?
*> 69.2.0.0/16 6.6.6.6 0 0 1.301 ?
*> 69.3.0.0/16 6.6.6.6 0 0 1.301 ?
*> 69.4.0.0/16 6.6.6.6 0 0 1.301 ?
R1#
R1(config)#ip bgp-community new-format
R1#sh ip bgp 69.1.1.1 | in Community
Community: no-export
R1#sh ip bgp 69.2.1.1 | in Community
Community: 200:100
R1#sh ip bgp 69.3.1.1 | in Community
Community: no-advertise
R1#sh ip bgp 69.4.1.1 | in Community
R1#
----------------------------------------
router bgp 101
neighbor 3.3.3.3 route-reflector-client
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 send-community
R3
R3#sh ip bgp | in 69
*>i 69.1.0.0/16 1.1.1.1 0 100 0 1.301 ?
*>i 69.2.0.0/16 1.1.1.1 0 100 0 1.301 ?
*>i 69.4.0.0/16 1.1.1.1 0 100 0 1.301 ?
R3#
R3#sh ip bgp 69.1.0.0 | in Community
Community: no-export
R3#sh ip bgp 69.2.0.0 | in Community
Community: 200:100
R3#sh ip bgp 69.4.0.0 | in Community
R4
R4#sh ip bgp | in 69
*> 69.2.0.0/16 3.3.3.3 0 101 65837 ?
*> 69.4.0.0/16 3.3.3.3 0 101 65837 ?
R4#
R3#sh ip bgp 69.2.0.0 | in Community
Community: 200:100
Case 2:-
Now we want to advertise 69.1.0.0 to R4 and change community of 69.2.0.0 from 200:100 to 300:400
R3
****To match community , Community list is must**
ip community-list 10 permit 200:100
access-list 10 permit 69.1.0.0 0.0.255.255
route-map Commchange permit 10
match community 10
set community 300:400
!
route-map Commchange permit 20
match ip address 10
set community none
!
route-map Commchange permit 30
router bgp 101
neighbor 1.1.1.1 route-map Commchange in
R3#sh ip bgp | in 69
*>i 69.1.0.0/16 1.1.1.1 0 100 0 1.301 ?
*>i 69.2.0.0/16 1.1.1.1 0 100 0 1.301 ?
*>i 69.4.0.0/16 1.1.1.1 0 100 0 1.301 ?
R3#
R3#sh ip bgp 69.1.1.0 | in Community
No community attached now with 69.1.0.0
R3#sh ip bgp 69.2.1.0 | in Community
Community: 300:400
R3#sh ip bgp 69.4.1.0 | in Community
R3#
R4
We can see 69.1.0.0 in R4
R4#sh ip bgp | in 69
*> 69.1.0.0/16 3.3.3.3 0 101 65837 ?
*> 69.2.0.0/16 3.3.3.3 0 101 65837 ?
*> 69.4.0.0/16 3.3.3.3 0 101 65837 ?
R4#
R4#sh ip bgp 69.1.0.0
BGP routing table entry for 69.1.0.0/16, version 39
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 1
101 65837
3.3.3.3 from 3.3.3.3 (39.1.4.1)
Origin incomplete, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
R4#sh ip bgp 69.2.0.0
BGP routing table entry for 69.2.0.0/16, version 41
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 1
101 65837
3.3.3.3 from 3.3.3.3 (39.1.4.1)
Origin incomplete, localpref 100, valid, external, best
Community: 300:400
rx pathid: 0, tx pathid: 0x0
No comments:
Post a Comment