Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Thu Dec 07, 2023 7:51 am


Author Message
mandrei99
Post  Post subject: Junos: How to show uncommitted changes and cancel them  |  Posted: Wed Sep 25, 2013 7:30 am

Joined: Tue Aug 04, 2009 9:16 am
Posts: 250

Offline
 

Junos: How to show uncommitted changes and cancel them

Unlike other vendors CLI, Junos offers the possibility to enter multiple changes / commands and commit at the end, assuming all command are valid.

To check what has been changed, but uncommited in Junos configuration, go to cli top to be sure you inspect the whole hierarchy and do "show | compare". This will show the candidate configuration (I will discuss this later) and compare it to current commited configuration.

Example:
Code:
[edit security screen ids-option internet]
User@Host# top     

[edit]
User@Host# show | compare
[edit security screen ids-option internet tcp syn-flood]
+       white-list asdf {
+           source-address 1.1.1.1/32;
+           destination-address 2.2.2.2/32;
+       }

[edit]
User@Host# rollback 0
load complete

[edit]
User@Host# show | compare   

[edit]
User@Host#


The output is similar to the output from Unix "diff" command. + lines were added and new configuration was not commited.

Obviously, - lines mark linkes of configuration that have been removed from candidate and not yet commited.
Code:
[edit]
User@Host# delete interfaces ge-0/0/0 

[edit]
User@Host# show | compare
[edit interfaces]
-   ge-0/0/0 {
-       gigether-options {
-           802.3ad ae0;
-       }
-   }

The "rollback 0" will delete the candidate configuration, canceling any changes done to it.





Top
mandrei99
Post  Post subject: Re: Junos: How to show uncommitted changes and cancel them  |  Posted: Wed Sep 25, 2013 7:31 am

Joined: Tue Aug 04, 2009 9:16 am
Posts: 250

Offline
P.S.: "rollback" can be done only from the top of configuration.


Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Junos: How to show uncommitted changes and cancel them"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. MTR / My traceroute in Junos

mandrei99

1

7146

Mon Oct 10, 2016 5:54 am

barrel View the latest post

There are no new unread posts for this topic. Juniper - Junos 11.4R8 based Olive

mandrei99

1

5737

Tue Jun 18, 2013 5:36 am

mandrei99 View the latest post

There are no new unread posts for this topic. Junos: How to list routing table IDs

admin

0

3650

Sat Jan 17, 2015 3:53 pm

admin View the latest post

There are no new unread posts for this topic. Juniper SRX / Junos rescue configuration is not set

mandrei99

0

8311

Mon Feb 16, 2015 11:42 am

mandrei99 View the latest post

There are no new unread posts for this topic. Junos - How to limit arguments to ping CLI command

mandrei99

1

2818

Thu Jun 27, 2013 4:04 am

admin View the latest post

There are no new unread posts for this topic. Junos: ping: invalid routing instance `RI0'

mandrei99

0

5099

Fri Jan 03, 2014 10:11 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to search junos configuration option within cli help apropos

mandrei99

0

2736

Mon Jan 12, 2015 12:34 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Junos system configuration archival is not working over scp

mandrei99

0

8088

Thu Jan 01, 2015 4:06 am

mandrei99 View the latest post

There are no new unread posts for this topic. Junos: How to increase the number of configuration rollbacks

admin

0

4300

Wed Nov 05, 2014 11:00 am

admin View the latest post

There are no new unread posts for this topic. Junos: How to disconnect idle ssh connections in configuration mode - Juniper SRX

mandrei99

0

28764

Tue May 14, 2013 5:40 am

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 1 guest
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO