Lompat ke konten Lompat ke sidebar Lompat ke footer

Konfigurasi Logical System pada Junos OS Juniper

Junos Logical Systems

Logical System memungkinkan kita untuk mempartisi satu perangkat menjadi beberapa perangkat logical yang melakukan tugasnya secara independen dan terisolasi.

Setiap logical systems akan dianggap sebagai sistem atau perangkat yang berbeda, sehingga jika terjadi error di satu logical system tidak mempengaruhi logical system lain. Dan setiap logical system juga memiliki konfigurasi, routing table, dan forwarding table, yang berbeda.

Daftar Isi

Kenapa ada logical systems?

Selama bertahun-tahun, orang menganggap router adalah hanya satu perangkat fisik yang terdiri dari power supply, routing hardware and software, forwarding hardware and software, dan interface fisik.

Dengan Junos OS, kita dapat mempartisi satu router atau switch menjadi beberapa perangkat logical yang melakukan routing secara independen.

Secara tradisional, desain jaringan service provider memerlukan banyak lapisan switch dan router. Seperti yang terlihat pada gambar berikut, core device terhubung ke access device, kemudian access device dihubungkan ke edge device. Total kita membutuhkan 8 perangkat fisik.

Dengan adanya logical system, kita bisa saja menggabungkan semua layer tersebut di 1 perangkat fisik yang sama dengan 8 logical system.

Apakah logical system memiliki fitur yang sama seperti perangkat fisik?

Logical system memiliki fitur yang sama seperti perangkat fisik, bisa routing atau switching, tunneling, dll sebagaimana perangkat fisik. Untuk melihat protokol apa saja yang didukung di Junos logical system, cek di Junos OS Features That Are Supported on Logical Systems

Logical Systems System Requirements

Software Requirements: Junos 12.1 atau lebih baru Hardware Requirements: Juniper M Series, MX Series, PTX Series, T Series routers, EX Series switchs.

Logical Systems Operations and Restrictions

  • Dalam 1 perangkat hanya boleh memiliki maksimal 15 logical systems.
  • Tidak medukung out-of-band management interface, seperti em0 atau fxp0.
  • Class of service (CoS) tidak didukung di interface logical tunnel (lt) atau virtual loopback tunnel (vlt).
  • Selengkapnya: Logical Systems Operations and Restrictions

Untuk memulai belajar logical system, saya asumsikan teman-teman sudah memahami hal-hal berikut:

  1. Junos OS architecture
  2. Junos initial configuration

Jika kamu belum atau baru mengenal juniper, saya sarankan untuk memulai mempelajari Juniper terlebih dahulu di materi JNCIA-Junos berikut:
JNCIA-Junos (JN0-103): Introduction to Juniper Network OS

Teman-teman bisa menggunakan simulator seperti GNS3 dan EVE-NG untuk menjalankan lab junos logical systems ini. Untuk image juniper vMX bisa kamu download melalui link berikut: Download Juniper vMX, vSRX, vQFX, vRR (Evaluation Licence).

Berikut ini adalah topologi yang akan kita gunakan:

PRECONFIG

Hostname Interface IP Address
R1 ge-0/0/0.0 12.12.12.1/24
R2 ge-0/0/0.0
lt-0/0/0.2
12.12.12.2/24
23.23.23.2/24
R3 lt-0/0/0.3 23.23.23.3/24

lab@R1> show configuration | no-more
## Last commit: 2021-01-27 05:12:32 UTC by lab
version 18.2R1.9;
system {
    login {
        user lab {
            uid 2002;
            class super-user;
            authentication {
                encrypted-password "$6$/mvkPFPr$cRYoTShPxgCf59YVfoLiIfwHedeob3P03Q6EGDJ.xiv3wWfug.Ol96X0IjY..lAD//EmokPtrb49GuBb6J2lr."; ## SECRET-DATA
            }
        }
    }
    root-authentication {
        encrypted-password "$6$.9.6epGW$SRilEpIlOZbQhBo9huD81YGk.N.hMyYSZRViTFvFNcJ1sSPp41K9wzZ7w2KN1s2uQmJaYQmcc9oixq3x5HghK."; ## SECRET-DATA
    }
    host-name R1;
    ...
}

