Basic Cisco Command
User EXEC Mode
Switch> Show clock | show version | show history | show users | show sessions | ping | traceroute | show cdp | show terminal | show interface fastEthernet 0/1 | enable
Privileged EXEC Mode
Switch# show ip interface brief | Melihat Semua Status Interface pada Switch
Switch# reload | Menghapus password console konfigurasi pada Switch
Password Switch Cisco
Membuat banner
Switch (config)# banner motd + | akhiri pesan dengan karakter “+”
****************************************
******* WELCOME IT-NSA LOGIN *******
****************************************+
Melihat koneksi yang memungkinkan untuk di remote
Switch (config)# line ? | Melihat ketersedian koneksi untuk remote switch
Membuat console password (Primary Terminal Line)
Switch (config)# line console 0 | Masuk ke line console
Switch (config-line)# password rahasia-console | Memberi password user access verification
Switch (config-line)# do sh run | Melihat semua konfigurasi berjalan
Ternyata line con 0 “permintaan login nya belum aktif”
Switch (config-line)# login | Mengaktifkan permintaan login line con 0
Switch (config-line)# no password | Menghapus password console
Switch (config-line)# no enable password | Menghapus enable password console
Switch (config-line)# do sh run | Melihat semua konfigurasi berjalan
HUBUNGKAN DENGAN “KABEL CONSOLE” PADA PC COLOK KE “PORT RS 232” YANG MENUJU KE ”PORT CONSOLE” SWITCH
UJI KONEKSI DENGAN TERMINAL PC
Global Configuration Mode
Switch (config)# hostname SW-LT-1 | Mengganti nama Hostname pada Switch
SW-LT-1 (config)# interface vlan 1 | Masuk ke interface vlan 1
Switch (config-if)# ip address 10.10.10.1 255.255.255.0 | Memberikan IP pada vlan 1
Switch (config-if)# no shutdown | Mengaktifkan vlan 1
Switch (config-if)# no ip address | Menghapus IP pada vlan 1
Switch (config-if)# shutdown | Mematikan vlan 1
Switch# show vlan brief | Melihat Status vlan
Membuat telnet (vty) Virtual Terminal password
Switch (config)# line vty ? | Periksa ketersediaan koneksi line vty
<0-15> First Line number
Switch (config)# line vty 0 15 | Masuk ke line vty 0 sampai 15
Switch (config-line)# password rahasia-telnet | Password telnet user access verification
Switch (config)# enable password aishiteru | Enable login telnet di client, masukan pass 1 “rahasia-telnet” dan pass 2 “aishiteru” sampai sini klien bisa remote menggunakan telnet
Switch (config)# enable secret aishiteru2 | Password untuk masuk ke user exec mode pada telnet remote “aishiteru2”
Switch (config)# no enable password | sembuyikan passwd aishiteru saat di cek “do sh run”
ISI IP ADDRESS PC 10.10.10.2 DAN HUBUNGKAN PC DENGAN KABEL OTOMATIS YANG MENUJU KE PORT VLAN 1 SWITCH (10.10.10.1)
UJI KONEKSI DENGAN CMD PC PING KE 10.10.10.1 SETELAH ITU KETIKAN “telnet 10.10.10.1”
Remote Switch Via SSH
Switch(config)#hostname SW-LT-6
SW-LT-6(config)#ip domain-name tkj.net
SW-LT-6(config)#username tkj secret open-switch
SW-LT-6(config)#enable secret open-enable
SW-LT-6(config)#line vty ?
SW-LT-6(config)#line vty 0 15
SW-LT-6(config-line)#transport input ssh
SW-LT-6(config-line)#login local
SW-LT-6(config-line)#exit
SW-LT-6(config)#crypto key generate rsa
How many bits in the modulus [512]: 1024
SW-LT-6#show ip ssh
SSH Enabled - version 1.99
Authentication timeout: 120 secs; Authentication retries: 3
pada CMD klien
C:\>ssh -l tkj 192.168.1.1
password : open-switch
>enable
password : open-enable
Menyimpan konfigurasi
Switch (config)# copy running-config startup-config | Save konfigurasi
Switch (config)# do sh run | Melihat smua konfigurasi berjalan
Management VLAN Switch 2950T-24
Switch#vlan database
Switch(vlan)#vlan 10 name TKJ-A
Switch(vlan)#vlan 20 name TKJ-B
Switch(vlan)#vlan 30 name TKJ-C
Switch(config)#interface range fastEthernet 0/7 - 12
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
=================================================
Switch(config)#interface range fastEthernet 0/13 - 18
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
=================================================
Switch(config)#interface range fastEthernet 0/19 - 24
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch#show vlan
=================================================
vlan 1 : 100.100.100.1
vlan 10 : 10.10.10.1
vlan 20 : 20.20.20.1
vlan 30 : 30.30.30.1
=================================================
Switch>enable
Switch#configure terminal
Switch(config)#interface vlan 1
Switch(config-if)#ip address 100.100.100.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip dhcp pool VLAN-1
Switch(dhcp-config)#network 100.100.100.0 255.255.255.0
Switch(dhcp-config)#default-router 100.100.100.1
Switch(dhcp-config)#dns-server 8.8.8.8
Switch(dhcp-config)#exit
Switch(config)#ip default-gateway 100.100.100.1
Switch(config)#ip dhcp excluded-address 100.100.100.1 100.100.100.2
Switch>enable
Switch#configure terminal
Switch(config)#interface vlan 10
Switch(config-if)#ip address 10.10.10.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip dhcp pool VLAN-10
Switch(dhcp-config)#network 10.10.10.0 255.255.255.0
Switch(dhcp-config)#default-router 10.10.10.1
Switch(dhcp-config)#dns-server 8.8.8.8
Switch(dhcp-config)#exit
Switch(config)#ip default-gateway 10.10.10.1
Switch(config)#ip dhcp excluded-address 10.10.10.1 10.10.10.2
KALAU MASIH DOWN
Switch(config)#interface vlan 10
Switch(config-if)#no shutdown
Menshutdown salah satu port ethernet
Umumnya port ethernet otomatis UP ketika ada PC / Laptop yang terhubung ke Switch
Switch (config)# interface fastEthernet 0/2 | Masuk ke interface fa 0/2
Switch (config)# shutdown | Status interface fa 0/2 down
Switch (config)# no shutdown | Status interface fa 0/2 up
=================================================
Reset Konfigurasi Switch
Switch#erase startup-config
Switch#dir
Switch#delete flash:vlan.dat
Switch#reload
=================================================
Menghapus konfigurasi DHCP dan VLAN Switch Cisco
Switch# vlan database | Masuk ke database vlan
Switch (vlan)# no vlan 1 | Menghapus vlan 1
Switch (vlan)# no vlan 10 | Menghapus vlan 10
Switch (vlan)# no vlan 20 | Menghapus vlan 20
Switch (vlan)# no vlan 30 | Menghapus vlan 30
Switch# write erase | Menghapus konfigurasi
Switch# reload | Menghapus semua konfigurasi password console dan telnet dan IP VLAN
System configuration has been modified. Save ? [yes/no] no
Proceed with reload ? [confirm] ( langsung tekan enter )