01-30-2020 01:43 AM - edited 01-30-2020 07:04 AM
Hello all,
Im labbing a scenario with BGP communities in GNS3. im trying to set a community string inbound and then match that same set community outbound. I've created a brief diagram below showing the scenario
Thus my config on R1 as per the below:
router bgp 1 bgp log-neighbor-changes network 172.16.1.0 mask 255.255.255.252 network 172.16.1.4 mask 255.255.255.252 network 172.16.1.8 mask 255.255.255.252 network 172.16.1.12 mask 255.255.255.252 neighbor 172.16.1.2 remote-as 2 neighbor 172.16.1.2 description *** to R2 *** neighbor 172.16.1.2 send-community neighbor 172.16.1.2 soft-reconfiguration inbound neighbor 172.16.1.2 route-map RM_R1>R2 out neighbor 172.16.1.6 remote-as 3 neighbor 172.16.1.6 description *** to 3P *** neighbor 172.16.1.6 soft-reconfiguration inbound neighbor 172.16.1.6 route-map RM_3P>R1 in neighbor 172.16.1.14 remote-as 4 neighbor 172.16.1.14 description *** to R3 *** neighbor 172.16.1.14 send-community neighbor 172.16.1.14 soft-reconfiguration inbound neighbor 172.16.1.14 route-map RM_R1>R3 out
! route-map RM_3P>R1 permit 10 set community 64609:1 !
route-map RM_R1>R2 permit 10
match community 64609:1
! R1#sh ip bgp neighbors 172.16.1.6 received-routes ... Network Next Hop Metric LocPrf Weight Path * 10.53.0.0/16 172.16.1.6 0 0 3 i * 172.16.1.4/30 172.16.1.6 0 0 3 i Total number of prefixes 2
R1#sh ip bgp 10.53.0.0/16
BGP routing table entry for 10.53.0.0/16, version 9 Paths: (1 available, no best path) Not advertised to any peer Refresh Epoch 1 3, (received-only) 172.16.1.6 from 172.16.1.6 (172.16.1.6) Origin IGP, metric 0, localpref 100, valid, external rx pathid: 0, tx pathid: 0
R1#sh ip bgp route-map RM_R1>R3 R1#sh ip bgp neighbors 172.16.1.14 advertised-routes Total number of prefixes 0 R1#
it looks like the route 10.53.0.0/16 does not have the community string set in the bgp table hence it not matching in the route map nor the advertised routes, is it possible to set strings inbound? is this a limitation of the way things are processed a limitation of GNS3 or other?
Thanks
Alex
Solved! Go to Solution.
01-31-2020 07:40 AM
Hi
To match a community you should not use the community number, instead use a community-list.
ip community-list 3 permit 64609:1
route-map RM_R1>R2 permit 10
match community 3
/Mikael
01-30-2020 06:07 AM
where is router 4 connected in the diagram? and from the config it is not clear which BGP neighbor for which router
01-30-2020 07:05 AM
01-30-2020 06:25 AM
Alex
Your drawing indicates that you want to advertise differenty to R2 and R3. But the configuration posted shows it is using exactly the same route map for both neighbors. Therefore exactly the same advertisements (or lack of advertisements) to both neighbors.
HTH
Rick
01-30-2020 06:42 AM
01-31-2020 07:40 AM
Hi
To match a community you should not use the community number, instead use a community-list.
ip community-list 3 permit 64609:1
route-map RM_R1>R2 permit 10
match community 3
/Mikael
02-03-2020 02:06 AM
Thanks Mikael,
That did the trick, odd that you need to use a list and can't use a community directly even though the commands are there though?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide