cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
334
Views
1
Helpful
11
Replies

AS prepnd for some prefix in ASR1002X

Hi want some prefix normal announe no prepend and another announce by prepend to Ebgp

I define prefix list and add normal prefix to the prefixlist for example prefix-list normal

router-map ramin permit 5

ip math normal

continue

router-map ramin permit 10

ip match prepend

set prepend last-as 6

and assing route-map to out neighbor

but this is not working

prepend.jpg

 

How Solve this ???

1 Accepted Solution

Accepted Solutions

Hi admin@atrinnet.net ,

Sorry for the previous message saying it would not work. I am doing too many things at the same time.

Your command should work. I would just recommend you do "clear bgp ipv4 unicast * soft out"  on the router connected to the Internet after doing any route-map modifications.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

11 Replies 11

Harold Ritter
Cisco Employee
Cisco Employee

Hi admin@atrinnet.net ,

Just remove the continue statement and it should work.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

In router-map IF remove continue

For example only ip math prefix-list normal

Go to other rule ?

no action define in this sequence

Work ? announce normal prefix to upstream ?

Hi admin@atrinnet.net ,

Go to other rule ?

All prefixes not matching prefix list normal automatically go to the next route-map instance. Prefixes matching prefix list normal are  accepted, but not modified.

Try something like this:

ip prefix-list normal seq 5 permit 1.1.1.0/24
ip prefix-list normal seq 10 permit 1.1.2.0/24
ip prefix-list prepend-5 seq 5 permit 1.1.3.0/24
ip prefix-list prepend-6 seq 5 permit 1.1.4.0/24
route-map ramin permit 10
match ip address prefix-list normal
route-map ramin permit 20
match ip address prefix-list prepend-5
set as-path prepend 100 100 100 100 100
route-map ramin permit 30
match ip address prefix-list prepend-6
set as-path prepend 100 100 100 100 100 100
route-map ramin deny 40

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

I define this route-map

show route-map ramin
route-map datacenter, permit, sequence 5
Match clauses:
ip address prefix-lists: normal
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map datacenter, permit, sequence 20
Match clauses:
ip address prefix-lists: prepend
Set clauses:
as-path prepend last-as 5
Policy routing matches: 0 packets, 0 bytes

Is this work?

Hi admin@atrinnet.net ,

 as-path prepend last-as 5

This statement will not work, as the as-path is empty when received from iBGP, so last-as is empty.

You should use that instead as I suggested in my previous post:

set as-path prepend 100 100 100 100 100

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

HI agian define this

route-map ramin, permit, sequence 5
Match clauses:
ip address prefix-lists: normal
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map ramin, permit, sequence 10
Match clauses:
ip address (access-lists): prepend
Set clauses:
as-path prepend 6500 6500 6500 6500
Policy routing matches: 0 packets, 0 bytes

but not working

Hi admin@atrinnet.net ,

Can you provide the prefix lists (normal and prepend) and the bgp configuration to see how you apply the route-map?

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

router bgp my as

adress family ipv4

neighbor X.X.X.X router-map ramin out

is ok???

Hi admin@atrinnet.net ,

Sorry for the previous message saying it would not work. I am doing too many things at the same time.

Your command should work. I would just recommend you do "clear bgp ipv4 unicast * soft out"  on the router connected to the Internet after doing any route-map modifications.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Are you admin of this router ?

What you share is rpl of ios xr and asr1002 run ios xe???

MHM