1. Configuring Hostname of the device: The hostname of a device is its identification. A router or switch must have its identity established to be accessible on the network to other devices. That is perhaps the most important reason to have a hostname, but a hostname has other purposes: Junos OS uses the configured hostname as part of the command prompt, to prepend log files and other accounting information, as well as in other places where knowing the device identity is useful. We recommend that the hostname be descriptive and memorable. We can configure the hostname at the [edit system] hierarchy level.
The following example configures hostname of router R1 as "juniper1"
step1 : Enter into configuration mode
user@R1>configure
[edit]
step 2 : Enter into system hierarchy mode
user@R1#edit system
[edit system]
step 3 : set the hostname as "juniper1"
user@R1#set host-name juniper1
[edit system]
2. Configure name-server on our juniper device: The command 'set system name-server' configures DNS servers to resolve hostnames, we use the set system name-server command.
Ex:
step1 : Enter into configuration mode
user@R2>configure
[edit]
step 2 : Enter into System hierarchy mode
user@R2#edit system
[edit system]
step 3 : set the name server address as 192.168.201.1
user@R2#set name-server 192.168.201.1
[edit system]
3. Configuring Hold-down Timer: Hold-time value is used to damp interface transitions. When an interface goes from up to down, it is not advertised to the rest of the system as being down until it has remained down for the hold-time period. Similarly, an interface is not advertised as being up until it has remained up for the hold-time period.
step1 : Enter into configuration mode
user@R1>configure
[edit]
step 2 : Move to so-0/0/0 interface hierarchy mode
user@R1#edit interfaces so-0/0/0
[edit interfaces so-0/0/0]
step 3 : Set the holdtime value of 200 milliseconds to use when an interface transitions from down to up and holdtime value of 200 milliseconds to use when an interface transitions from up to down .
user@R1#set hold-time up 200
down 200
[edit interfaces so-0/0/0]
4. We use 'delete' command to delete the configuration from our juniper devices. This command is used in configuration mode either to delete a particular configuration statement or completely delete the entire configuration. We use delete command to remove the variables from the configuration.
For example : root@root # delete system radius-server 172.30.10.1
Example: To delete the static route destined for address 192.168.1.0/24 with a next-hop address 192.168.1.1. The command is
delete routing-options static route 192.168.1.0/24 next-hop 192.168.1.1
5. The command "load override common", compares the results of the load override command with the common file that we saved earlier.
6. To configure encrypt password on router: Configuring the root password on your Junos OS-enabled router helps prevent unauthorized users from making changes to your network. The root user (also referred to as superuser) has unrestricted access and full permissions within the system, so it is crucial to protect these functions by setting a strong password when setting up a new router. After a new router is initially powered on, you log in as the user root with no password. Junos OS requires configuration of the root password before it accepts a commit operation. On a new device, the root password must always be a part of the configuration submitted with your initial commit.
step1 : Enter into configuration mode
user@R1>configure
[edit]
step 2 : Move to the root-authentication hierarchy
user@R1#edit system root-authentication
[edit system root-authentication]
step 3 : Set the encrypted password as 24adr3e
user@R1#set encrypted-password
24adr3e
[edit system root-authentication]
7. Configure the device interface to shutdown state: By default, an interface will be in upstate. We need to issue disable command to bring-down the interface. We can disable a physical interface, marking it as being down, without removing the interface configuration statements from the configuration. To do this, include the disable statement at the [edit interfaces interface-name] hierarchy level
step1 : Enter into configuration mode
user@R1>configure
[edit]
step 2 : Move to so-0/0/0 interface hierarchy mode
user@R1#edit interfaces so-0/0/0
[edit interfaces so-0/0/0]
step 3 : Bring the so-0/0/0 to no shutdown state(disable)
user@R1#set disable
[edit interfaces so-0/0/0]
8. To configure ppp enacapsulation: When we configure a point-to-point encapsulation (such as PPP or Cisco HDLC) on a physical interface, the physical interface can have only one logical interface (that is, only one unit statement) associated with it. When you configure a multipoint encapsulation (such as Frame Relay), the physical interface can have multiple logical units, and the units can be either point-to-point or multipoint.
step1 : Enter into configuration mode
user@R1>configure
[edit]
step 2 : Move to so-0/0/0 interface hierarchy mode
user@R1#edit interfaces so-0/0/0
[edit interfaces so-0/0/0]
step 3 : set the encapsulation as ppp
user@R1#set encapsulation ppp
[edit interfaces so-0/0/0]
9. The juniper devices are powered off using "request system power-off" command. We must write this command staying on operational mode hierarchy
10. The command used to copy the JUNOS software into the hardware is 'request system snapshot'. To successfully boot the router from the hard drive, you first need to copy the JUNOS software and other critical files to it with the request system snapshot command.
11 The command used to set the generated route is: The 'set routing-options generate route' command on the configuration mode hierarchy helps us in configuring the generated routes on our junos device. Unlike static route, it doesn't have the next hop option
12 To configure the description of the interface
The description to an interface is set by using set description command
Step 1 : 1. Enter into configuration mode of R3
user@R1>configure
[edit]
step 2 : Enter into so-0/0/0 interface configuration mode
user@R1#edit interfaces so-0/0/0
[edit interfaces so-0/0/0]
step 3 : Set the description of interface so-0/0/0 as "interface-so-0/0/0"
user@R1#set description "interface-so-0/0/0"
[edit interfaces so-0/0/0]
13. Command syntax to configure IP address of a particular interface's: The 'set interfaces <interface-name> unit 0 family inet address <address>' command configures IPv4 address to a particular interface. This command is executed in configuration mode of Junos CLI.
Example: set interfaces ge-0/0/0 unit 0 family inet address
192.168.1.1/24
configures the ge-0/0/0 interface with ip address as 192.168.1.1/24
14. To configure Keepalive intervals
Syntax: keepalives <interval seconds> <down-count number> <up-count number>
Sending of keepalives is enabled by default. The default keepalive interval is 10 seconds for PPP, Frame Relay, or Cisco HDLC. The default down-count is 3 and the default up-count is 1 for PPP or Cisco HDLC.
Example:
step1 : Enter into configuration mode
user@R1>configure
[edit]
step 2 : Move to so-0/0/0 interface hierarchy mode
user@R1#edit interfaces so-0/0/0
[edit interfaces so-0/0/0]
step 3: Set keepalive interval as 40 ,down count as 30 and up count as 20 of interface so-0/0/0
user@R1#set keepalives 40 30 20
[edit interfaces so-0/0/0]
Additional Initial Configuration elements:
NTP: The Network Time Protocol (NTP) is used to synchronize the time of a computer client or server to another server or reference time source. We enable NTP client or server within the [edit system ntp] hierarchy.
By default, network time synchronization is unauthenticated. The system will synchronize to whatever system appears to have the most accurate time. To authenticate other time servers, include the trusted-key statement at the [edit system ntp] hierarchy level. Only time servers transmitting network time packets that contain one of the specified key numbers and whose key matches the value configured for that key number are eligible to be synchronized to. Other options are not appropriate.
SNMP: By default, SNMP is disabled on devices running Junos OS. We must enable SNMP on our device by including configuration statements at the [edit snmp] hierarchy level. SNMP is Simple Network Management Protocol. By default, SNMP is disabled in juniper devices. We must enable it and configure it in '[edit snmp]' hierarchy in operational mode
Syslog: Syslog is a standard for computer message logging. It permits separation of the software that generates messages from the system that stores them and the software that reports and analyzes them. In juniper we configure it in [edit system syslog] hierarchy. Syslog messages on juniper devices can be seen using 'show log messages' command in operational mode hierarchy.
Juniper Configuration Hierarchy:
[edit] root@show system { host-name hostname; domain-name domain.name; backup-router address; root-authentication { (encrypted-password "password" | public-key); ssh-dsa "public-key"; ssh-ecdsa "public-key"; ssh-rsa "public-key"; } name-server { address; } interfaces { fxp0 { unit 0 { family inet { address address; } } } } }