You are here
Home > Firewall > Jun OS Loading Configuration Files from the CLI

Jun OS Loading Configuration Files from the CLI

There are 3 types of Load Command

A. load merge is used combines the contents of new file with the existing candidate configuration file.

B. load replace is used to overwrite a specific section of the configuration.

C. load override will overwrite a complete configuration file.

[edit]

root@sysadmin# show interfaces

ge-1/0/0 {

unit 0 {

familyinet {

address 10.10.10.10/8;

}

familyiso;

}

}

[edit]

root@sysadmin# load merge interfaces

load complete

[edit]

root@sysadmin# show interfaces

ge-1/0/0 {

unit 0 {

familyinet {

address 10.10.10.10/8;

}

familyiso;

}

}

so-6/0/0 {

unit 0 {

familyinet {

address 10.10.10.20/8;

}

familyiso;

}

}

load replace

The load replace command is used to replace specified sections within the configuration file.

[edit]

root@sysadmin# show interfaces

ge-1/0/0 {

unit 0 {

familyinet {

address 10.10.10.10/8;

}

familyiso;

}

}

Contents of the IPDETAILSfile /* Replace File Content */

ge-1/0/0 {

unit 0 {

familyinet {

address172.25.25.25/16;

}

familyiso;

}

}

[edit]

root@sysadmin# load replace IPDETAILS

load complete

[edit]

root@sysadmin# show interfaces

ge-1/0/0 {

unit 0 {

familyinet {

address 172.25.25.25/16;

}

load override

The load override command is used for overwriting the complete configuration file When the load override command is used, the filename override will overwrite the candidate configuration completely.

system {

host-nameIndiaJuniper;

login {

classsuperuser-local {

permissions all;

}

usersysadmin {

uid 2006;

classsuperuser;

[edit]

root@sysadmin# load override newconfig

load complete

Here can find the change in host-name, New User Joe and Services overridden by file call newconfig.

[edit]

root@sysadmin# show

system {

host-nameUSJuniper;

login {

classsuperuser-local {

permissions all;

}

userjoe {

uid 3000;

classsuperuser;

authentication {

encrypted-password "$ /"; # SECRET-DATA

}

}

}

services {

ftp;

ssh;

telnet;

}

}

Loading Configurations from the Terminal

In the JUNOS CLI, it is also possible to enter configuration parameters in ASCII format, either by typing or pasting directly into the terminal.

The following example shows how to do this. The user joe types load override terminal and pastes the configuration into the terminal. The command will end when the user types Ctrl-d.

Note

The load command is dependant on the level of hierarchy. If you are in the middle of the hierarchy and try loading a configuration with higher-level commands in it, it will error out. Therefore, this command will ONLY run at the top level.

[edit]

root@sysadmin# load override terminal [Type ^D to end input]

system {

host-nameUSJuniper;

login {

classsuperuser-local {

permissions all;

}

userjoe {

uid 3000;

classsuperuser;

authentication {

encrypted-password "$ /"; # SECRET-DATA

}

}

}

services {

ftp;

ssh;

telnet;

}

}

load complete

Note

The terminal parameter is available with all three load commands.
 

Leave a Reply

three × five =

Top