Berikut perintah dasar (basic commands) router Cisco (IOS) yang paling sering dipakai, lengkap dengan contoh singkat.
1) Mode & Navigasi
- Masuk privileged mode
enable - Masuk global configuration
configure terminal(atauconf t) - Keluar satu level / selesai konfigurasi
exit/end - Simpan konfigurasi (wajib biar tidak hilang setelah reboot)
write memory(atauwr)
copy running-config startup-config
2) Bantuan & Cek Perintah
- Bantuan konteks
? - Lihat opsi perintah
show ? - Autocomplete
tekanTab - Lihat history command
show history - Jalankan perintah dengan filter
show running-config | include <kata>
show running-config | section <bagian>
3) Identitas & Keamanan Dasar
- Set hostname
conf t hostname R1 - Password enable (lebih aman pakai “secret”)
enable secret <password> - Password console
line console 0 password <password> login - Password VTY (telnet/ssh)
line vty 0 4 password <password> login - Enkripsi password di config
service password-encryption - Banner (peringatan)
banner motd #Akses Terbatas!#
4) Konfigurasi Interface (IP Address)
- Lihat interface
show ip interface brief - Masuk interface dan set IP
conf t interface gigabitEthernet0/0 ip address 192.168.1.1 255.255.255.0 no shutdown - Deskripsi interface (biar rapi)
description Ke LAN - Cek status detail interface
show interfaces g0/0
5) Routing Dasar
A. Static route
- Default route (ke Internet/upstream)
ip route 0.0.0.0 0.0.0.0 <next-hop>Contoh:
ip route 0.0.0.0 0.0.0.0 10.10.10.1 - Route ke network tertentu
ip route 172.16.0.0 255.255.0.0 10.10.10.2
B. Cek routing table
show ip route
6) DHCP Server di Router (Umum di Lab)
conf t
ip dhcp excluded-address 192.168.1.1 192.168.1.20
ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8
Cek:
show ip dhcp bindingshow ip dhcp pool
7) NAT (Sering untuk konek Internet)
Contoh NAT overload (PAT):
conf t
access-list 1 permit 192.168.1.0 0.0.0.255
interface g0/0
ip nat inside
interface g0/1
ip nat outside
ip nat inside source list 1 interface g0/1 overload
Cek:
show ip nat translationsshow ip nat statistics
8) Monitoring & Troubleshooting
- Ping
ping 8.8.8.8 - Traceroute
traceroute 8.8.8.8 - Lihat running config
show running-config - Lihat startup config
show startup-config - Lihat log
show logging - Debug (hati-hati, bisa berat)
debug ip icmp
Matikan debug:undebug all
9) Reset / Reboot
- Reload (reboot)
reload - Hapus startup config (reset konfigurasi)
erase startup-config(atauwrite erase)
lalureload
