Showing posts with label Junos. Show all posts
Showing posts with label Junos. Show all posts

JUNOS ANNOTATE

A great way to add your own comments to any part of a Junos config.

Let say we have this DHCP config...


services {
        ssh;
        telnet;
        xnm-clear-text;
        web-management {
            http {
                interface vlan.7;
            }
            https {
                system-generated-certificate;
                interface vlan.7;
            }
        }
        dhcp {
            pool 10.1.1.0/24 {
                address-range low 10.1.1.101 high 10.1.1.254;
                default-lease-time 86400;
                domain-name company.com;
                router {
                    10.1.1.1;
                }
            }


And we wish to place some kind of comment on the DHCP pool as there is no description statement associated with DHCP.

Load hierarchical config

You can, if you want, load hierarchical config directly under the edit prompt if you have such a piece of config. For example you just want to copy a section of config you already have working from one device to another or maybe you want to copy a piece of config you have seen.

Here we copy a user definition into another device using the load merge command.
Also note the use of the "relative" keyword as we are not loading at the top of the hierarchy