Junos OS

last person joined: 5 days ago 

Ask questions and share experiences about Junos OS.
Expand all | Collapse all

show compare as display set

  • 1.  show compare as display set

     
    Posted 12-09-2015 03:23

    Is there a way to display show | compare in display set format?

     

    Doesn't look like there is, but would like to know if there's another way of doing it.

     

    show | compare rollback 1 | display ?
    Possible completions:
      changed              Tag changes with junos:changed attribute (XML only)
      commit-scripts       Show data after commit scripts have been applied
      detail               Show configuration data detail
      inheritance          Show inherited configuration data and source group
      omit                 Emit configuration statements with the 'omit' option
      rfc5952              Display IPv6 addresses as per RFC 5952 specifications



  • 2.  RE: show compare as display set

     
    Posted 12-09-2015 03:26

    Not possble.

     

    But why do you need this? Maybe there is another way to achieve what you want?


    =====

    If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.



  • 3.  RE: show compare as display set

     
    Posted 12-09-2015 03:30

    t's for documentation purposes, just to make it easier to read. 



  • 4.  RE: show compare as display set

    Posted 01-11-2017 23:51

    just documentation? after see "show compare" can make "rolback xx" and then "show | display set". Maybe it help you



  • 5.  RE: show compare as display set

    Posted 01-30-2018 01:45

    Simple answer is, with current implemetation this is not possible.

    However, if your requirement is to make similar changes on another router. You can use show |compare and copy the difference and use "load patch terminal" to paste the changes on another router. Here is an example.

     

     

    lab@jtac-mx480-PE1# show |compare rollback 1
    [edit firewall filter GOLD term CFLOWD then]
    ! inactive: sample;

    [edit]

     

     

    lab@jtac-mx240dc-PE2-# load patch terminal
    [Type ^D at a new line to end input]
    [edit firewall filter GOLD term CFLOWD then]
    ! inactive: sample;-
    load complete

    [edit]
    lab@jtac-mx240dc-PE2#



  • 6.  RE: show compare as display set

    Posted 06-04-2018 10:54

    For such a simple request, this is a real pain. Yes, using the patch is perfectly acceptable and easy enough - but sometimes 'set' commands are preferred for a number of reasons.

     

    the easiest way I've come up with is to do this is to do the following

    >show configuration | no-more | display set

    copy your production config into excel

    make your config changes, then from config mode

    #show | no-more | display set

    copy your candidate config into the same excel worksheet below existing config

     

    from excel >data>remove duplicates

     

    this will perform the delta and all that will be left will be the set commands for the candidate configuraiton. THIS WILL NOT INCLUDE DELETE COMMANDS

     

    You can use any spreadsheet app to accomplish the same - if you want to learn something neat and perform this entire function on your juniper box then know that the junos supports awk at the shell level and it can be used to do this as well.

     

    if you are not familiar with awk then i suggest googling around for its usefullness and examples.



  • 7.  RE: show compare as display set

    Posted 02-23-2020 02:20

    Hi,

     

    Any update on this issue? I mean if the feature is available.

     

    Thanks.



  • 8.  RE: show compare as display set

     
    Posted 02-23-2020 06:01

    Hi Zahid

     

    This feature of show | compare in set format is not available in current implementation.

    However you can use the load patch terminal to achieve the same if you want to use the same configuration on different nodes. Also you can commit the configuration on one node and then take the set format and use it across different cli.

     

    Hope this helps



  • 9.  RE: show compare as display set

    Posted 01-08-2017 07:37

    This is needed for example if you made a change and you want to duplicate it to many devices.



  • 10.  RE: show compare as display set

    Posted 01-09-2017 18:14

    Hi,

     

    If you have a strong supporting reason(as you mentioned below) to have this "show | compare | display set" option, you can probably reach out to your Juniper account team to check internally on whether it is possible to do such an enhancement in future releases.

     

    Thanks

    Sarathi



  • 11.  RE: show compare as display set

     
    Posted 01-09-2017 18:20

    That is TRUE as sarathirao stated. The cli expected from your end is not available in the Junos for now. However, if you have strong Business case the same can be added in future Junos. The Juniper accounts team will be the right channel for the same.

     



  • 12.  RE: show compare as display set

     
    Posted 02-23-2020 08:36

    Hi Ybenari,

    If you want add similar configuration on multiple device following would help:

    Device#1: show | compare    << copy the output

    Device#2 load patch terminal << paste it on other device

    Example

    device1# set interfaces ge-0/0/0 description test

    device1# show | compare  << copy the output
    [edit interfaces ge-0/0/0]  
    + description test;


    device2# load patch terminal  < paste it here
    [Type ^D at a new line to end input]
    [edit interfaces ge-0/0/0]
    + description test;

    load complete


    labroot@android-re0# show | compare
    [edit interfaces ge-0/0/0]
    + description test;


    PS: Please accept my response as solution if it answers your query, kuods are appreicated too!

    Thanks
    Vishal



  • 13.  RE: show compare as display set

     
    Posted 01-23-2017 23:20

    Can you let me know if there is a valid customer use case/requirement for this enhancement?



  • 14.  RE: show compare as display set

    Posted 01-29-2018 07:39

     

    Let's suppose I know how to do something in Jweb and the next time I do a similar change I would like to script it.  I could

     

    1. Make the changes in Jweb and commit

    2. Dump the changes in display set format

    3. Add this to my knowledgebase so that the next time I do similar work I can script it

     

     

     



  • 15.  RE: show compare as display set

     
    Posted 01-29-2018 08:25

    Not sure if below workaround helps.

     

    TEST# show | compare rollback 1
    [edit system services]
    + web-management {
    + http {
    + port 1234;
    + }
    + }


    TEST# run show log interactive-commands | match "set system"
    Jan 29 21:41:43.039 TEST mgd[75843]: UI_CMDLINE_READ_LINE: User 'labroot', command 'set system services web-management http port 1234 '

     

    Regards,

    Rahul