lab@R0> show configuration | no-more
## Last commit: 2021-01-27 05:05:48 UTC by lab
system {
    login {
        user lab {
            uid 2000;
            class super-user;
            authentication {
                encrypted-password "$6$Naw40SBa$2pYB37jpMJHb2nsCdg3Sksmje8GBbZV.x0YQEsrZOz0y1fIcoPxNpY5dv11yW4Q2jLc4y6r16d2JRHEOPGzR71"; ## SECRET-DATA
            }
        }
    }
    root-authentication {
        encrypted-password "$6$0NE2zdQK$FM3I2rNy5/yaz/oK3Yw26c.sMA6BFYuUYjc4kyJAIc.bKkBaq4Rh3v.X5TYQBbmkO.L.F7XNILst2afuShrZ.0"; ## SECRET-DATA
    }
    host-name R0;
    ...
}

Logical system (R2 dan R3) akan kita buat di dalam R0.

[edit]
lab@R0# set logical-systems R2
lab@R0# set logical-systems R3

Membuat User Access untuk Logical Interface

Kita akan membuat user untuk mengakses masing-masing logical system.
lab2 => R2
lab3 => R3

1. Buat login class untuk logical-systems R2 dan R3.

[edit]
lab@R0#	set system login class Class-R2 logical-system R2
lab@R0#	set system login class Class-R2 permissions all
lab@R0#	set system login class Class-R3 logical-system R3
lab@R0#	set system login class Class-R3 permissions all

2. Buat login user.

[edit system login]
lab@R0#	set user lab2 class Class-R2 authentication plain-text-password
New password:
Retype new password:

lab@R0#	set user lab3 class Class-R3 authentication plain-text-password
New password:
Retype new password:

Jika sudah, commit konfigurasi.

Untuk mengkonfigurasi logical systems, bisa melalui hierarchy: logical-systems name

[edit logical-systems R2]
lab@R0# set ?
Possible completions:
> access               Network access configuration
> access-profile       Access profile for this instance
+ apply-groups         Groups from which to inherit configuration data
+ apply-groups-except  Don't inherit configuration data from these groups
> bridge-domains       Bridge domain configuration
> firewall             Define a firewall configuration
> forwarding-options   Configure options to control packet forwarding
> interfaces           Interface configuration
> multicast-snooping-options  Multicast snooping option configuration
> policy-options       Policy option configuration
> protocols            Routing protocol configuration
> routing-instances    Routing instance configuration
> routing-options      Protocol-independent routing option configuration
> services             Service PIC daemon configuration
> switch-options       Options for default routing-instance of type virtual-switch
> system               System parameters

Atau bisa juga mengaksesnya langsung dengan. Yaitu dengan mengakses ke perangkat fisik di mana logical system tersebut ada, yaitu R0. Login menggunakan user yang sudah dibuat, yaitu lab2 untuk R2, lab3 untuk R3.

FreeBSD/amd64 (R0) (ttyu0)

login: lab2
Password:
Last login: Wed Jan 27 07:52:11 on ttyu0

--- JUNOS 18.2R1.9 Kernel 64-bit  JNPR-11.0-20180614.6c3f819_buil
lab2@R0:R2>

FreeBSD/amd64 (R0) (ttyu0)

login: lab3
Password:

--- JUNOS 18.2R1.9 Kernel 64-bit  JNPR-11.0-20180614.6c3f819_buil
lab3@R0:R3>

Menghubungkan Logical System dengan Perangkat Fisik (R1 to R2)

1. Konfigurasi IP Address pada interface ge-0/0/0.0 R1.

[edit]
lab@R1# set interfaces ge-0/0/0 description "to ge-0/0/0.0 R2 (on R0)"
lab@R1# set interfaces ge-0/0/0 unit 0 family inet address 12.12.12.1/24

2. Konfigurasi IP Address pada interface ge-0/0/0.0 R2

[edit]
lab@R0# set interfaces ge-0/0/0 description "physical to ge-0/0/0 R1""

[edit logical-systems R2]
lab@R0# set interfaces ge-0/0/0 unit 0 description "to ge-0/0/0.0 R1"
lab@R0# set interfaces ge-0/0/0 unit 0 family inet address 12.12.12.2/24

3. Verifikasi
Lakukan commit konfigurasi, kemudian ping dari R1 ke R2 dan sebaliknya.

