cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1131
Views
0
Helpful
2
Replies

BGP: route-map

kozorezdi
Level 1
Level 1

Hello everybody,

Please check my config:


conf t

!

route-map PEER_TEST-out permit 20
match community 1111:43071
set as-path prepend 1111
continue 50

!

...

!

route-map PEER_TEST-out permit 50
   set community 0:1111 0:2222 0:3333 0:5555 0:6666 0:7777 0:44444 0:32323 0:3599 0:77776 0:6876 0:8686 additive

!

sh run

route-map PEER_TEST-out permit 20
  match community 1111:43071
continue 50

set as-path prepend 1111

And the most important it works with a jump to 50, but without adding the prepend.

It looks like set-command will be never completed, because it goes after continue-command.

Quite often I need to modify this set of communities (0.*) and it will be hard to do it on every strings: 20, 30,40, etc.

It looks like I can't use a community-name for set community --> set community test1

ip community-list standard test1 0:1111 0:2222 0:3333 0:5555 0:6666 0:7777 0:44444 0:32323 0:3599 0:77776 0:6876 0:8686

I don't see the solution.  Please help me!

--

Thank you in advance,

Dmitry

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Dmitry,

Your config looks OK. It is interesting that the as-path prepend does not seem to have any effect. Can you show us the relevant portion of the command show route-map PEER_TEST-out please? Also, how is the route-map used - for inbound or outbound policy? Can you also perform the appropriate show ip bgp X.X.X.X on the appropriate router to see that the route-map really did not have any effect on the AS_PATH?

Best regards,

Peter

View solution in original post

2 Replies 2

Peter Paluch
Cisco Employee
Cisco Employee

Hi Dmitry,

Your config looks OK. It is interesting that the as-path prepend does not seem to have any effect. Can you show us the relevant portion of the command show route-map PEER_TEST-out please? Also, how is the route-map used - for inbound or outbound policy? Can you also perform the appropriate show ip bgp X.X.X.X on the appropriate router to see that the route-map really did not have any effect on the AS_PATH?

Best regards,

Peter

   Hi Peter,

thank you very much for your post. you motivated me to check everything again

first of all, i am using this route-map for out only.  my mistake was using the construction:

match community instead of match community .

so now it is working (only prefixes with cust-routes or internal-routes will be permited and it checks for deny or add some prepends):

ip bgp-community new-format
ip community-list standard no-test permit 9000:43070

ip community-list standard test-one permit 9000:43071
ip community-list standard test-two permit 9000:43072
ip community-list standard test-three permit 9000:43073

ip community-list standard cust-routes permit 9000:4410
ip community-list standard cust-routes permit 9000:4420
ip community-list standard cust-routes permit 9000:4430
ip community-list standard internal-routes permit 9000:4510
ip community-list standard internal-routes permit 9000:4520
ip community-list standard internal-routes permit 9000:4530

!
!        
route-map TEST-out deny 10
match community no-test
!
route-map TEST-out  permit 20
match community test-one
continue 50
set as-path prepend 9000
!
route-map TEST-out  permit 30
match community test-two
continue 50
set as-path prepend 9000 9000
!
route-map TEST-out  permit 40
match community test-three
continue
set as-path prepend 9000 9000 9000
!
route-map TEST-out  permit 50
match community cust-routes internal-routes
set community 0:2854 0:6820 0:6858 0:12555 0:13062 0:16020 0:20807 0:34898 0:3565 additive
!

Thank you very much for your questions! Have a nice day!

Review Cisco Networking products for a $25 gift card