Pohon konfigurasi
Semua node yang valid di config.boot. Tanda + berarti node bisa berisi banyak nilai.
system
| Path |
Nilai |
Keterangan |
system host-name |
hostname |
Huruf, angka, - |
system name-server + |
alamat IP |
DNS untuk router sendiri |
system time-zone |
zona |
Misalnya Asia/Jakarta |
system root-authentication plaintext-password |
teks ≥ 6 |
Disimpan sebagai hash |
system root-authentication encrypted-password |
hash crypt |
$6$…, $y$…, $5$… |
system root-authentication ssh-ed25519 + |
kunci publik |
Juga ssh-rsa, ssh-ecdsa |
system login user <nama> |
nama |
Huruf kecil, angka, -, _; maksimal 31 karakter |
… user <nama> class |
super-user | operator | read-only |
Wajib |
… user <nama> full-name |
teks |
|
… user <nama> authentication plaintext-password |
teks ≥ 6 |
Disimpan sebagai hash |
… user <nama> authentication encrypted-password |
hash crypt |
|
… user <nama> authentication ssh-ed25519 + |
kunci publik |
Juga ssh-rsa, ssh-ecdsa |
interfaces
Interface yang bisa dikonfigurasi: port dataplane ethN, loopback lo0, dan irb. Alamat selalu berada di bawah unit. Nama logisnya interface.unit (eth1.0, eth2.20, irb.30, lo0.0). Lihat Interface & VLAN.
| Path |
Nilai |
Keterangan |
interfaces <ethN> |
|
Harus port dataplane yang ada |
… <ethN> description |
teks |
|
… <ethN> mtu |
68–9000 |
Default 1500; juga MTU unit 0 |
… <ethN> disable |
|
Port administratif down |
… <ethN> vlan-tagging |
|
Opsional; kalau ada, setiap unit wajib punya vlan-id |
… <ethN> unit <0-16384> |
|
Interface logis |
… unit <n> vlan-id |
1–4094 |
802.1Q; hanya unit 0 boleh tanpa vlan-id |
… unit <n> mtu |
68–9000 |
Hanya unit ber-tag; default dan batas: MTU port |
… unit <n> description / disable |
|
|
… unit <n> family inet address + |
IPv4/prefix |
|
… unit <n> family inet6 address + |
IPv6/prefix |
|
… unit 0 family ethernet-switching interface-mode |
access | trunk |
Default access |
… unit 0 family ethernet-switching vlan members + |
nama VLAN |
Access: tepat satu VLAN |
interfaces irb unit <n> |
|
Gateway L3 VLAN → irb.N |
… irb unit <n> family inet / inet6 address + |
IP/prefix |
|
… irb unit <n> mtu |
68–9000 |
Default dan batas: MTU terkecil port anggota |
… irb unit <n> description / disable |
|
|
interfaces lo0 unit <n> |
|
Loopback; unit 0 = lo0 |
… lo0 unit <n> family inet / inet6 address + |
IP/prefix |
|
… lo0 description, … lo0 unit <n> description |
teks |
|
vlans
| Path |
Nilai |
Keterangan |
vlans <nama> |
huruf, angka, -, _ |
Nama hanyalah label |
vlans <nama> vlan-id |
1–4094 |
Wajib, unik antar-VLAN |
vlans <nama> description |
teks |
|
vlans <nama> l3-interface |
irb.N |
Opsional; satu irb untuk satu VLAN |
protocols
| Path |
Nilai |
Keterangan |
protocols static route <prefix> |
prefix jaringan |
IPv4 atau IPv6 |
… route <prefix> next-hop + |
alamat IP |
Keluarga sama dengan prefix; banyak = ECMP |
… route <prefix> blackhole |
|
Tidak boleh digabung dengan next-hop |
nat
| Path |
Nilai |
Keterangan |
nat masquerade interface + |
ethN.unit / irb.N |
Interface logis yang punya IPv4 (family inet) |
service
| Path |
Nilai |
Keterangan |
service ssh port |
1–65535 |
|
service ssh listen-address + |
alamat IP |
|
service ssh root-login |
allow | deny-password | deny |
|
Validasi saat commit
| Aturan |
Pesan contoh |
| Port harus ada di dataplane |
interfaces eth9: no such dataplane port (available: eth1, eth2) |
| MTU unit ≤ MTU port |
interfaces eth1 unit 100: mtu 9000 is larger than the port eth1 mtu (1500) |
| MTU irb ≤ port anggota |
interfaces irb unit 20: mtu 9000 is larger than the smallest member port mtu (1500) |
mtu hanya di unit ber-tag |
interfaces eth1 unit 0: mtu is only for tagged units; … |
Unit selain 0 butuh vlan-id |
interfaces eth1 unit 5: needs a vlan-id (only unit 0 can be untagged) |
vlan-tagging → semua unit ber-tag |
interfaces eth1 unit 0: with vlan-tagging every unit needs a vlan-id |
vlan-id unik per port |
interfaces eth1: vlan-id 100 is used by unit 100 and unit 101 |
Port anggota hanya unit 0, tanpa alamat |
interfaces eth3 unit 0: a switch member port cannot have addresses; … |
| Port access tepat satu VLAN |
… family ethernet-switching: an access port is a member of exactly one VLAN (use interface-mode trunk) |
| VLAN anggota harus didefinisikan |
… family ethernet-switching: VLAN 'tamu' is not defined (vlans tamu vlan-id ...) |
VLAN butuh vlan-id unik |
vlans tamu: vlan-id 20 is already used by vlans srv |
l3-interface harus ada |
vlans srv: l3-interface irb.20 is not configured (…) |
| Setiap irb terikat ke VLAN |
interfaces irb unit 30: not bound to a VLAN (vlans <name> l3-interface irb.30) |
| Keluarga alamat benar |
'2001:db8::1/64' is not an IPv4 address (family inet) |
| Satu IP satu interface |
address 10.0.12.1 is configured on both eth1.0 and eth2.0 |
| Route butuh next-hop atau blackhole |
protocols static route 10.0.0.0/8: needs a next-hop or blackhole |
| Next-hop sekeluarga |
… next-hop 2001:db8::1 is not IPv4 |
| NAT di interface logis ber-IPv4 |
nat masquerade interface eth3.0: no such routed interface (…) |
| User lengkap |
system login user ops: needs a password (…) or an SSH key |
Contoh lengkap
system {
host-name edge-01
name-server 1.1.1.1
time-zone Asia/Jakarta
root-authentication {
encrypted-password "$6$..." ## SECRET-DATA
}
login {
user admin {
class super-user
full-name "Admin Jaringan"
authentication {
encrypted-password "$6$..." ## SECRET-DATA
ssh-ed25519 "ssh-ed25519 AAAAC3Nz... admin@laptop"
}
}
}
}
interfaces eth1 {
description "uplink ISP"
unit 0 {
family inet {
address 103.10.20.2/30
}
}
}
interfaces eth2 {
mtu 1500
unit 0 {
family inet {
address 192.168.10.1/24
}
}
unit 20 {
vlan-id 20
family inet {
address 192.168.20.1/24
}
}
}
interfaces eth3 {
unit 0 {
family ethernet-switching {
interface-mode access
vlan {
members srv
}
}
}
}
interfaces irb {
unit 30 {
family inet {
address 10.30.0.1/24
}
}
}
interfaces lo0 {
unit 0 {
family inet {
address 10.255.255.1/32
}
}
}
vlans srv {
vlan-id 30
l3-interface irb.30
}
protocols {
static {
route 0.0.0.0/0 {
next-hop 103.10.20.1
}
route 192.0.2.0/24 {
blackhole
}
}
}
nat {
masquerade {
interface eth1.0
}
}
service {
ssh {
root-login deny
}
}