lab@R1> ping 12.12.12.2
PING 12.12.12.2 (12.12.12.2): 56 data bytes
64 bytes from 12.12.12.2: icmp_seq=0 ttl=64 time=18.679 ms
64 bytes from 12.12.12.2: icmp_seq=1 ttl=64 time=123.570 ms
64 bytes from 12.12.12.2: icmp_seq=2 ttl=64 time=7.059 ms
64 bytes from 12.12.12.2: icmp_seq=3 ttl=64 time=2.023 ms
--- 12.12.12.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.023/37.833/123.570/49.868 ms
lab@R0> ping logical-system R2 12.12.12.2
PING 12.12.12.2 (12.12.12.2): 56 data bytes
64 bytes from 12.12.12.2: icmp_seq=0 ttl=64 time=18.679 ms
64 bytes from 12.12.12.2: icmp_seq=1 ttl=64 time=123.570 ms
64 bytes from 12.12.12.2: icmp_seq=2 ttl=64 time=7.059 ms
64 bytes from 12.12.12.2: icmp_seq=3 ttl=64 time=2.023 ms
--- 12.12.12.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.023/37.833/123.570/49.868 ms

Menghubungkan Logical System dengan Logical System (R2 to R3)

Untuk menghubungkan logical system dengan logical system, kita memerluka logical tunnel (lt) interface. Fitur logical tunnel (lt) bisa diaktifkan menggunakan command set chassis fpc fpc_number pic pic_number tunnel-services.

Setiap logical tunnel (lt) memiliki logical unit, dan logical unit yang sudah dipakai di suatu logical system tidak bisa dipakai di logical system lain.

Untuk menghubungkan logical system dengan logical system secara point to point, kita memerlukan 2 logical unit dari satu interface logical tunnel (lt) yang sama. Satu unit untuk logical system tertentu dan satu unit untuk logical system pasangannya.

Contoh kita akan menghubungkan R2 dan R3. Kita menggunakan:
interface lt-0/0/10 unit 2 untuk interface di R2, dan
interface lt-0/0/10 unit 3 untuk interface di R3.

Nah, interface lt-0/0/10 unit 2 dan unit 3 tidak bisa digunakana lagi untuk menghubungkan logical system lain. Kita harus menggunakan logical system lainnya jika kita ingin menghubungkan ke logical system lain contoh (R3 ke R4).

Tapi tenang saja, logical unit ini terdapat lebih dari 1 miliar logical units, tepatnya: 1.073.741.823 logical units per satu interface. Sementara dalam satu perangkat mungkin terdapat beberapa interface.

Baik, kita mulai dengan mengaktifkan interface logical tunnel (lt).

1. Cek slot FPC dan PIC yang tersedia.

lab@R0> show chassis fpc
                     Temp  CPU Utilization (%)   CPU Utilization (%)  Memory    Utilization (%)
Slot State            (C)  Total  Interrupt      1min   5min   15min  DRAM (MB) Heap     Buffer
  0  Online           Testing  22         0       25     26     26    511        32          0
  1  Empty
  2  Empty

Data di atas menunjukan hanya ada 1 FPC yaitu slot 0. Selanjutnya kita check PIC yang tersedia.

lab@R0> show chassis pic fpc-slot 0 pic-slot 0
FPC slot 0, PIC slot 0 information:
  Type                             Virtual
  State                            Online
  PIC version                  0.0
  Uptime                         1 hour, 44 minutes, 38 seconds

lab@R0> show chassis pic fpc-slot 0 pic-slot 1
FPC 0, PIC 1 is empty

lab@R0> show chassis pic fpc-slot 0 pic-slot 2
FPC 0, PIC 2 is empty

lab@R0> show chassis pic fpc-slot 0 pic-slot 3
FPC 0, PIC 3 is empty

Dari data show chassis pic di atas, di R0 FPC 0 hanya terdapat 1 slot PIC, yaitu slot 0.

Cara lain yang singkat untuk mengetahui slot FPC dan PIC adalah dengan melihat nama interface pada perangkat kita. Jika misal di perangkat kita terapat interface ge-0/0/0 berarti FPC 0 PIC 0. Jika ada interface 1/0/1 berarti ada FPC 1 PIC 0. Dst.

2. Konfigurasi FPC 0 PIC 0 agar mendukung logical tunnel (lt) interfaces

[edit]
lab@R0# set chassis fpc 0 pic 0 tunnel-services bandwidth 1g

Commit konfigurasi, dan cek interface lt harusnya sudah ada.

lab@R0>  show interfaces terse | match "lt-"
lt-0/0/10               up    up

Berikutnya, kita akan menghubungkan logical-system R1 dan R2 menggunakan logical tunnel (lt) interfaces. Dari data di atas, kita punya interface lt-0/0/10. Nah kita akan buat logical unit untuk masing-masing logical-systems. Misalnya, unit 2 untuk R2, unit 3 untuk R3.

