1. Masuk ke Global Configure
Router#configure
terminal
2. Setting waktu
Router#clock set
14:04:05 25 aug 2009
3. Untuk membuat banner
Router(config)#
Router(config)#banner
motd #
Selamat
Datang di Cisco#
4. Untuk men-set password privilege.
Gunanya
untuk membatasi hak akses ke editor:
Router(config)#enable
password 123456
Router(config)#enable
secret 123456
5. Untuk men-set password telnet
Router(config)#line
vty 0 4
Router(config-line)#password
123456
6. Untuk men-set password console
Router(config)#line
console 0
Router(config-line)#password
123456
7. Agar passowd tidak kelihatan saat orang melakukan perintah show
runningconfig atau show startup-config.
Router(config)#service
password-encryption
8. Perintah-perintah show dalam cisco
- Show interfaces
untuk
menampilkan statistic semua interfacerouter. Untuk menampilkan statistic
interface tertentu, menggunakan perintah show interfaces diikuti dengan nomor
port/slot interface
seperti
perintah di bawah ini.
Router#show
interfaces serial 0/1
- Show controllers serial
menampilkan
informasi khusus hardware interface. Perintah ini harus di-set termasuk nomor
port/slot dari interface serial. Contoh :
Router#show
controllers serial 0/1
- Show clock – menampilkan setting waktu di router.
- Show hosts
manmapilkan
daftar cache dari nama host dan alamatnya.
- Show users
manmpilkan
semua user yang konek ke router amang@eepis-its.edu 33
- Show history
menampilkan
history dari perintah-perintah yang pernah dijalankan
- Show flash
menampilkan
informasi tentang flash memory dan file-file IOS yang tersimpan.
- Show version
menampilkan
informasi tentang versi software yang sekarang sedang jalan lengkap dengan
informasi hardware dan device.
- Show arp
menampilkan
tabel ARP router.
- Show protocols
menampilkan
status interface baik secara global maupun khusu dari protokol layer 3 yang
terkonfigurasi.
- Show startup-config
menampilkan
isi file konfigurasi yang tersimpan di NVRAM
- Show running-config
menampilkan
isi file konfigurasi yang sedang jalan atau konfigurasi dari interface atau
informasi map class.
9. Mengganti hostname.
Router(config)#hostname
heru
10. Memberi nama IP Ethernet pada router.
Router(config)#interface
serial 0/0
Router(config-if)#ip
address
Router(config-if)#no
shutdown
10. Memberi clock rate pada Ethernet
Router(config)#interface
serial 0/0
Router(config-if)#clock
rate 56000
Router(config-if)#no
shutdown
12. Melihat status IP
Router#
show ip interface brief
13. Menyimpan configurasi.
Router#write
memory
14. Menjalankan file konfigurasi agar file configurasi bisa di
jalankan saat loading.
Router#
copy running-config startup-config
15. Untuk mengetahui proses hasil configurasi
Router#sh
run atau Router#sh start
Pada
Switch :
Switch>sh confikur
^
% Invalid input detected at '^' mark
Menampilkan jam
Code:
Switch>show clock
Menampikan versi IOS
Code:
Switch>show version
Menampilkan perintah sebelumnya
Code:
Switch>show history
Manampilkan kemungkinan perintah
Code:
Switch>di?
disconnect
Menampilkan manual help
Code:
Switch>?
Switch?sh ?
Menampilkan informasi interface
Code:
Switch>show interfaces
atau
Switch>show interface Fa0/1
atau
Switch>sh int F0/1
Memasuki privileged EXEC mode
Code:
Switch>enable
untuk memasuki privileged
Switch#disable
untuk keluar dari privileged
Switch>
Menentukan password mode privileged
Code:
Switch>enable
Switch#configure terminal
Switch(config)#enable password passwordbaru
Switch(config)#^Z
Switch#disable
dan apa bila masuk ke privileged akan di minta
password yang baru di buat tadi
Menentukan password console
Code:
Switch>enable
password:
Switch#configure terminal
Switch(config)#line console 0
Switch(config-line)#password passwordconsole0
Switch(config-line)#login
Switch(config)#^Z
Switch#disable
Switch#exit
Menentukan hostname
Code:
Switch(config)#hostname switchnamehost
Switch(config)#^Z
switchnamehost#
Me-reboot switch
Code:
Switch#reload
nb : setelah kita me-reboot switch kita berarti semua
konfigurasi
yang telah kita buat itu kembali seperti semula (semua
konfigurasi
tidak tersimpan secara permanen) karena
informasi tadi di simpan di RAM.
Menyimpan hasi konfigurasi
Code:
Switch>enable
Switch#copy running-config startup-config
atau bisa dengan cara lain menyimpan konfigurasi kedalam server
TFTP.
Jadi apabila file yang di simpan di NVRAM hilang, kita masih
dapat
mengambil backup-nya dari server TFTP
Switch>enable
Switch#copy running-config tftp
untuk menghapus hasil konfigurasi yang telah tersimpan
Code:
hal ini biasanya di lakukan untuk merubah settingan apabila ada
kesalahan di congig
Switch>enable
Switch#erase startup-config
untuk melihat config sebelumnya
Switch#show startup-config
dan reset Switchnya
Switch#reload
Perintah Dasar Cisco SWITCH
Menampilkan
Jam dan tanggal
Switch>show clock
Switch>show clock
Mengganti
tanggal/jam
Switch#clock
set hh:mm:ss dd:mm:yyyy
Menampilkan
versi IOS
Switch>show version
Switch>show version
Jika terdapat tulisan
–More– dibagian bawah, kamu dapat menampilkan halaman berikutnya dengan
tombol [SPACE]. Jika ingin melihat
baris perbaris bisa dengan menekan tombol [ENTER]
Menampilkan
perintah sebelumnya
Switch>show history
Switch>show history
Untuk menampilkan
satu-persatu perintah yang sudah diketikkan terlebih dahulu, gunakan tombol
panah atas atau tombol panah bawah.
Menampilkan
kemungkinan perintah
Switch>di?
akan menampilkan perintah disconnect
Switch>e?
akan menampilkan perintah enable exit
Switch>di?
akan menampilkan perintah disconnect
Switch>e?
akan menampilkan perintah enable exit
Menampilkan
manual help
Switch>show ?
Switch>show users
Switch>show sessions
Switch>ping ?
Switch>traceroute ?
Switch>show ?
Switch>show users
Switch>show sessions
Switch>ping ?
Switch>traceroute ?
Menampilkan
informasi interface
Switch menyediakan 12
atau 24 port. Setiap port dapat dipandang seperti sebuah interface.
Masing-masing interface diberi nama sebagai : FastEthernet 0/1, FastEthernet
0/2, dan seterusnya sampai jumlah maksimal port yang tersedia.
Switch>show
interfaces
Switch>show interfaces FastEthernet 0/1
Switch>show interfaces Fa 0/1
Switch>sh int Fa0/1
Switch>sh int F0/1
switch>sh in f0/1
Switch>show interfaces FastEthernet 0/1
Switch>show interfaces Fa 0/1
Switch>sh int Fa0/1
Switch>sh int F0/1
switch>sh in f0/1
Menampilkan
CDP (Cisco Discovery Protocol)
Merupakan protokol yang digunakan untuk komunikasi antar perangkat cisco
switch>show cdp
Merupakan protokol yang digunakan untuk komunikasi antar perangkat cisco
switch>show cdp
Menampilkan
informasi terminal
switch>show terminal
switch>show terminal
Memasuki privileged EXEC mode
untuk pindah ke mode
privileged atau mode admin atau mode root di linux yang ditunjukkan dengan
tanda #
switch>enable
Jika ingin kembali ke user EXEC mode ketikkan
switch>disable atau
switch>exit
Jika ingin kembali ke user EXEC mode ketikkan
switch>disable atau
switch>exit
Untuk
masuk ketingkat Global
Switch#config
t
Switch(config)#
Membuat
Banner
Switch>
enable
Switch#config t
Switch(config)#Banner MOTD “Cisco sys”
Switch(config)#Exit
Switch#logout
Switch#config t
Switch(config)#Banner MOTD “Cisco sys”
Switch(config)#Exit
Switch#logout
Menampilkan
running configuration
switch>enable
switch#show running-config
switch>enable
switch#show running-config
Running-configuration
disimpan sementara di RAM. Jika switch dimatikan maka semua informasi running-configuration akan terhapus
Menampilkan
startup configuration
switch>enable atau bisa dengan mengetikan en
switch#show startup-config
switch>enable atau bisa dengan mengetikan en
switch#show startup-config
Menentukan
Jam dan tanggal
switch>enable
switch#clock set 12:20:20 5 october 2012
switch#show clock
switch>enable
switch#clock set 12:20:20 5 october 2012
switch#show clock
Menentukan
password mode privileged
Yaitu pembuatan password pada saat user biasa akan masuk ke mode privileged
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#enable password TIDAKDIENKRIPSI
Switch(config)#enable secret DIENKRIPSI
Switch(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Switch#disable
Switch>enable
Password:
Yaitu pembuatan password pada saat user biasa akan masuk ke mode privileged
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#enable password TIDAKDIENKRIPSI
Switch(config)#enable secret DIENKRIPSI
Switch(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Switch#disable
Switch>enable
Password:
Menentukan
password console
Password console
digunakan untuk membatasi akses via port console atau via aplikasi emaulation
seperti HyperTerminal
Switch>enable
Switch#configure termin
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line console 0
Switch(config-line)#password passwordCONSOLE
Switch(config-line)#login
Switch(config-line)#^Z
Switch#disable
Switch>exit
Press RETURN to get started.
User Access Verification
Password:
Switch#configure termin
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line console 0
Switch(config-line)#password passwordCONSOLE
Switch(config-line)#login
Switch(config-line)#^Z
Switch#disable
Switch>exit
Press RETURN to get started.
User Access Verification
Password:
Menentukan
password telnet
Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line vty 0 15
Switch(config-line)#password passwordTELNET
Switch(config-line)#login
Switch(config-line)#^Z
Switch#disable
Switch>exit
Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line vty 0 15
Switch(config-line)#password passwordTELNET
Switch(config-line)#login
Switch(config-line)#^Z
Switch#disable
Switch>exit
Menentukan
password AUX
Switch(config)#line aux 0
Switch(config-line)#password passwordAUX
Switch(config-line)#login
Switch(config)#^Z
Switch#disable
Switch#exit
Switch(config)#line aux 0
Switch(config-line)#password passwordAUX
Switch(config-line)#login
Switch(config)#^Z
Switch#disable
Switch#exit
* nomor – nomor diatas
adalah merupakan port yang diberi nomor, misalkan sebuah port console yang
diberi nomor 0, sebuah port aux yang diberi nomor 0 dan 16 buah VTY yang diberi
nomor 0 s/d 15
Menentukan
hostname
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Catalyst
Catalyst(config)#^Z
Catalyst#
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Catalyst
Catalyst(config)#^Z
Catalyst#
Mengganti
hostname
Switch>enable
Switch#config t
Switch(config)#hostname budidarma
Switch(config)#exit
Switch#logout
Switch#config t
Switch(config)#hostname budidarma
Switch(config)#exit
Switch#logout
Mereboot
switch
Switch#reboot
Switch#reboot
Menyimpan
hasil konfigurasi
Semua perintah yang kita
ketikkan itu disimpan dalam memory sementara(RAM), jadi sewaktu switch atau
Switch direboot maka konfigurasi akan hilang, untuk itu disarankan agar kita
menyimpan konfigurasi yang sedang dilakukan(copy dari ram ke nvram)
Catalyst#copy running-config startup-config (copy dari ram ke nvram)
Catalyst#copy running-config startup-config (copy dari ram ke nvram)
ATAU
Catalyst#wr
ATAU
Catalyst#copy running-config tftp
Catalyst#show startup-config
Catalyst#copy startup-config running-config (copy dari nvram ke ram)
Catalyst#wr
ATAU
Catalyst#copy running-config tftp
Catalyst#show startup-config
Catalyst#copy startup-config running-config (copy dari nvram ke ram)
Menghapus
startup configuration
Catalyst#erase startup-config
Catalyst#show startup-config
Catalyst#reload
Catalyst#erase startup-config
Catalyst#show startup-config
Catalyst#reload
File
Image IOS
Switch#show flash
Switch#dir flash
Switch#show flash
Switch#dir flash
File
system configuration
Switch#show boot
Switch#show boot
Menggubah
mode full duplex
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fa 0/1
Switch(config-if)#duplex full
Switch(config-if)#^Z
Switch#show interfaces
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fa 0/1
Switch(config-if)#duplex full
Switch(config-if)#^Z
Switch#show interfaces
Menggubah
Speed
Beberapa tipe switch
mendukung speed 10 Mbps dan 100 Mbps. Kita dapat menggubah speed tersebut
Switch#conf
t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fa 0/1
Switch(config-if)#speed 10 atau 100
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface fa 0/1
Switch(config-if)#speed 10 atau 100
Menentukan
IP address interface
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface vlan1
Switch(config-if)#ip address 192.168.10.1 255.255.255.0
Switch(config-if)#no shutdown untuk menenable/meng-up interface
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface vlan1
Switch(config-if)#ip address 192.168.10.1 255.255.255.0
Switch(config-if)#no shutdown untuk menenable/meng-up interface
Untuk
me-reset suatu fungsi
Switch(config)#Clear
Membuat
password console
Switch>enable
Switch#config
t
Switch(config)#line
console 0
Switch(config-line)#password
123switch
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#exit
Switch#logout
Mengaktifkan
VLAN
Switch>enable
Switch#config
t
Switch(config)#interface
Vlan 100
Switch(config-if)#description
name lab-1
Switch(config-if)#no
shutdown
Switch(config-if)#exit
Membuat
VLAN
Switch>enable
Switch#Vlan
Database
Switch(Vlan)#Vlan
100 name Lab-1
Switch(Vlan)#Vlan
500 name Lab-2
Switch(Vlan)#exit
Menampilkan
VLAN
Switch#Show
Vlan
Mensetting
Port pada VLAN
Switch>enable
Switch#config
t
Switch(config)#interface
FA 0/1
Switch(config-if)#switchport
access Vlan 100
Switch(config-if)#no
shutdown
Switch(config-if)#exit
Mensetting
IP Address Pada VLAN
Switch>enable
Switch#config
t
Switch(config)#interface
Vlan 100
Switch(config-if)#IP
Address 10.10.10.249 255.255.255.248
Menyimpan
Configurasi
Switch>enable
Switch#copy
running-config startup-config
Enter
untuk OK
Keluar
dari Switch
Switch#disable
Keluar
dari Console
Switch#logout
Help
command
Switch#?
bisa
dipakai untuk melihat help command tertentu misal kita pengin tahu perintah
yang depannya c
Switch#c?
atau
kila kita lupa sintaks utuh nya seperti apa
Switch#clock
?
Hot
keys:
Kursor pindah ke awal baris : Ctrl + A
Kursor ke akhir baris : Ctrl + E
Mundur 1 kata : Esc + B
Mundur 1 karakter : Ctrl + B
Maju 1 karakter : Ctrl + F
Menghapus : Backspace
Melihat perintah sebelumnya : Up arrow atau Ctrl + P
Kursor pindah ke awal baris : Ctrl + A
Kursor ke akhir baris : Ctrl + E
Mundur 1 kata : Esc + B
Mundur 1 karakter : Ctrl + B
Maju 1 karakter : Ctrl + F
Menghapus : Backspace
Melihat perintah sebelumnya : Up arrow atau Ctrl + P
Encrypting
Password
Switch(config)#service
password-encryption
Switch(config)#^z
Melihat,
menyimpan dan menghapus konfigurasi
Switch#sh
run (melihat)
Switch#copy run start (menyimpan)
Switch#erase startup-config (menghapus)
Pendataan
VLAN ID yang terhubung
Switch#vlan
database
Switch(vlan)#vlan
10 name keuangan
Switch(vlan)#vlan
20 name produksi
Switch(vlan)#vlan
40 name HRD
Switch(vlan)#vlan
50 name IT
Switch(vlan)#exit
Switch#
Pemberian
alamat pada interface dari switch
Switch#configure
terminal
Switch(config)#interface
fastethernet0/1
Switch(config-if)#switchport
access vlan 10
Switch(config)#interface
fastethernet0/2
Switch(config-if)#switchport
access vlan 10
Switch(config)#interface
fastethernet0/3
Switch(config-if)#switchport
access vlan 20
Switch(config)#interface
fastethernet0/4
Switch(config-if)#switchport
mode trunk
Switch(config-if)#exit
Config-register
adalah perintah unutk menentukan dari mana Switch akan memulai sistem boot
secara otomatis.
Switch(config)#config-register
0x2142 untuk masuk ke ROM monitor mode
Switch(config)#config-register
0x0101 untuk boot dari ROM
Switch(config)#config-register
0x2102 untuk boot dari NVRAM
VTY
password: untuk membuat password untuk akses dengan telnet ke Switch
Switch(config)#line
vty 0 4
Switch(config-line)#login
Switch(config-line)#password
kunci untuk membuat password bernama kunci untuk mengakses Switch lewat virtual
terminal
Encapsulation
: berguna jika ingin menerapkan suatu jenis protokol WAN. Contohnya
point-to-point
protocol (ppp) ke suatu interface, misalnya interface serial0, maka setelah
masuk ke interface configuration mode, kemudian mengetik perintah encapsulation
seperti berikut :
Switch(config-if)#encapsulation
ppp
Disamping
ppp, ada berbagai macam encapsulation yang dapat digunakan oleh Cisco Switch
sebagai berikut :
Switch(config-if)#encapsulation
?
Atm-dxi
ATM-DXI encapsulation
Bstun
Block serial tunneling (BSTUN)
Frame-relay
Frame relay network
Hdlc
serial hdlc synchronous
Lapb
LAPB (X.25 level 2)
Ppp
Point to point protocol
Sdlc
SDLC
Sdlc-primary
SDLC (primary)
Sdlc-secondary
SDCL (secondary)
Smds
switched Megabit Data Service (SMDS)
Stun
serial tunneling (STUN)
X25
x.25
Dalam percobaan yang
telah dilakukan diketahui bahwa untuk menghubungkan antar Switch melalui
hubungan serial diperlukan sinkronisasi semua aspek baik bandwidth, clock rate
maupun jenis encapsulasi yang digunakan. Pada percobaan yang telah dilakukan
menggunakan jenis encapsulasi hdlc, clock rate 64000 dan bandwidth 56
IP
routing selalu diterapkan (enable) untuk Cisco Switch. Untuk menerapkan IP ke
suatu interface, ketik perintah berikut dari configuration interface mode:
Switch(config-if)#IP
address <ip address> <subnet mask>
Sedangkan IP routing
statis dapat diubah dengan perintah :
Switch(config)#ip
route <network destination id> <subnet mask>
<default
gateway>
Dimana :
Network destination ID
adalah alamat jaringan yang dituju. Subnet mask adalah subnet
mask jaringan yang
dituju.
Default gateway adalah
IP address dari gateway, biasanya IP address Switch yang berhubugan langsung.
Mengkonfigurasi
Switch Default Gateway
Switch(config)#ip
default-gateway {ip address}
contoh:
Switch(config)#ip
default-gateway 172.20.137.1
Menampilkan
status Initial Startup Switch
Switch#show
version
Menampilkan konfigurasi
dari sistem hardware, versi software, nama dan file sumber konfigurasi, dan
boot images
Menampilkan
file konfigurasi yang sedang aktif dari switch
Switch#show
running-configuration
Menampilkan
statistik dari semua konfigurasi interfaces pada switch
Switch#show
interfaces
Menampilkan
alamat IP,subnet mask, dan default gateway
Switch#show
ip
Menampilkan
running configurasi
Switch#show
running-configuration
Building configuration…
Current configuration:
hostname “sayid”
ip address 10.1.1.33
255.255.255.0
ip default-gateway
10.3.3.3
interface Ethernet 0/1
<text omitted>
interface Ethernet 0/12
Interface Ethernet 0/25
interface FastEthernet
0/26
interface FastEthernet
0/27
Konfigurasi
IP Address dan interface sebagai link trunk ke interface Switch
Switch#conf
t
Memberi
nama interface
Switch(config-if)#description
TRUNK-SWITCH-TO-SWITCH-A
Membuat
interface menjadi trunk link
Switch(config-if)#
switchport mode trunk
Membuat
semua vlan di allow di interface trunk
Switch(config-if)#
switchport trunk allowed vlan all
Memberikan
ip dan mengaktifkan vlan management switch yaitu vlan 1
Switch(config)#interface
Vlan1
Switch(config)#description
MANAGEMENT-VLAN
Switch(config-if)#ip
address 192.168.1.2 255.255.255.0
Membuat
routing switch ke arah Switch
Switch(config)#ip
default gateway 192.168.1.1
Membagi
Vlan dan segemtn ip per interface switch
Vlan yang di gunakan
yaitu vlan 10 untuk ip segment 192.168.10.0/24 dan vlan 20 untuk
192.168.20.0/24
Switch(config)#interface
fastEthernet 0/1
Membuat
interface menjadi acces link
Switch(config-if)#
switchport mode acces
Configure
the virtual line password. Password virtual line berguna untuk mengatur hak
akses control Telnet ke Switch.
Sebagai contoh password
yang digunakan adalah:cisco
Switch(config-line)#
line vty 0 4
Switch(config-line)#
password cisco
Switch(config-line)#
login
Switch(config)#service
password-encryption Untuk melakukan enkripsi password
Apabila
kita salah mengetikkan perintah IOS akan mencoba untuk menampikan pesan error
atau peringata. Salah satunya tanda ‘^’ yang menunjukkan error dalam penulisan.
Code:
Switch>sh
confikur
^
% Invalid input detected at ‘^’ mark
^
% Invalid input detected at ‘^’ mark
Menampilkan
perintah sebelumnya
Code:
Switch>show
history
Manampilkan
kemungkinan perintah
Code:
Switch>di?
disconnect
disconnect
Menampilkan
manual help
Code:
Switch>?
Switch?sh ?
Switch?sh ?
Untuk
menghapus hasil konfigurasi yang telah tersimpan
Code:
hal ini biasanya di
lakukan untuk merubah settingan apabila ada kesalahan di config
Switch>enable
Switch#erase startup-config
untuk melihat config sebelumnya
Switch#show startup-config
dan reset Switchnya
Switch#reload
Switch>enable
Switch#erase startup-config
untuk melihat config sebelumnya
Switch#show startup-config
dan reset Switchnya
Switch#reload
Show
controllers serial – menampilkan informasi khusus hardware
interface. Perintah ini harus di-set termasuk nomor port/slot dari interface
serial.
Contoh :
Switch#show
controllers serial 0/1
Perintah
yang digunakan untuk seting clock rate sebagai berikut:
Switch(config)#interface
serial 0/0
Switch(config-if)#clock
rate 56000
Switch(config-if)#no
shutdown
Sebelum
meng-install Csco IOS ke Switch, cek dulu apakah RAM dan flash yang dibutuhkan
untuk install IOS tersebut memenuhi. Untuk melihat ukuran RAM dapat digunakan
perintah show version. Seperti contoh
tampilan di bawah ini.
Switch>show
flash
…<output
omitted>…
[12655376
bytes used, 4121840 available, 16777216 total] 16384K bytes of processor board
System flash (Read/Write)
Menampilkan
Setup Mode
Switch#Setup
Membuka
koneksi Telnet
Switch>telnet
Buat
Database VLAN pada Switch.
Switch>enable
Switch#vlan
Switch#vlan
database
Switch(vlan)#vlan
2 name guest
VLAN
2 added:
Name:
guest
Untuk
memudahan pemberian IP address pada host tiap-tiap VLAN ada baiknya kita membuat
DHCP server, dan pada contoh ini kita akan menggunakan IP 222.124.194.11
sebagai DNS server
Switch(config)#ip
dhcp pool vlan2
Switch(dhcp-config)#default-Switch
192.168.0.1
Switch(dhcp-config)#dns-server
222.124.194.11
Switch(dhcp-config)#network
192.168.0.0 255.255.255.0
Switch(dhcp-config)#exit
Buat
default routing yang berfungsi sebagai “the last resort” terhadap tujuan packet
dalam menuju alamat yang tidak terdapat pada routing tabel, sehingga packet
tidak di-dischard atau dibuang dari network.
Switch(config)#ip
route 0.0.0.0 0.0.0.0 222.124.194.1
Buat
NAT sehingga IP private yang berada pada VLAN bisa ditranlasi menuju IP Public,
masuk ke interface gigabitEthernet 0/1 dan setting sebgai NAT Outside, kemudian
masuk ke tiap-tiap Interface VLAN yang sudah kita buat dan set sebagai NAT
Inside.
Switch(config)#interface
gigabitEthernet 0/1
Switch(config-if)#ip
nat outside
Switch(config-if)#exit
Kemudian
buat aturan NAT dan jangan lupa untuk mengatur access-list agar mengizinkan
packet untuk lewat, perhatikan juga nomor aturan NAT dan access-list keduanya
harus mempunya nomor yang sama, jadi kalau aturan NAT-nya menggunakan nomor 1
maka pada access-list juga harus menggunakan nomor 1.
Switch(config)#ip
nat inside source list 1 interface gigabitEthernet 0/1 overload
Switch(config)#access-list
1 permit any
Switch(config)#
Kembali
ke Privilege Mode dan simpan hasil konfigurasian
Switch(config)#exit
Switch#copy
running-config startup-config
Switch#
Menghapus
file
Switch>enable
Switch#delete
Membuat
direktori baru
Switch>enable
Switch#mkdir
Memutuskan
koneksi jaringan yang ada
Switch>enable
Switch#disconnect
Konfigurasi
Class-map
Switch>enable
Switch#configure
terminal
Switch(config)#class-map
Menentukan
konfigurasi register
Switch>enable
Switch#configure
terminal
Switch(config)#config-register
Enkripsi
Modul
Switch>enable
Switch#configure
terminal
Switch(config)#crypto
Perintah
cisco untuk melihat konfigurasi ip route yang sudah ada / terdaftar
Core-Switch#show
ip route
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route
S 10.0.2.0 [1/0] via 172.20.114.86
S 10.0.3.0 [1/0] via 172.20.140.11
S 10.0.0.0 [1/0] via 172.20.114.85
S 10.0.1.0 [1/0] via 172.20.114.85
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route
S 10.0.2.0 [1/0] via 172.20.114.86
S 10.0.3.0 [1/0] via 172.20.140.11
S 10.0.0.0 [1/0] via 172.20.114.85
S 10.0.1.0 [1/0] via 172.20.114.85
Perintah
cisco untuk menghapus iproute static
misal : S 10.0.3.0 [1/0]
via 172.20.140.10
Core-Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Core-Switch(config)#no ip route 10.0.3.0 255.255.255.0 172.20.140.10
Core-Switch(config)#^Z
Enter configuration commands, one per line. End with CNTL/Z.
Core-Switch(config)#no ip route 10.0.3.0 255.255.255.0 172.20.140.10
Core-Switch(config)#^Z
Perintah
cisco untuk menambah iproute static,misal : 10.0.3.0 255.255.255.0
172.20.114.84
Core-Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Core-Switch(config)#ip route 10.0.3.0 255.255.255.0 172.20.114.84
Core-Switch(config)#^Z
Enter configuration commands, one per line. End with CNTL/Z.
Core-Switch(config)#ip route 10.0.3.0 255.255.255.0 172.20.114.84
Core-Switch(config)#^Z
Jangan
lupa untuk menyimpan konfigurasinya
Core-Switch#copy
running-config startup-config
Core-Switch#exit
Core-Switch#exit
Perintah
berikut adalah command line di switch cisco 2950 untuk mengaktifkan konfigurasi
static MAC Address, dan sebelumnya catat MAC Address di computer A dalam study
case ini adalah 00D0.972E.917C
Switch>en
Switch#config t
Switch(config)#mac-address-table static 00D0.972E.917C vlan 1 int f0/2
Switch(config-if)#^Z
Switch#config t
Switch(config)#mac-address-table static 00D0.972E.917C vlan 1 int f0/2
Switch(config-if)#^Z
Selanjutnya
aktifkan perintah konfigurasi port security dalam study case ini adalah
interface f0/5
Switch#
Switch>en
Switch#config t
Switch(config)#int f0/5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security mac-address sticky
Switch(config-if)#switchport port-security max 4
Switch(config-if)#switchport port-security violation shut down
Switch(config-if)#^Z
Switch>en
Switch#config t
Switch(config)#int f0/5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security mac-address sticky
Switch(config-if)#switchport port-security max 4
Switch(config-if)#switchport port-security violation shut down
Switch(config-if)#^Z
Artinya command line
/perintah diatas adalah port dari interface f0/5 hanya bisa di pakai maksimal 4
host atau empat computer.Jika seandainya kita tambahkan satu computer
lagi di hub D-link maka interface f0/5 akan langsung state to down atau mati.dan semua
computer yang terhubung dengan interface f0/5 tidak akan bisa terkoneksi dengan
computer A atau computer server, untuk mengaktifkan lagi interface f0/5 cabut
computer yang terhubung ke hub tadi, sehingga computer hanya terhubung 4 host
via int f0/5
Mengkonfigurasi
konsol line untuk membutuhkan password saat login
Switch(config) # line console 0
Switch(config-line) # password cisco123
Switch(config) # line console 0
Switch(config-line) # password cisco123
Switch(config-line)
# login
Mengatur
vty password untuk cisco123
Switch (config-line) # line vty 0 15
Switch (config-line) # password cisco123
Switch (config-line) # line vty 0 15
Switch (config-line) # password cisco123
Mengkonfigurasi
vty untuk membutuhkan password saat login:
Switch (config-line) # login
Switch (config-line) # end
Switch (config-line) # login
Switch (config-line) # end
Menampilkan
CDP
Switch>
show cdp
Perintah diatas
digunakan untuk menampilkan informasi tentang CDP (Cisco Discovery Protocol)
yang digunakan untuk komunikasi antar perangkat Cisco.
Menghapus
startup config
Switch#
erase startup-config
Menguji
koneksi
Switch#
ping 192.168.0.254
Unutk menguji konkesi
prinsipnya sama dengan melakukan ping ke destinantion host.
Assigning
Port VLAN
Switch(config)#
interface fa0/1
Switch(config-if)#
switchport mode access
Switch(cofnig-if)#
switchport access Vlan 2
Setting
Port-Speed dan Link-Mode
Switch#configure terminal
Switch(config)#interface nama-port (misal : interface fast ethernet 0/1)
Switch(config-if)#speed 100
Switch(config-if)#duplex full
Switch#configure terminal
Switch(config)#interface nama-port
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan nama-vlan
Switch#configure terminal
Switch(config)#interface nama-port
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan nama-vlan
Switch#configure terminal
Switch(config)#interface nama-port (misal : interface fast ethernet 0/1)
Switch(config-if)#speed 100
Switch(config-if)#duplex full
Switch#configure terminal
Switch(config)#interface nama-port
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan nama-vlan
Switch#configure terminal
Switch(config)#interface nama-port
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan nama-vlan
Menghapus
Semua Konfigurasi
Switch#erase startup-config
Switch#dir
Switch#delete flash:vlan.dat
Switch#dir
Switch#reload
Switch#erase startup-config
Switch#dir
Switch#delete flash:vlan.dat
Switch#dir
Switch#reload