Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
IJOS-12a-guide_pdf / IJOS-12.a_LGD (Detailed Lab Guide).pdf
Скачиваний:
379
Добавлен:
11.04.2015
Размер:
1.51 Mб
Скачать

Introduction to the Junos Operating System

STOP

Wait for your instructor before you proceed to the next part.

Part 2: Saving, Displaying, Loading, and Deleting a Rescue Configuration

In this lab part, you will save, display, load, and delete a rescue configuration using the Junos CLI.

Step 2.1

Enter configuration mode and load the lab2-part2-start.config file from the/var/home/lab/ijos/ directory. This will return the lab to its original state and reestablish the lab user. Commit your configuration and return to operational mode when complete.

root@srxA-1> configure

[edit]

root@srxA-1# load override /var/home/lab/ijos/lab2-part2-start.config load complete

[edit]

root@srxA-1# commit and-quit commit complete

Exiting configuration mode

root@srxA-1>

Step 2.2

Log out of the root user by issuing the exit command twice, then log in as the lab user using lab123 as the password.

root@srxA-1> exit

root@srxA-1% exit logout

srxA-1 (ttyu0)

login: lab Password:

--- JUNOS 12.1R1.9 built 2012-03-24 12:12:49 UTC lab@srxA-1>

Step 2.3

Save the active configuration as the rescue configuration.

lab@srxA-1> request system configuration rescue save

Step 2.4

Display the contents of the recently saved rescue configuration.

www.juniper.net

Initial System Configuration (Detailed) • Lab 2–13

Introduction to the Junos Operating System

lab@srxA-1> file show /config/rescue.conf.gz

## Last changed: 2012-04-17 20:11:13 PDT version 12.1R1.9;

system {

host-name srxB-1;

time-zone America/Los_Angeles; root-authentication {

encrypted-password "$1$KI99zGk6$MbYFuBbpLffu9tn2.sI7l1"; ssh-dsa "ssh-dss

AAAAB3NzaC1kc3MAAACBAMQrfP2bZyBXJ6PC7XXZ+MzErI8Jl6jah5L4/

O8BsfP2hC7EvRfNoX7MqbrtCX/9gUH9gChVuBCB+ERULMdgRvM5uGhC/

gs4UX+4dBbfBgKYYwgmisM8EoT25m7qI8ybpl2YZvHNznvO8h7kr4kpYuQEpKvgsTdH/

Jle4Uqnjv7DAAAAFQDZaqA6QAgbW3O/

zveaLCIDj6p0dwAAAIB1iL+krWrXiD8NPpY+w4dWXEqaV3bnobzPC4eyxQKBUCOr80Q5YBlWXVBHx9e

lwBWZwj0SF4hLKHznExnLerVsMuTMA846RbQmSz62vM6kGM13HFonWeQvWia0TDr78+rOEgWF2KHBSI

xL51lmIDW8Gql9hJfD/Dr/

NKP97w3L0wAAAIEAr3FkWU8XbYytQYEKxsIN9P1UQ1ERXB3G40YwqFO484SlyKyYCfaz+yNsaAJu2C8

UebDIR3GieyNcOAKf3inCG8jQwjLvZskuZwrvlsz/xtcxSoAh9axJcdUfSJYMW/ g+mD26JK1Cliw5rwp2nH9kUrJxeI7IReDp4egNkM4i15o= configurator@server1.he";

}

login {

user lab { uid 2000;

class super-user; authentication {

encrypted-password "$1$84J5Maes$cni5Hrazbd/IEHr/50oY30";

}

}

}

services { ssh; telnet;

web-management { http {

interface ge-0/0/0.0;

}

https { system-generated-certificate; interface all;

}

}

}

syslog {

file messages { any critical;

authorization info;

}

file interactive-commands { interactive-commands any;

}

}

}

interfaces { ge-0/0/0 {

description "MGMT Interface - DO NOT DELETE";

Lab 2–14 • Initial System Configuration (Detailed)

www.juniper.net

Introduction to the Junos Operating System

unit 0 {

family inet {

address 10.210.35.133/26;

}

}

}

}

routing-options { static {

route 10.210.0.0/16 next-hop 10.210.35.130;

}

}

Question: Does the rescue configuration match the recently created active configuration?

Answer: Yes, the rescue configuration should match the recently created active configuration.

Question: What CLI command could you issue to compare the active and rescue configuration files?

Answer: Use the file compare files / config/juniper.conf.gz /config/ rescue.conf.gz command to compare the active and rescue configurations. As shown in the following sample capture, the files do not contain any differences:

lab@srxA-1> file compare files /config/juniper.conf.gz /config/rescue.conf.gz

Step 2.5

Return to configuration mode and delete the [edit system services] hierarchy level. Activate the change.

lab@srxA-1> configure Entering configuration mode

[edit]

lab@srxA-1# delete system services

[edit]

lab@srxA-1# commit commit complete

[edit] lab@srxA-1#

Step 2.6

Verify that the [edit system services] hierarchy level is empty and then load the rescue configuration.

www.juniper.net

Initial System Configuration (Detailed) • Lab 2–15

Introduction to the Junos Operating System

[edit]

lab@srxA-1# show system services

[edit]

lab@srxA-1# rollback rescue load complete

Step 2.7

Verify that the [edit system services] hierarchy level once again contains the ssh, telnet, and web-management services.

[edit]

lab@srxA-1# show system services ssh;

telnet; web-management {

http {

interface ge-0/0/0.0;

}

https { system-generated-certificate; interface all;

}

}

Question: Did the rescue configuration successfully load? Are the services enabled now? If not, why not?

Answer: Yes, the rescue configuration loaded successfully and restored the statements at the

[edit system services] hierarchy level. However, the software did not enable the services. Remember, to enable the rescue configuration, or any other candidate configuration, you must commit!

Step 2.8

Activate the rescue configuration and return to operational mode.

[edit]

lab@srxA-1# commit and-quit commit complete

Exiting configuration mode

lab@srxA-1>

Step 2.9

Delete the rescue configuration and attempt to display the rescue.conf.gz file to confirm the deletion.

Lab 2–16 • Initial System Configuration (Detailed)

www.juniper.net