Dan nantinya kita akan peering antara unit 2 dan unit 3.

3. Konfigurasi IP Address untuk R2 (unit 2 peering ke unit 3 R3)

[edit logical-systems R2]
lab@R0# set interfaces lt-0/0/10 unit 2 description "R2 to lt-0/0/10.3 R3"
lab@R0# set interfaces lt-0/0/10 unit 2 encapsulation ethernet
lab@R0# set interfaces lt-0/0/10 unit 2 peer-unit 3
lab@R0# set interfaces lt-0/0/10 unit 2 family inet address 23.23.23.2/24

4. Konfigurasi IP Address untuk R3 (unit 3 peering ke unit 2 R2)

[edit logical-systems R3]

lab@R0# set interfaces lt-0/0/10 unit 3 description "R3 to lt-0/0/10.2 R2"
lab@R0# set interfaces lt-0/0/10 unit 3 encapsulation ethernet
lab@R0# set interfaces lt-0/0/10 unit 3 peer-unit 2
lab@R0# set interfaces lt-0/0/10 unit 3 family inet address 23.23.23.3/24

5. Verifikasi (ping R3 dari R2 dan sebaliknya)

lab@R0> ping logical-system R2 23.23.23.3
PING 23.23.23.3 (23.23.23.3): 56 data bytes
64 bytes from 23.23.23.3: icmp_seq=0 ttl=64 time=18.038 ms
64 bytes from 23.23.23.3: icmp_seq=1 ttl=64 time=1.074 ms
64 bytes from 23.23.23.3: icmp_seq=2 ttl=64 time=3.905 ms
^C
--- 23.23.23.3 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.074/7.672/18.038/7.420 ms

lab@R0> ping logical-system R3 23.23.23.2
PING 23.23.23.2 (23.23.23.2): 56 data bytes
64 bytes from 23.23.23.2: icmp_seq=0 ttl=64 time=1.620 ms
64 bytes from 23.23.23.2: icmp_seq=1 ttl=64 time=1.028 ms
64 bytes from 23.23.23.2: icmp_seq=2 ttl=64 time=14.240 ms
^C
--- 23.23.23.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.028/5.629/14.240/6.093 ms

Mengaktifkan Routing Static di Logical System

1. Konfigurasi routing di R1

[edit]
lab@R1# set routing-options static route 23.23.23.0/24 next-hop 12.12.12.2

2. Konfigurasi routing di R2

[edit logical-systems R3]
lab@R0# set routing-options static route 12.12.12.0/24 next-hop 23.23.23.2

Lakukan commit konfigurasi.

3. Verifikasi: Routing Table R1.

lab@R1> show route

inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

12.12.12.0/24      *[Direct/0] 02:11:46
                    > via ge-0/0/0.0
12.12.12.1/32      *[Local/0] 02:11:46
                      Local via ge-0/0/0.0
23.23.23.0/24      *[Static/5] 00:00:04
                    > to 12.12.12.2 via ge-0/0/0.0

4. Verifikasi: Routing Table R3.

lab@R0> show route logical-system R3

inet.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

12.12.12.0/24      *[Static/5] 00:00:03
                    > to 23.23.23.2 via lt-0/0/10.3
23.23.23.0/24      *[Direct/0] 00:10:18
                    > via lt-0/0/10.3
23.23.23.3/32      *[Local/0] 00:10:18
                      Local via lt-0/0/10.3

5. Verifikasi: Ping R1 ke R3 dan sebaliknya.

lab@R1> ping 23.23.23.3
PING 23.23.23.3 (23.23.23.3): 56 data bytes
64 bytes from 23.23.23.3: icmp_seq=0 ttl=63 time=59.822 ms
64 bytes from 23.23.23.3: icmp_seq=1 ttl=63 time=11.107 ms
64 bytes from 23.23.23.3: icmp_seq=2 ttl=63 time=1.912 ms

lab@R0> ping logical-system R3 12.12.12.1
PING 12.12.12.1 (12.12.12.1): 56 data bytes
64 bytes from 12.12.12.1: icmp_seq=0 ttl=63 time=2.789 ms
64 bytes from 12.12.12.1: icmp_seq=1 ttl=63 time=2.224 ms
64 bytes from 12.12.12.1: icmp_seq=2 ttl=63 time=18.518 ms

Postconfig

