The topology is the same as in Lab01. You will be working with:
● vMX-VCP2 (Control Plane for vMX-2)
● vMX-VCP1 (Control Plane for vMX-1)
This lab introduces you to the two primary Junos configuration modes (Operational and Configuration), teaches you to navigate between them, and demonstrates two methods for reverting a Juniper device to its factory-default state. Understanding these fundamental concepts is critical for all subsequent Junos operations.
Both vMX devices should be in their default state from Lab01. If you restarted the lab topology, all devices will have factory-default configurations with root as the username and no password.
1. Open a console connection to the vMX-VCP2 device.
2. At the login: prompt, enter the username root. Since there is no password configured, simply press Enter.
3. Enter the cli command to access the Junos Operational Mode CLI.
4. Your prompt should now be root>. This indicates you are in Operational Mode.
1. From the root> prompt, enter the command:
show ?
Observe the extensive list of available show commands. Operational Mode is primarily for monitoring, troubleshooting, and viewing device status.
2. Execute the following commands to familiarize yourself with Operational Mode outputs:
● show configuration - Displays the current active configuration in hierarchical format
● show chassis hardware - Shows hardware inventory and status
● show interfaces - Displays detailed interface statistics
3. If any command output becomes too long, you can:
● Press Space to view the next page
● Press Enter to scroll line by line
● Press q (for "quit") to exit the output immediately
There are two equivalent commands to enter Configuration Mode:
1. From Operational Mode (root>), type:
configure
or
edit
2. Notice that your prompt changes to root# and you see [edit] displayed above it. This confirms you are now in Configuration Mode.
1. While still in Configuration Mode (root#), issue the command:
show interfaces
2. Compare this output with what you saw when you executed show interfaces from Operational Mode in Task 2.
Key Observation: In Configuration Mode, show interfaces displays only the interface configuration settings from the candidate configuration. In Operational Mode, the same command displays live interface statistics (packet counts, errors, status).
3. To return to Operational Mode from Configuration Mode, type:
exit
In this section, you will use a Configuration Mode method to reset vMX-VCP2 to factory defaults.
1. Ensure you are in Configuration Mode on vMX-VCP2 (root# with [edit] prompt).
2. Load the factory-default configuration template:
load factory-default
3. View the candidate configuration to see what changes were loaded:
show | compare
You should see that most configuration statements will be removed.
4. Attempt to commit these changes:
commit
Expected Result: You will receive an error similar to:
error: Cannot login user 'root' : no password set for user/class
This occurs because the factory-default configuration removes the root password, which Junos security policies prevent.
1. To resolve the commit error, configure a new root authentication password. For these labs, use uninets@123:
set system root-authentication plain-text-password
2. When prompted:
● New password: uninets@123
● Retype new password: uninets@123
3. Now commit the configuration successfully:
commit and-quit
This command commits the changes and automatically exits Configuration Mode, returning you to Operational Mode (root>).
4. Verify the device is in a basic default state:
show configuration
The output should be minimal, showing only essential system configuration.
Now you will use an alternative method to reset vMX-VCP1 to factory defaults directly from Operational Mode.
1. Open a console connection to the vMX-VCP1 device.
2. Log in with username root and the password uninets@123 (if configured from a previous lab; otherwise use no password).
3. Enter the Junos CLI: cli (you should be at root> prompt).
4. Issue the factory reset command:
request system zeroize
You will see a critical warning message:
Warning: This command will wipe all data and configuration from the device. Are you sure you want to do this? [yes,no] (no) |
6. Type yes and press Enter.
Important: The device will now reboot. This process may take 2-3 minutes. Wait patiently until you see the login prompt again.
7. Once the device reboots, log in with username root and no password.
8. Enter the Junos CLI: cli
1. Check interface configurations:
show interfaces terse | match inet
You should see that only the fxp0 management interface has an IP address (likely obtained via DHCP). None of the Gigabit Ethernet interfaces (ge-0/0/x) have IP addresses configured.
2. List available files on the device:
file list
You should see a file named basic-ospf-config.txt in the output. This is a saved configuration file that will be used in the next step.
1. Enter Configuration Mode: configure
2. Load the saved OSPF configuration file:
load override basic-ospf-config.txt
The override option replaces the entire candidate configuration with the contents of the file.
3. Commit the configuration:
commit and-quit
4. Verify the interfaces now have IP addresses:
show interfaces terse | match inet
You should now see IP addresses configured on the Gigabit Ethernet interfaces (ge-0/0/1, ge-0/0/8, etc.).
1. Junos Modes:
● Operational Mode (>): For monitoring, troubleshooting, and diagnostics. Commands here show real-time status.
● Configuration Mode (#): For making configuration changes. Commands here modify the candidate configuration.
2. Factory Default Restoration Methods:
● Configuration Mode Method (load factory-default): Loads a minimal configuration template. Requires setting a root password before commit.
● Operational Mode Method (request system zeroize): Completely wipes the device and reinstalls Junos from the internal media. More drastic but thorough.
3. Configuration Files:
● Saved configuration files (like basic-ospf-config.txt) can be loaded to quickly apply complex configurations.
● The load override command replaces the entire candidate configuration with the file contents.
Auto Image Upgrade Messages: You may see periodic messages about "Auto Image Upgrade" during these exercises. These are informational and can be ignored for lab purposes. To disable them permanently, you would need to configure:
delete chassis auto-image-upgrade and commit.
Commit Errors: Always read commit error messages carefully. They often provide specific guidance on what needs to be fixed (like the password requirement in Task 5).
Device Rebooting: The request system zeroize command causes a reboot. Never issue this command on a production device without proper authorization and understanding of the consequences.