In Juniper there are 2 different configurations that are on the router:
- Active Configuration
- Candidate Configuration
The active configuration is the configuration that is running on the Juniper device. This is something similar to the “running configuration” in case you come from the Cisco world.
The active configuration is always loaded on the Juniper router after being reloaded. So whenever the Juniper router is powered on or rebooted, then the active configuration will be loaded on it.
So as a summary, the active configuration is the configuration that is currently one the device.
Let’s speak about the candidate configuration before I do a LAB.
Whenever you enter to the configuration mode, a copy of the active configuration is being created on the Juniper router having a name of the candidate configuration, and when you do your configuration and commit then the candidate configuration becomes the active configuration.
Now we understand the difference between the active configuration and the candidate configuration, let’s apply this in a LAB.
I am still connected to the Juniper router via console. Let’s go to the operational mode and see the configuration there:
root> show configuration
## Last commit: 2024-02-03 18:08:55 UTC by root
version 14.1R4.8;
system {
root-authentication {
encrypted-password “$1$3hHX87WB$VlIPrcgAMz9TInBYol9.U/”; ## SECRET-DATA
}
login {
user Maher {
uid 2001;
class super-user;
authentication {
encrypted-password “$1$UPyfh6tA$1Wa78MgVEsAZf/jUqxPVY0”; ## SECRET-DATA
}
}
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
—(more)—
So my question to you is: what you see as a configuration on the operational mode, is it the active configuration or the candidate configuration?
If you said it is the active configuration, that’s the correct answer 😊 because we did not go yet to the configuration mode to have a candidate configuration created.
Let’s go to the configuration mode and say the hostname to be R1:
root> edit
Entering configuration mode
The configuration has been changed but not committed
[edit]
root# set system host-name R1
[edit]
root#
Now the question is: which of the 2 configurations has been changed, the active or the candidate? Actually it is the candidate configuration that has been changed because we can see that the router has not yet changed the hostname on its active configuration (still showing root#).
However, if we just say “show” now from the configuration mode, we will see the candidate configuration and we should see that the hostname on the candidate configuration is R1. Let’s try it
root# show
## Last changed: 2024-02-04 12:24:12 UTC
version 14.1R4.8;
system {
host-name R1;
root-authentication {
encrypted-password “$1$3hHX87WB$VlIPrcgAMz9TInBYol9.U/”; ## SECRET-DATA
}
login {
user Maher {
uid 2001;
class super-user;
authentication {
encrypted-password “$1$UPyfh6tA$1Wa78MgVEsAZf/jUqxPVY0”; ## SECRET-DATA
}
}
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
Indeed, it is showing R1 inside the candidate configuration as a hostname.
Now, to make the change of the hostname effective on the Juniper router, we need to commit our configuration then the candidate configuration is saved on the active configuration which results that the hostname will be changed. Let’s do it:
root# commit
commit complete
[edit]
root@R1#
I can see clearly after I have made commit, the name or the router has been changed successfully 😊
This is all what I wanted to show you in this lesson, hope you enjoyed it and see you in the upcoming one.
0 Comments