{"id":1187,"date":"2019-05-25T23:51:00","date_gmt":"2019-05-25T20:51:00","guid":{"rendered":"https:\/\/isp-tech.ru\/?p=1187"},"modified":"2021-10-14T13:43:43","modified_gmt":"2021-10-14T10:43:43","slug":"juniper-configuration-tips","status":"publish","type":"post","link":"https:\/\/isp-tech.ru\/en\/juniper-configuration-tips\/","title":{"rendered":"Juniper &#8211; configuration basics."},"content":{"rendered":"\n<p>Short article about juniper configuration basics. This can be helpful for network engineers who are new to Juniper.<\/p>\n\n\n\n<p>On Junos, the configuration is stored in a shared database called a shared or global configuration database.<br>When editing the config, a candidate configuration is created, which after editing and checking for errors is applied as a working one.<br>The configuration can be edited at the same time by up to 32 users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration modes.<\/h2>\n\n\n\n<p>There are 3 configuration modes:<br><br>-configure<br>In this mode, everyone can edit config at the same time.<br>When configuration is committed by any user, all changes are applied.<br>If several users have changed same data, the latest changes will be applied.<br><br>-configure exclusive<br>Exclusive configuration. Other users cannot change anything.<br><br>-configure private<br>Each user can make changes independently.<br>If someone made changes during the configuration, you need to use the &#8220;update&#8221; command to renew the current version of the shared config database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Commiting configuration.<\/h2>\n\n\n\n<p>After you have done changes in the configuration, to apply it, you need run command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk# commit \n<\/pre><\/div>\n\n\n<p>Also, before commit, you can check the configuration for errors:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk# commit check\nconfiguration check succeeds\n<\/pre><\/div>\n\n\n<p>View the changes made before committing:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk# show | compare \n<\/pre><\/div>\n\n\n<p>You can add a comment to commit:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk# commit comment &quot;adding as-path prepend to peer&quot;\n<\/pre><\/div>\n\n\n<p>For delayed commit, for example, at 14-00, you can use timer:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk# commit at 14:00:00\n<\/pre><\/div>\n\n\n<p>To cancel scheduled commit:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk&gt; clear system commit\nPending commit cleared\n<\/pre><\/div>\n\n\n<p>To check changes in pending commit:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; highlight: [1,2,4,5,22,24]; title: ; notranslate\" title=\"\">\nrtr3-msk&gt; start shell\n% su\nPassword:\nroot@rtr3-msk:\/var\/home\/remote # cd \/config\/\nroot@rtr3-msk:\/config #zcat juniper.conf.gz &gt; 0 ; zcat juniper.conf+.gz &gt; 1 ; diff -rupP 0 1 ; rm 0 1\n--- 0   2021-10-14 13:14:24.523453000 +0300\n+++ 1   2021-10-14 13:14:24.529945000 +0300\n@@ -1,4 +1,4 @@\n-## Last changed: 2021-10-13 13:40:41 +03\n+## Last changed: 2021-10-14 13:02:59 +03\n version 19.4R3-S3.3;\n system {\n     host-name rtr3-msk;\n@@ -8,7 +8,7 @@ system {\n     commit synchronize;\n     login {\n         class remote {\n-            idle-timeout 30;\n+            idle-timeout 28;\n             permissions all;\n         }\nroot@rtr3-msk:\/config # exit\nexit\n% exit\nexit\n\n{master}\n@rtr3-msk&gt; \n<\/pre><\/div>\n\n\n<p>To test configuration, if you are not sure in results, you can use the automatic rollback function with the specified interval. In this case, the config will be canceled and rolled back after 5 minutes, if it is not confirmed by the commit command.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk# commit confirmed 5\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Rollback configuration and comparison.<\/h2>\n\n\n\n<p>To rollback the configuration, you can use the rollback functionality. Junos stores the last 49 changes.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk&gt; show system commit \n0   2019-05-25 15:41:17 GMT-3 by root via cli commit synchronize\n1   2019-05-25 15:36:45 GMT-3 by root via cli commit synchronize\n2   2019-05-25 15:30:43 GMT-3 by root via cli commit synchronize\n3   2019-05-25 14:23:45 GMT-3 by root via cli commit synchronize\n<\/pre><\/div>\n\n\n<p>You can roll back the configuration to any aviable point.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk# rollback 3\nload complete\n<\/pre><\/div>\n\n\n<p>You can also compare any rollback point to other rollback point.<br>For example, to compare the current configuration and rollback 3:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk&gt; show configuration | compare rollback 3   \n<\/pre><\/div>\n\n\n<p>To compare rollback 3 and rollback 5:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nrtr3-msk&gt; show system rollback compare 3 5\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short article about juniper configuration basics. This can be helpful for network engineers who are new to Juniper. On Junos, the configuration is stored in a shared database called a shared or global configuration database.When editing the config, a candidate configuration is created, which after editing and checking for errors is applied as a working\u2026 <span class=\"read-more\"><a href=\"https:\/\/isp-tech.ru\/en\/juniper-configuration-tips\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[11],"tags":[28,14],"class_list":["post-1187","post","type-post","status-publish","format-standard","hentry","category-general-juniper","tag-juniper-basics","tag-juniper"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Juniper configuration basics.Commit\\Rollback. - isp-tech.ru<\/title>\n<meta name=\"description\" content=\"Juniper configuration basics. CommitRollback operations. Configuration modes and database. Show and compare configurations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/isp-tech.ru\/en\/juniper-configuration-tips\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/isp-tech.ru\/#\/schema\/person\/bfc8f447cee1b54cc04a263ed0673363\"},\"headline\":\"Juniper &#8211; configuration basics.\",\"datePublished\":\"2019-05-25T20:51:00+00:00\",\"dateModified\":\"2021-10-14T10:43:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/\"},\"wordCount\":561,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/isp-tech.ru\/#\/schema\/person\/bfc8f447cee1b54cc04a263ed0673363\"},\"keywords\":[\"Juniper basics\",\"Juniper\"],\"articleSection\":[\"General\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/\",\"url\":\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/\",\"name\":\"Juniper configuration basics.Commit\\\\Rollback. - isp-tech.ru\",\"isPartOf\":{\"@id\":\"https:\/\/isp-tech.ru\/#website\"},\"datePublished\":\"2019-05-25T20:51:00+00:00\",\"dateModified\":\"2021-10-14T10:43:43+00:00\",\"description\":\"Juniper configuration basics. Commit\\\\Rollback operations. Configuration modes and database. Show and compare configurations.\",\"breadcrumb\":{\"@id\":\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/isp-tech.ru\/juniper-configuration-tips\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/isp-tech.ru\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Juniper &#8212; configuration basics.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/isp-tech.ru\/#website\",\"url\":\"https:\/\/isp-tech.ru\/\",\"name\":\"isp-tech.ru\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/isp-tech.ru\/#\/schema\/person\/bfc8f447cee1b54cc04a263ed0673363\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/isp-tech.ru\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/isp-tech.ru\/#\/schema\/person\/bfc8f447cee1b54cc04a263ed0673363\",\"name\":\"admin\",\"logo\":{\"@id\":\"https:\/\/isp-tech.ru\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Juniper configuration basics.Commit\\Rollback. - isp-tech.ru","description":"Juniper configuration basics. CommitRollback operations. Configuration modes and database. Show and compare configurations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/isp-tech.ru\/en\/juniper-configuration-tips\/","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/isp-tech.ru\/juniper-configuration-tips\/#article","isPartOf":{"@id":"https:\/\/isp-tech.ru\/juniper-configuration-tips\/"},"author":{"name":"admin","@id":"https:\/\/isp-tech.ru\/#\/schema\/person\/bfc8f447cee1b54cc04a263ed0673363"},"headline":"Juniper &#8211; configuration basics.","datePublished":"2019-05-25T20:51:00+00:00","dateModified":"2021-10-14T10:43:43+00:00","mainEntityOfPage":{"@id":"https:\/\/isp-tech.ru\/juniper-configuration-tips\/"},"wordCount":561,"commentCount":0,"publisher":{"@id":"https:\/\/isp-tech.ru\/#\/schema\/person\/bfc8f447cee1b54cc04a263ed0673363"},"keywords":["Juniper basics","Juniper"],"articleSection":["General"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/isp-tech.ru\/juniper-configuration-tips\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/isp-tech.ru\/juniper-configuration-tips\/","url":"https:\/\/isp-tech.ru\/juniper-configuration-tips\/","name":"Juniper configuration basics.Commit\\Rollback. - isp-tech.ru","isPartOf":{"@id":"https:\/\/isp-tech.ru\/#website"},"datePublished":"2019-05-25T20:51:00+00:00","dateModified":"2021-10-14T10:43:43+00:00","description":"Juniper configuration basics. Commit\\Rollback operations. Configuration modes and database. Show and compare configurations.","breadcrumb":{"@id":"https:\/\/isp-tech.ru\/juniper-configuration-tips\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/isp-tech.ru\/juniper-configuration-tips\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/isp-tech.ru\/juniper-configuration-tips\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/isp-tech.ru\/"},{"@type":"ListItem","position":2,"name":"Juniper &#8212; configuration basics."}]},{"@type":"WebSite","@id":"https:\/\/isp-tech.ru\/#website","url":"https:\/\/isp-tech.ru\/","name":"isp-tech.ru","description":"","publisher":{"@id":"https:\/\/isp-tech.ru\/#\/schema\/person\/bfc8f447cee1b54cc04a263ed0673363"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/isp-tech.ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/isp-tech.ru\/#\/schema\/person\/bfc8f447cee1b54cc04a263ed0673363","name":"admin","logo":{"@id":"https:\/\/isp-tech.ru\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/posts\/1187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/comments?post=1187"}],"version-history":[{"count":18,"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/posts\/1187\/revisions"}],"predecessor-version":[{"id":3252,"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/posts\/1187\/revisions\/3252"}],"wp:attachment":[{"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/media?parent=1187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/categories?post=1187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/isp-tech.ru\/en\/wp-json\/wp\/v2\/tags?post=1187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}