BGP community assignment to EBGP routes


Following is the topology.I am unable to assgin the community of 200:200 to the route (113.0.0.0/8) received from R1.

Please suggest what is wroing with the configuration.

R1 (AS100)========================R3(AS200)
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 bgp dmzlink-bw
 network 1.1.1.1 mask 255.255.255.255
 aggregate-address 112.0.0.0 248.0.0.0 as-set summary-only attribute-map ATT
 neighbor 155.1.13.3 remote-as 200
 neighbor 155.1.13.3 send-community both
 neighbor 155.1.13.3 soft-reconfiguration inbound
 neighbor 155.1.13.3 route-map COMM_FOR_AS60_ROUTES out
 neighbor 155.1.13.3 unsuppress-map TO_AS200
 no auto-summary

!
Rack1R1#sh ip bgp regexp _60$
BGP table version is 89, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
s>i112.0.0.0        204.12.1.254             0    100      0 54 50 60 i
s>i113.0.0.0        204.12.1.254             0    100      0 54 50 60 i

!
!

Rack1R1#sh route-map COMM_FOR_AS60_ROUTES
route-map COMM_FOR_AS60_ROUTES, permit, sequence 10
  Match clauses:
    as-path (as-path filter): 111 <-------------Match AS PATH
  Set clauses:
    community 200:200<------------- Set community
  Policy routing matches: 0 packets, 0 bytes

route-map COMM_FOR_AS60_ROUTES, permit, sequence 30
  Match clauses:
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes

Rack1R1#sh ip as-path-access-list 111
AS path access list 111
    permit _60$ <-------------routes in AS60

 

UN-SUPRESS map to advertise 112.0.0.0/8  to R3.

Rack1R1#sh route-map TO_AS200
route-map TO_AS200, permit, sequence 10
  Match clauses:
    ip address prefix-lists: LOOP113
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes

Rack1R1#sh ip prefix-list LOOP113
ip prefix-list LOOP113: 1 entries
   seq 5 permit 113.0.0.0/8

 

------------------R3--------------------------

router bgp 200
 no synchronization
 bgp always-compare-med
 bgp log-neighbor-changes
 bgp bestpath as-path ignore
 aggregate-address 10.0.0.0 255.255.252.0 summary-only
 neighbor 155.1.13.1 remote-as 100
 neighbor 155.1.13.1 send-community both
 neighbor 155.1.13.1 soft-reconfiguration inbound
 neighbor 155.1.13.1 route-map TOAS_60 in
 no auto-summary

 

Rack1R3#sh ip bgp 113.0.0.0/8
BGP routing table entry for 113.0.0.0/8, version 45
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x860
  Advertised to update-groups:
        1    2    3    4
  100 54 50 60, (received & used)
    155.1.13.1 from 155.1.13.1 (150.1.1.1)
      Origin IGP, localpref 100, valid, external, best <--------------------No community assigned.
  100 54 50 60, (received & used)
    155.1.0.5 from 155.1.0.5 (155.1.44.44)
      Origin IGP, metric 0, localpref 100, valid, internal


=======================================================================

