Making Changes to the Junos OS Configuration … Faster

Networks are complex, dynamic systems that must often be changed in order to meet new business demands, needs, or mergers. Think about it: A minor organization changes, but it cascades into headaches because you have to change every single network device to accommodate the reorganization. Well, the Junos OS has many helpful commands to shorten the time it takes to make changes in the existing configuration — that is, renaming, copying, replacing, and inserting, which I cover in the following sections.

Renaming a section of the configuration

Sometimes you may want to rename a section of the Junos configuration, for example, to alter an older naming convention to adhere to a new policy. Assume that you want to rename ge-0/0/0 to the new naming convention of ge–1/0/0. Here is the current configuration snippet:

root@host-name# show interfaces ge-0/0/0
unit 0 {
    family inet {
        address 100.100.100.1/24;
    }
}

You can rename the interface in one step with the rename command:

root@host-name# rename interfaces ge-0/0/0 to ge-1/0/0

Now, use the show command to check that the change occurred:

root@host-name# show interfaces ge-1/0/0
unit 0 {
    family inet {
        address 100.100.100.1/24;
    }
}

Copying parts of the configuration

Junos also allows you to make copies of parts of the configuration by using the copy command. For example, assume that you create a template for a local user called logintemplate, and you want to make a copy for a new ...

Get Junos® OS For Dummies®, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.