IOS-XR, Editing a prefix-set

How can I edit/modify a single line of a prefix-set in XR?

Two examples, a) how would I delete the first line ?  b) how would I edit or replace the second line?

RP/0/0/CPU0:Rack102XR2#show rpl prefix-set AS100
Thu Jan 29 01:55:33.363 UTC
prefix-set AS100
  102.0.0.0/8 ge 32,
  102.2.0.0/16 ge 32,
  102.18.18.18/32
end-set

I know I can overwrite it, but I suspect there is also an easy way to edit.

Comments

  • Thanks to Xander Thuijs  and this post:

    https://supportforums.cisco.com/discussion/11173651/asr-9010-prefix-list-configuration

     

    I found out how to easily add and remove lines via edit mode:

     

     

     

    RP/0/0/CPU0:Rack102XR2#sho rpl prefix-set

    Listing for all Prefix Set objects

     

    prefix-set AS100

      102.2.0.0/16 ge 32

    end-set

    !

     

    RP/0/0/CPU0:Rack102XR2#edit prefix-set AS100 inline ?

      add      to append set element(s) to the set

      prepend  to prepend set element(s) to the set

      remove   to remove set element(s) from the set

     

    RP/0/0/CPU0:Rack102XR2#edit prefix-set AS100 inline add 1.2.3.4/32

    [OK]

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

    Parsing.

    64 bytes parsed in 1 sec (62)bytes/sec

    Committing.

    Prepared commit in 0 sec

     

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

     

     

    RP/0/0/CPU0:Rack102XR2#sho rpl prefix-set

    Listing for all Prefix Set objects

     

    prefix-set AS100

      102.2.0.0/16 ge 32,

      1.2.3.4/32

    end-set

    !

    RP/0/0/CPU0:Rack102XR2#edit prefix-set AS100 inline add 5.6.7.8/32

    [OK]

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

    Parsing.

    80 bytes parsed in 1 sec (78)bytes/sec

    Committing.

    Prepared commit in 0 sec

     

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

     

     

    RP/0/0/CPU0:Rack102XR2#sho rpl prefix-set

    Listing for all Prefix Set objects

     

    prefix-set AS100

      102.2.0.0/16 ge 32,

      1.2.3.4/32,

      5.6.7.8/32

    end-set

    !

     

    RP/0/0/CPU0:Rack102XR2#edit prefix-set AS100 inline remove 1.2.3.4/32

    [OK]

     removing:   1.2.3.4/32

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

    Parsing.

    66 bytes parsed in 1 sec (64)bytes/sec

    Committing.

    Prepared commit in 0 sec

     

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

     

     

    RP/0/0/CPU0:Rack102XR2#sho rpl prefix-set

    Listing for all Prefix Set objects

     

    prefix-set AS100

      102.2.0.0/16 ge 32,

      5.6.7.8/32

    end-set

  • Could add with sequence? I would like to sort by IP address.
    Thank you very much.

Sign In or Register to comment.