Comments

  • Hi!

    Real gear or dynamips?

    Have you removed all Filters and tried to let your route-maps match everything? Remove the match clauses and look if the community is set.

     

    Regards!

    Markus

  • GNS....i am working on GNS.

    I have tried with  setting the community in  unsuppress-map "TO_AS200"

     then i can see the community is getting assigned to routes.

    R1==

    router bgp 100
     no synchronization
     bgp log-neighbor-changes
     bgp dmzlink-bw
     network 1.1.1.1 mask 255.255.255.255
     aggregate-address 112.0.0.0 248.0.0.0 as-set summary-only attribute-map ATT
     neighbor 155.1.13.3 remote-as 200
     neighbor 155.1.13.3 send-community both
     neighbor 155.1.13.3 soft-reconfiguration inbound
     neighbor 155.1.13.3 unsuppress-map TO_AS200
     neighbor 155.1.146.4 remote-as 100
     neighbor 155.1.146.4 route-reflector-client
     neighbor 155.1.146.4 send-community both
     neighbor 155.1.146.6 remote-as 100
     neighbor 155.1.146.6 route-reflector-client
     neighbor 155.1.146.6 send-community both
     neighbor 155.1.146.6 soft-reconfiguration inbound
     no auto-summary

    Rack1R1#sh route-map  TO_AS200
    route-map TO_AS200, permit, sequence 10
      Match clauses:
        ip address prefix-lists: LOOP113
      Set clauses:
        community 200:200
      Policy routing matches: 0 packets, 0 bytes


    Rack1R3#sh ip bgp 113.0.0.0/8
    BGP routing table entry for 113.0.0.0/8, version 69
    Paths: (2 available, best #1, table Default-IP-Routing-Table)
    Flag: 0x820
      Advertised to update-groups:
            1    2    4    5
      100 54 50 60
        155.1.13.1 from 155.1.13.1 (150.1.1.1)
          Origin IGP, localpref 200, valid, external, best
          Community: 200:200 <=========================setted
      300 100 54 50 60
        155.1.37.7 from 155.1.37.7 (150.1.77.77)
          Origin IGP, localpref 100, valid, external

  • Okay. You have two route-maps that interoperate with the routing updates to the neighbor...

     

    neighbor 155.1.13.3 route-map COMM_FOR_AS60_ROUTES out
    neighbor 155.1.13.3 unsuppress-map TO_AS200

     

    The unsuppress map comes first in my eyes. So when routes are matching this route-map they will not be influenced by any following output route-map. You can test that by removing the unsuppress map and then set the bgp community in the AS60 route-map to see if the route-map is working. Then reconfigure the unsuppress-map ... implement for example routes that have nothing to do with the network you want to equip with the communities. The community then should be still sent out. Then do it the way you did it here: The unsuppress map matches first...the route-map has no set command and the routes will not be influenced by the AS60 route-map-

     

    Maybe you can read this one here, thats quite informative:  http://ccietobe.blogspot.com/2008/06/bgp-aggregation-with-unsuppress-map.html

     

    HTH

     

    Regards!

    Markus

  • Hi Markus,

     

    Can please explin me in details....i not understaning it correctly.

     

    /Ganpat

  • Hi!
    Okay let me try to simplify that so that you can come to my idea here.


    Just do the following:

     - Configure the unsupress route-map for setting a BGP attribute like the community

     - Configure the "normal" outgoing route-map to the same neighbor with a different attribute like "as prepend".

    Check the neighbor and take a look what BGP attributes of your configured ones have been used. If it is only the community then you will know that when BGP has used the unsupress route-map for a specific update, it will not use the "normal" outgoing route-map additionally to modify something.

     

    If its not clear just tell me and dont feel ashamed in asking. Asking is the key and there are no stupid questions!

     

    Regards!

    Markus

  • Hi Ganpat,

    The packet matching criteria of route-map is similar to access-list, it starts to match from top to down and once match is made, doesn't do any further processing and you can apply only one route-map in inbound direction and only one route-map in outbound direction. If you apply multiple route-maps to same neighbor in same direction, last route-map overlaps the previous one.

    Same happening in your config, you applied one route-map to .3 neighbor and another route-map with unsupressed-map, unsupressed-map's route-map overlapped your previous route-map(community setting).

    Just try to configure within same route-map for one neighbor in one direction.

    Good Luck

  • The packet matching criteria of route-map is similar to access-list, it starts to match from top to down and once match is made, doesn't do any further processing and you can apply only one route-map in inbound direction and only one route-map in outbound direction. If you apply multiple route-maps to same neighbor in same direction, last route-map overlaps the previous one.

    Nice explanation here! Thats what I wanted to say, just missing the words and described it withhands and feet :).

     

    Regards!

Sign In or Register to comment.