cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
35849
Views
15
Helpful
7
Replies

ASR 9010 prefix-list configuration

mohamed zafar
Level 1
Level 1

I am new to ios-xr i tried configuring prefix list using

prefix-set <name> i need to give all the prefixes in a single line seperated by comma as show below

RP/0/RSP0/CPU0:ios(config)#prefix-set abc
RP/0/RSP0/CPU0:ios(config-pfx)#
RP/0/RSP0/CPU0:ios(config-pfx)#1.1.1.1/32,2.2.0.0/16,12.12.12.0/18,20.53.13.0/$
RP/0/RSP0/CPU0:ios(config-pfx)#end-set

is there any other way to configure this because creating hundreds of prefixes in a single line is very difficult and also if i need to edit how can i do that .

if i try to edit this prefix-set the old configuration is lost how to overcome this issue

7 Replies 7

xthuijs
Cisco Employee
Cisco Employee

Good question, yes there are better alternatives available!

If you are in EXEC mode you can use the keyword "edit" in order to start an editor and modify your prefix-list or route-policies.

Both these items are subject to a complete reconfig (that is wipe/replace) when you attempt to modify them via configuration.

Here an example:

RP/0/RSP0/CPU0:A9K-BNG#edit prefix-set TEST ?

  emacs   to use Emacs editor

  inline  to use command line

  nano    to use nano editor

  vim     to use Vim editor

 

Xander:

I was wondering if you could help out. I'm trying to edit a prefix set 'inline' on an ASR9k.

But for some reason it doesn't take and I'm wondering if it's format, see:

RP/0/RSP0/CPU0:XXXX#edit prefix-set test inline add 172.16.0.0/16   

Fri Dec  7 10:08:44.525 CST

[OK]

RP/0/RSP0/CPU0:XXXX#show run prefix-set test

Fri Dec  7 10:12:14.465 CST

prefix-set test

  0.0.0.0/0

  end-set

!

RP/0/RSP0/CPU0:XXXX#edit prefix-set test inline add 172.16.0.0/16

Fri Dec  7 10:12:17.301 CST

[OK]

RP/0/RSP0/CPU0:XXXX#show run prefix-set test                    

Fri Dec  7 10:12:19.949 CST

prefix-set test

  0.0.0.0/0

  end-set

!

RP/0/RSP0/CPU0:HR_AP_1#

What am i doing wrong?

Thanks in advance!

c.

It seems to be working fine 4.2.3

P/0/RSP0/CPU0:A9K-BNG#edit prefix-set MYSET inline add 1.2.3.4/32

Fri Dec  7 12:18:43.814 EDT

[OK]

Proceed with commmit (yes/no)? [yes]:

Parsing.

56 bytes parsed in 1 sec (55)bytes/sec

Committing.

Prepared commit in 0 sec

1 items committed in 1 sec (0)items/sec

Updated Commit database in 1 sec

RP/0/RSP0/CPU0:A9K-BNG#sh run prefix-set MYSET

Fri Dec  7 12:18:50.072 EDT

prefix-set MYSET

  65.1.1.0/24,

  1.2.3.4/32

end-set

Now I did find a ddts CSCtx08136 that explains the precise problem you are seeing which is fixed in 4.2.3 and 4.3.0 onwards.

So it might be the release you have is affected by the ddts referenced.

Xander

Principal Engineer, ASR9000, CCIE #6775

Cisco Systems


Got it. Thank you very much.

Xander,
Does this work when adding inline with le or ge ? I can't seem to get it to take when adding extensions
# edit prefix-set Test-NETBLOCKS-IPV4-OUT inline add 192.168.140.0/22 ?
<cr>
# # edit prefix-set Test-NETBLOCKS-IPV4-OUT inline add 192.168.140.0/22 le ?
^
% Invalid input detected at '^' marker.

Thanks

You may try to add (" ") just outside the prefix.

 

#edit prefix-set Test-NETBLOCKS-IPV4-OUT inline add "192.168.140.0/22 le xx"

Hello ,

 

 
  ,  please on what version ?