ā04-19-2011 10:00 PM
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
ā07-21-2011 10:56 AM
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
ā12-07-2012 08:13 AM
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.
ā12-07-2012 08:23 AM
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
ā12-07-2012 08:39 AM
Got it. Thank you very much.
ā04-13-2018 12:41 PM
ā06-22-2018 01:14 AM
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"
ā07-06-2018 04:27 AM - edited ā07-06-2018 04:29 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide