Thursday, August 13, 2015

Configuring JUNOS Basic Lab



Topology: 3X Qemu VMs using Olive 12.1R1.9 image.
 
1.    Setting the root authentication password.
(Note: JUNOS requires configuration of the root password before it accepts a
Commit)


Amnesiac (ttyd0)

login: root

--- JUNOS 12.1R1.9 built 2012-03-24 12:52:33 UTC
root@% cli
root> configure
Entering configuration mode

[edit]
root# set system root-authentication plain-text-password
New password:
Retype new password:

[edit]
root# commit and-quit
commit complete
Exiting configuration mode


2.    Setting the hostname
root# set system host-name R1

3.     Configuring a user account
[edit]
root@R1# set system login user ariel class super-user full-name "Ariel" authentication plain-text-password
New password:
Retype new password:

[edit]
root@R1# commit and-quit
commit complete
Exiting configuration mode

4.    Verify User Creation
(Note that the password is automatically encrypted)

root@R1> show configuration system login
user ariel {
    full-name Ariel;
    uid 2000;
    class super-user;
    authentication {
        encrypted-password "$1$vWc8xQpo$/FS7ByVPtigc5ua5S6O8Q1"; ## SECRET-DATA
    }
}

5.    SSH Configuration
[edit]
ariel@R1# set system services ssh

6.    Assigning an IP Address to an Interface

ariel@R1> show interfaces em5
Physical interface: em5, Enabled, Physical link is Up
  Interface index: 128, SNMP ifIndex: 161
  Type: Ethernet, Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps
  Device flags   : Present Running
  Interface flags: SNMP-Traps
  Link type      : Full-Duplex
  Link flags     : None
  Current address: 00:00:ab:1c:78:05, Hardware address: 00:00:ab:1c:78:05
  Last flapped   : 2015-08-13 07:04:58 UTC (01:23:13 ago)
    Input packets : 0
    Output packets: 0

(Note: In my topology, interface em5 is R1’s Ethernet port connecting to R2.)

[edit]
ariel@R1# set interfaces em5 unit 0 family inet address 10.42.12.1/24

[edit]
ariel@R1# set interfaces em4 unit 0 family inet address 10.42.13.1/24

[edit]
ariel@R1# set interfaces lo0 unit 0 family inet address 1.1.1.1/32

7.    To Verify the Interfaces IP Addresses
ariel@R1> show configuration interfaces
em4 {
    unit 0 {
        family inet {
            address 10.42.13.1/24;
        }
    }
}
em5 {
    unit 0 {
        family inet {
            address 10.42.12.1/24;
        }
    }
}
lo0 {
    unit 0 {
        family inet {
            address 1.1.1.1/32;
        }
    }
}
(Note: Apply the necessary configuration on R2 and R3)


8.    Saving the configuration
[edit]
ariel@R3# commit and-quit


9.    Test connectivity

ariel@R3> ping 10.42.13.1 rapid
PING 10.42.13.1 (10.42.13.1): 56 data bytes
!!!!!
--- 10.42.13.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.723/5.811/24.992/9.595 ms

ariel@R3> ping 10.42.23.2 rapid
PING 10.42.23.2 (10.42.23.2): 56 data bytes
!!!!!
--- 10.42.23.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.635/1.455/3.807/1.215 ms

Source: www.juniper.net  (Day One Library)

No comments:

Post a Comment