cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1076
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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

View solution in original post

11 Replies 11

Harold Ritter
Spotlight
Spotlight

Hi admin@atrinnet.net ,

Just remove the continue statement and it should work.

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Are you admin of this router ?

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

MHM

Hi Sure

ASR1002X-Ramin uptime is 13 weeks, 1 day, 2 hours, 1 minute
Uptime for this control processor is 13 weeks, 1 day, 2 hours, 4 minutes
System returned to ROM by Reload Command
System restarted at 17:23:41 UTC Wed Mar 13 2024
System image file is "bootflash:/asr1002x-universalk9_noli.16.12.08.SPA.bin"
Last reload reason: Reload Command