lab@R1> show configuration | no-more
## Last commit: 2021-01-28 07:05:05 UTC by lab
version 18.2R1.9;
system {
    login {
        user lab {
            uid 2002;
            class super-user;
            authentication {
                encrypted-password "$6$/mvkPFPr$cRYoTShPxgCf59YVfoLiIfwHedeob3P03Q6EGDJ.xiv3wWfug.Ol96X0IjY..lAD//EmokPtrb49GuBb6J2lr."; ## SECRET-DATA
            }
        }
    }
    root-authentication {
        encrypted-password "$6$.9.6epGW$SRilEpIlOZbQhBo9huD81YGk.N.hMyYSZRViTFvFNcJ1sSPp41K9wzZ7w2KN1s2uQmJaYQmcc9oixq3x5HghK."; ## SECRET-DATA
    }
    host-name R1;
    ...
}
interfaces {
    ge-0/0/0 {
        description "to ge-0/0/0.0 R2 (on R0)";
        unit 0 {
            family inet {
                address 12.12.12.1/24;
            }
        }
    }
}
routing-options {
    static {
        route 23.23.23.0/24 next-hop 12.12.12.2;
    }
}

lab@R0> show configuration | no-more
## Last commit: 2021-01-28 07:04:34 UTC by lab
version 18.2R1.9;
system {
    login {
        class Class-R2 {
            logical-system R2;
            permissions all;
        }
        class Class-R3 {
            logical-system R3;
            permissions all;
        }
        user lab {
            uid 2000;
            class super-user;
            authentication {
                encrypted-password "$6$Naw40SBa$2pYB37jpMJHb2nsCdg3Sksmje8GBbZV.x0YQEsrZOz0y1fIcoPxNpY5dv11yW4Q2jLc4y6r16d2JRHEOPGzR71"; ## SECRET-DATA
            }
        }
        user lab2 {
            uid 2001;
            class Class-R2;
            authentication {
                encrypted-password "$6$wZE15A2q$IRZTJay9QuvebFug2dFtQOmt.2guDH75dViGo0jTyiiZ6rE9N6Kb8QY.4.2ZZb6YhLpq1lLNCOW187R1LJ3NB/"; ## SECRET-DATA
            }
        }
        user lab3 {
            uid 2002;
            class Class-R3;
            authentication {
                encrypted-password "$6$AoYvbd5P$pjVIWWBlj2/FxTZBqERPmKsT/2td6qi8WyUbsm3NmoSlFDGvMpoh4Rt70czY3tFQC./z3/VaLiQuP/RSg7YXd."; ## SECRET-DATA
            }
        }
    }
    root-authentication {
        encrypted-password "$6$0NE2zdQK$FM3I2rNy5/yaz/oK3Yw26c.sMA6BFYuUYjc4kyJAIc.bKkBaq4Rh3v.X5TYQBbmkO.L.F7XNILst2afuShrZ.0"; ## SECRET-DATA
    }
    host-name R0;
    ...
}
logical-systems {
    R2 {
        interfaces {
            ge-0/0/0 {
                unit 0 {
                    family inet {
                        address 12.12.12.2/24;
                    }
                }
            }
            lt-0/0/10 {
                unit 2 {
                    description "R2 to lt-0/0/10.3 R3";
                    encapsulation ethernet;
                    peer-unit 3;
                    family inet {
                        address 23.23.23.2/24;
                    }
                }
            }
        }
    }
    R3 {
        interfaces {
            lt-0/0/10 {
                unit 3 {
                    description "R3 to lt-0/0/10.2 R2";
                    encapsulation ethernet;
                    peer-unit 2;
                    family inet {
                        address 23.23.23.3/24;
                    }
                }
            }
        }
        routing-options {
            static {
                route 12.12.12.0/24 next-hop 23.23.23.2;
            }
        }
    }
}
chassis {
    fpc 0 {
        pic 0 {
            tunnel-services {
                bandwidth 1g;
            }
        }
    }
}
interfaces {
    ge-0/0/0 {
        description "physical to ge-0/0/0 R1";
    }
}

tags: logical system juniper, junos logical system, cara konfigurasi logical system juniper, apa itu logical system juniper junos, cara menghubungkan logical system dengan perangkat fisik, cara menghubungkan logical system dengan physical device, cara menghubungkan logical system dengan logical system, cara mengoneksikan logical system, konfigurasi interface logical system juniper, konfigurasi interface logical tunnel juniper, konfigurasi routing di logical system juniper, cara login ke logical system juniper.