The Adtran community holiday season is starting next week! The holiday period will span from December 21, 2024 to January 6, 2025. During this time, responses to feedback form submissions may be delayed. If you are encountering product issues, you can reach out to Adtran support at any time.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
redbarron
New Contributor III

4430 Setting Multiple BGP Attributes


I have two BGP Peers (going two same AS, one is primary link and the other is backup link) on my 4430 and I'm advertising three routes/subnets to each.  With the first peer I need to set the community on only two of the routes/subnets and on the second peer I need to set the community on two routes/subnets and set the AS Path Length on all three subnets.  Doing the first peer is straight forward, doing the second peer I can't seem to get it to complete both.  Any assistance would be greatly appreciated.

Labels (1)
0 Kudos
4 Replies
jayh
Honored Contributor
Honored Contributor

Re: 4430 Setting Multiple BGP Attributes

Can you post your configuration?  This is generally done with a route-map assigned to the neighbor. 

redbarron
New Contributor III

Re: 4430 Setting Multiple BGP Attributes

I don't have a working configuration as I'm switching from static to BGP.  I have tried route maps with ACL's and pre-fix list and achieve the same results.  The primary issue is doing an AS Path-Prepend on three routes and then trying to add a BGP community to only two of the three that I AS Path-Prepended.  I appears that I get one match and then I'm done.

Below is one of my attempts:

route-map ASPathPrepend permit 1

  set as-path prepend 1 1 1 1 1

route-map ASPathPrepend permit 2

  match ip address prefix-list BGP-OUT-COMMUNITY

  set community 20:101

route-map SET-CL-COMMUNITY permit 1

  match ip address prefix-list BGP-OUT-COMMUNITY

  set community 20:101

!

ip access-list standard BGP-OUT-COMMUNITY

  permit host 5.5.5.192

  permit host 8.8.8.32

!

router bgp 64999

  neighbor 3.7.1.125

    remote-as 20

    no shutdown

    exit

  neighbor 3.3.3.57

    remote-as 20

    no shutdown

    exit

  address-family ipv4

    redistribute static

    redistribute connected

    neighbor 3.7.1.125

      route-map BGP-OUT-COMMUNITY out

      send-community standard

      soft-reconfiguration inbound

      no shutdown

      exit

    neighbor 3.3.3.57

      route-map ASPathPrepend out

      send-community standard

      soft-reconfiguration inbound

      no shutdown

      exit

    exit

jayh
Honored Contributor
Honored Contributor

Re: 4430 Setting Multiple BGP Attributes

You probably want something like:

route-map neighbor1-out-map permit 10

  match ip address ip-group1-1-list

  set community 209:11111

  set as-path prepend 64591 64591 64591 64591 64591

route-map neighbor1-out-map permit 20

  match ip address ip-group1-2-list

  set community 209:11122

  set as-path prepend 64591 64591

route-map neighbor2-out-map permit 10

  match ip address ip-group2-1-list

  set community 209:22211

  set as-path prepend 64591

route-map neighbor2-out-map permit 20

  match ip address ip-group2-2-list

  set community 209:22222

  set as-path prepend 64591

So for your first neighbor you have the most restrictive group of IP subnets in ip-group1-1-list and you match that and apply communities and prepends as appropriate as permit statement 10.  Your next group of IP subnets would be in permit statement 20.  You could have a permit 30 with another group, and a permit 100 with no match but just set commands to do a default for everything not matched.

Duplicate the same for the second neighbor.

Apply the route-maps outbound as appropriate under the neighbors and clear ip bgp.

Route maps are processed in sequence order so the lowest sequence will be processed first, anything not matching sequence 10's match will be compared against sequence 20's match and so on.  If no match then no community or prepends will be applied.  Alternatively if you have a permit statement with just "set" statements then it will match everything not previously matched. 

I typically use 10, 20, 30 to leave gaps so if you want to insert a policy between 10 and 20 you can just configure a permit 15 without having to re-type the whole thing.

redbarron
New Contributor III

Re: 4430 Setting Multiple BGP Attributes

I was able to complete this in a abbreviated fashion based on the above.  What appeared to be the stumbling block was that any attribute that was going to be modified later in the permit lists had to be included in each series of permit list statements starting at the top in this case permit 10.  Thank you JayH for your helpful hints.