JNCIA JunOS Lab Guide Bootcamp
JNCIA JunOS Lab Guide Bootcamp
Lab 1
User Interface Options
JUNOS Topology
Page 1
JNCIA-Junos Bootcamp
Logging In
• Jika user bukan root maka bisa langsung masuk ke mode CLI
Amnesiac (ttyd0)
login: lab
Password:
• Jika anda masuk sebagai root maka pertama anda akan masuk ke mode shell.
Untuk masuk ke mode CLI anda harus ketik cli
Amnesiac (ttyd0)
login: root
Password:
Mode CLI
• Mode Operational: digunakan untuk memonitor dan toubleshoot software,
network connectivity, dan hardware
login: lab
Password:
[edit]
lab#
Command Bantuan
• Menggunakan command “?”
lab> ?
Possible completions:
clear Clear information in the system
configure Manipulate software configuration information
file Perform file operations
help Provide help information
...
lab> clear ?
Possible completions:
arp Clear address resolution information
bfd Clear Bidirectional Forwarding Detection
information
bgp Clear Border Gateway Protocol information
cli Clear command-line interface settings
dhcp Clear DHCP information
…
Page 2
JNCIA-Junos Bootcamp
[edit policy-options]
lab#
Penggunaan | (Pipe)
• Pipe (|)digunakan untuk memanipulasi output dari sebuah command.
lab> show interfaces terse | ?
Possible completions:
count Count occurrences
display Show additional kinds of information
except Show only text that does not match a pattern
find Search for first occurrence of pattern
hold Hold text without exiting the --More-- prompt
last Display end of output only
match Show only text that matches a pattern
no-more Don't paginate output
Page 3
JNCIA-Junos Bootcamp
root@R1>
lab# commit
lab# exit
lab>
Page 4
JNCIA-Junos Bootcamp
Lab 2
Initial Configuration
Lab Topology
Initial Configuration
• Konfigurasi password root (sebaiknya diseragamkan dengan lab123)
• Konfigurasi Hostname Konfigurasi system time
• Konfigurasi Protokol remote akses
• Konfigurasi interface
Amnesiac (ttyd0)
login: root
Password:
--- JUNOS 12.1R1.9 built 2012-03-24 12:52:33 UTC
root@% cli
root> configure
root# set system root-authentication plain-text-password
New password:
Retype new password:
Page 5
JNCIA-Junos Bootcamp
root@R1>
Page 6
JNCIA-Junos Bootcamp
Lab 3
Secondary System Configuration
Lab Topology
[edit]
root@R1> configure
root@R1# edit system
root@R1# set radius-server 192.168.0.200 secret lab123
root@R1# set tacplus-server 192.168.0.200 secret lab123
root@R1# set authentication-order radius
root@R1# set authentication-order tacplus
root@R1# commit
Page 7
JNCIA-Junos Bootcamp
[edit]
root@R1# top
root@R1# set authentication-order password
root@R1# set system root-authentication plain-text-password
New password:
Retype new password:
root@R1# edit system login
root@R1# set user lab class super-user authentication plain-text-password
New password:
Retype new password:
root@R1# top
root@R1# commit
[edit]
root@R1#
Page 8
JNCIA-Junos Bootcamp
Konfigurasi Traceoptions
• Konfigurasi Traceoptions. Traceoptions digunakan untuk mengumpulkan
informasi log yang terjadi pada protocol.
root@R1# top
root@R1# edit protocols ospf
root@R1# set traceoptions file ospf-trace replace size 128k
root@R1# set traceoptions file ospf-trace files 10 no-stamp
root@R1# set traceoptions file ospf-trace no-world-readable
root@R1# set traceoptions flag event detail
root@R1# set traceoptions flag error detail
root@R1# commit
root@R1# top
root@R1#
• Monitoring Traceoptions
root@R1# top
root@R1# show protocols ospf
traceoptions {
file ospf-trace replace size 128k files 10 no-stamp no-world-readable;
flag event detail;
flag error detail;
}
[edit]
root@R1# top
root@R1# exit
root@R1> monitor start ospf-trace
root@R1>
Konfigurasi NTP
• Konfigurasi NTP
root@R1# edit system ntp
root@R1# set boot-server 192.168.0.200
root@R1# set server 192.168.0.200
root@R1# commit
root@R1# top
root@R1#
• Monitoring NTP
root@R1# top
root@R1# show system ntp
boot-server 192.168.0.200;
server 192.168.0.200;
Page 9
JNCIA-Junos Bootcamp
[edit]
root@R1#
[edit]
root@R1#
Page 10
JNCIA-Junos Bootcamp
Lab 4
Operational Monitoring and Maintenance
Lab Topology
Page 11
JNCIA-Junos Bootcamp
Page 12
JNCIA-Junos Bootcamp
• Untuk uji coba telnet ini, coba lakukan telnet melalui PC anda masing-masing
menuji router anda masing masing.
Page 13
JNCIA-Junos Bootcamp
Page 14
JNCIA-Junos Bootcamp
Lab 5
VLAN Tagging and Logical Systems
Pengalamatan: Pengalamatan pada lab berikut nya ini sangat khas dan
mempermudah student untuk memahami lebih mudah topologi kami. Misalkan anda
menghubungkan Router-1 dengan Router-2 maka IP Address yang digunakan untuk
interkoneksi antar router tersebut adalah 12.12.12.0/24, 1 mengindikasikan router-1
dan 2 mengindikasikan router-2.
Logical Systems: Logical-sytems pada juniper adalah sebuah fitur pada juniper
membentuk sebuah logika router (router virtual) didalam router fisik. Dengan ini maka
pengguna dapat membentuk banyak virtual router di dalam router fisik. Setiap logika
router akan memiliki table routing dan forwarding yang berberda bagi masing-masing
logika router. Sekarang pertanyaannya bagaimana membentuk koneksi dengan
topologi yang complex didalam router agar router tersebut dapat kita gunakan untuk
belajar?. Caranya adalah untuk interkoneksi kita dapat menggunakan vlan-tagging
untuk masing-masing interkoneksi.
root@R1> configure
root@R1# delete interfaces em0
root@R1# set interfaces em0.0 family inet address 12.12.12.1/24
root@R1# commit and-quit
Page 15
JNCIA-Junos Bootcamp
root@R1>
root@R1> configure
root@R1# delete interfaces em0
root@R1# set interfaces em0 vlan-tagging
root@R1# set interfaces em0.12 vlan-id 12
root@R1# set interfaces em0.12 family inet address 12.12.12.1/24
Page 16
JNCIA-Junos Bootcamp
Lo0.4:4.4.4.4/32
RE A0
DEFAULT OS PF A
ROUTE R4
4.0 /24 .2 4
.24.2 Em4 Em4.34
24
ISP
12.12.12.0/24 .24
Em2 34.34.34.0/24
R1 Em1.12 Em2.12 R2 Em2. 23.23
23 .23.0
/24 Em3.34
Lo0.1:1.1.1.1/32 Lo0.2:2.2.2.2/32 Em3
.23
R3
Lo0.3:3.3.3.3/32
root@R1> configure
root@olive# load factory-default
root@olive# set system host-name olive
root@olive# set system root-authentication plain-text-password
New password:
Retype new password:
Page 17
JNCIA-Junos Bootcamp
Setelah anda melakukan konfigurasi diatas dengan benar, maka dari PC anda masing-
masing dapat melakukan telnet ke masing-masing Virtual Router tersebut seolah-olah
setiap Virtual Router adalah Router Fisik yang terpisah. INGAT: ketika anda sudah
masuk ke masing-masing virtual router, anda hanya boleh melakukan konfigurasi
protocol. Penggantian IP Address hanya bisa dilakukan di Main Router. Berikut cara
telnet ke R1 untuk Router Student-1.
Contoh diatas, Masuk ke R1 pada Router Student-1. Maka jika kita coba lihat interface
pada R1 adalah sbb:
Page 18
JNCIA-Junos Bootcamp
lo0
lo0.1 up up inet 1.1.1.1 --> 0/0
R1@olive:R1>
R1@olive:R1>
Page 19
JNCIA-Junos Bootcamp
Lab 6
Routing Fundamentals
Lab Topology
Lo0.4:4.4.4.4/32
EA 0
F AR
DEFAULT OSP
ROUTE R4
4.0 /24 .24
.24.2 Em4 Em4.34
24
ISP
12.12.12.0/24 .24
Em2 34.34.34.0/24
R1 Em1.12 Em2.12 R2 Em2. 23.23
23 .23.0
/24 Em3.34
Lo0.1:1.1.1.1/32 Lo0.2:2.2.2.2/32 Em3
.23
R3
Lo0.3:3.3.3.3/32
Di Lab sebelumnya, anda sudah melakukan konfigurasi awal sehingga di Lab ini anda
tinggal mengaktifkan Routing protocol pada masing-masing router sehingga dapat
berkomunikasi satu sama lain.
Scenario kali ini, R1 bertindak sebagai ISP sementara R2, R3, dan R4 adalah client
yang berjalan diatasnya routing protocol OSPF. R2 menuju ISP (R1) menggunakan
Default Route sehingga anda harus meredistribusi Routing Protocol static pada sisi ISP
ke Routing Protocol OSPF pada sisi client.
R2@olive:R2> configure
R2@olive:R2# edit routing-options
R2@olive:R2# set static route 0.0.0.0/0 next-hop 12.12.12.1
R2@olive:R2# commit and-quit
R1@olive:R1>
Page 20
JNCIA-Junos Bootcamp
R2@olive:R2>
R3@olive:R3> configure
R3@olive:R3# edit protocols ospf area 0
R3@olive:R3# set interface lo0.3
R3@olive:R3# set interface em3.23
R3@olive:R3# set interface em3.34
R3@olive:R3# commit and-quit
R4@olive:R4> configure
R4@olive:R4# edit protocols ospf area 0
R4@olive:R4# set interface lo0.4
R4@olive:R4# set interface em4.24
R4@olive:R4# set interface em4.34
R4@olive:R4# commit and-quit
Sekarang coba anda verifikasi masing-masing router untuk memonitor apakan OSPF
sudah berhasil aktif dengan benar.
R2@olive:R2> show route protocol ospf
R2@olive:R2>
Page 21
JNCIA-Junos Bootcamp
R3@olive:R3>
R4@olive:R4>
R2@olive:R2>
Page 22
JNCIA-Junos Bootcamp
Lab 7
Routing Policy and Firewall Filters
Lab Topology
Lo0.4:4.4.4.4/32
EA 0
F AR
DEFAULT OSP
ROUTE R4
4.0 /24 .24
.24.2 Em4 Em4.34
24
ISP
12.12.12.0/24 .24
Em2 34.34.34.0/24
R1 Em1.12 Em2.12 R2 Em2. 23.23
23 .23.0
/24 Em3.34
Lo0.1:1.1.1.1/32 Lo0.2:2.2.2.2/32 Em3
.23
R3
Lo0.3:3.3.3.3/32
Pada lab sebelumnya, Router Client yang menggunakan protocol OSPF masih belum
bisa berkomunikasi dengan ISP (R1) karena Routing Protocol Static masih belum
diredistribusi kedalam protocol OSPF. Pada lab 8 ini, anda akan mempelajari
bagaimana meredistribusikan Protocol Static tersebut kedalam Protocol OSPF dengan
menggunakan Routing Policy.
R2@olive:R2# show
term 1 {
from protocol static;
then accept;
}
Page 23
JNCIA-Junos Bootcamp
Sekarang, coba anda lakukan verifikasi pada masing-masing R3 dan R4 anda akan
menerima advertise (iklan route) dari R2 sebuah default route.
R3@olive:R3> show route
R3@olive:R3>
Pada tampilan diatas terlihat routing default route sudah di redistribusi kedalam OSPF.
Sekarang anda lakukan ping dari router R3 dan R4 menuju ke Loopback Router ISP.
R3@olive:R3> ping 1.1.1.1 count 5
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=63 time=2.093 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=63 time=1.140 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=63 time=1.087 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=63 time=1.185 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=63 time=1.253 ms
R3@olive:R3>
Begitu juga, seharusnya jika anda melakukan ping dari Router ISP menuju R3 dan R4
akan berhasil.
R1@olive:R1> ping 3.3.3.3 count 10 rapid
PING 3.3.3.3 (3.3.3.3): 56 data bytes
!!!!!!!!!!
--- 3.3.3.3 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.805/0.938/1.341/0.174 ms
Page 24
JNCIA-Junos Bootcamp
R1@olive:R1>
R2@olive:R2>
^C
--- 1.1.1.1 ping statistics ---
Page 25
JNCIA-Junos Bootcamp
olive (ttyp4)
login:
Page 26
JNCIA-Junos Bootcamp
Lab 8
Challenge Lab
Lab Topology
Topologi kali ini berbeda dari sebelumnya, sehinggal protocol yang sudah anda
implementasikan dan policy firewall yang sudah di terapkan harus di hapus. Kemudian
koneksi antara R2 dan R4 boleh anda disable atau jangan di terapkan pada Routing
Protocol apapun nantinya.
Page 27
JNCIA-Junos Bootcamp
R2@olive:R2>
R2@olive:R2>
Page 28
JNCIA-Junos Bootcamp
R4@olive:R4>
R2@olive:R2# top
R2@olive:R2# set protocols ospf export rip-to-ospf
R2@olive:R2# set protocols rip group 1 export ospf-to-rip
R2@olive:R2# commit and-quit
Page 29
JNCIA-Junos Bootcamp
Jika periksa routing table pada R3 maka loopback 1.1.1.1 terlihat di R1.
R3@olive:R3> show route
R3@olive:R3>
R4@olive:R4# top
R4@olive:R4# set protocols ospf export static-to-ospf
R4@olive:R4# commit and-quit
Lakukan verifikasi pada Router R3, akan terlihat external Route dari Static Route
R3@olive:R3> show route protocol ospf
Page 30
JNCIA-Junos Bootcamp
R3@olive:R3>
Sekarang coba anda amati, jika anda berada di R4. Apakah anda dapat mencapai
R1????. Ini menarik, karena 1.1.1.1 tidak terlihat pada R4.
R4@olive:R4> show route protocol ospf
R4@olive:R4>
Page 31
JNCIA-Junos Bootcamp
Coba anda lakukan ping ke 1.1.1.1, harusnya tidak berhasil karena rute menuju 1.1.1.1
tersebut tidak terlihat.
R4@olive:R4> ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
^C
--- 1.1.1.1 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
R4@olive:R4>
Maka apa yang harus anda lakukan?. Yang perlu anda lakukan adalah meng-advertise
0/0 (default route) sebagai LSA type 7 kedalam area 1 pada R3.
R3@olive:R3# top edit protocols ospf
R3@olive:R3# set area 1 nssa default-lsa type-7 default-metric 10
R3@olive:R3# commit and-quit
Sekarang coba anda lakukan kembali verifikasi pada R4, maka akan terlihat route
0.0.0.0 menuju network yang tidak terlihat pada routing table.
R4@olive:R4> show route protocol ospf
R4@olive:R4>
Page 32