Anda di halaman 1dari 6

Konfigurasi Dasar Switch Cisco: VLAN Dasar

Konfigurasi Dasar Switch Cisco: VLAN Dasar

Melanjutkan tulisan sebelumnya yang berjudul Konfigurasi Dasar Switch Cisco: Mengetahui Konfigurasi Dasar Switch,
tulisan kali ini akan menjelaskan tentang bagaimana mengkonfigurasi VLAN di switch cisco kamu. Untuk konfigurasi PC0
dan PC1 adalah sebagai berikut:
PC0
IP Address.: 192.168.1.4
Subnet Mask: 255.255.255.0
Default Gateway..: 192.168.1.1
PC1
IP Address.: 192.168.1.3
Subnet Mask: 255.255.255.0
Default Gateway..: 192.168.1.1
Pertama, ubah nama switch ini dari Switch menjadi ALSwitch atau nama lain sesuai keinginan kamu. Bisa myswitch,
OfficeSwitch atau nama yang lain. Gunakan perintah hostname lalu nama switch yang kamu inginkan.
Switch>ena
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname ALSwitch
ALSwitch(config)#
Kemudian buat password di switch kamu.
ALSwitch(config)#line con 0
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#login
ALSwitch(config-line)#line vty 0 5
ALSwitch(config-line)#password cisco
ALSwitch(config-line)#login
ALSwitch(config-line)#exit
ALSwitch(config)#enab
ALSwitch(config)#enable password cisco
ALSwitch(config)#ena
ALSwitch(config)#enable secret class
ALSwitch(config)#
Ketikkan exit untuk keluar, lalu coba password yang telah kamu buat. Sebelum masuk, akan muncul pesan seperti di
bawah.
User Access Verification
Password: <- password di sini adalah cisco
ALSwitch>ena
Password: <- password di sini adalah class
ALSwitch#
Selanjutnya, kamu konfigurasi VLAN [virtual LANs] di switch kamu.
ALSwitch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ALSwitch(config)#interface vlan 1
ALSwitch(config-if)#ip address 192.168.1.2 255.255.255.0
ALSwitch(config-if)#exit
ALSwitch(config)#ip default-gateway 192.168.1.1
ALSwitch(config)#exit

ALSwitch#
%SYS-5-CONFIG_I: Configured from console by console
ALSwitch#show interfaces vlan 1
Vlan1 is administratively down, line protocol is down
Hardware is CPU Interface, address is 000c.854a.b0b1 (bia 000c.854a.b0b1)
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 21:40:21, output never, output hang never
Last clearing of show interface counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1682 packets input, 530955 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
563859 packets output, 0 bytes, 0 underruns
0 output errors, 23 interface resets
0 output buffer failures, 0 output buffers swapped out
Karena VLAN 1 di atas belum dihidupkan, maka muncul pesan Vlan1 is administratively down, line protocol is down.
Alias VLAN 1 kamu masih mati. Untuk menghidupkannya, ketikkan perintah no shutdown.
ALSwitch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ALSwitch(config)#interface vlan 1
ALSwitch(config-if)#no shutdown
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to uap
ALSwitch(config-if)#exit
ALSwitch(config)#exit
ALSwitch#
%SYS-5-CONFIG_I: Configured from console by console
Kemudian lihat lagi VLAN 1 dengan perintah show interfaces vlan 1 dan sekarang VLAN 1 sudah aktif.
ALSwitch#show interfaces vlan 1
Vlan1 is up, line protocol is up
Hardware is CPU Interface, address is 000c.854a.b0b1 (bia 000c.854a.b0b1)
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 21:40:21, output never, output hang never
Last clearing of show interface counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1682 packets input, 530955 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
563859 packets output, 0 bytes, 0 underruns
0 output errors, 23 interface resets
0 output buffer failures, 0 output buffers swapped out
Jangan lupa amankan hasil pekerjaan kamu.
ALSwitch#copy running-config startup-config
Destination filename [startup-config]?
Building configuration
[OK]
ALSwitch#

Selanjutnya, setting interface fastethernet 0/4 di ALSwitch dengan kecepatan 100 Mbps dan dalam mode full duplex.
ALSwitch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ALSwitch(config)#interface fastEthernet 0/4
ALSwitch(config-if)#speed 100
ALSwitch(config-if)#duplex full
%LINK-5-CHANGED: Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
Lalu jangan lupa cek hasil setting kamu.
ALSwitch#show int fa 0/4
FastEthernet0/4 is down, line protocol is down (disabled)
Hardware is Lance, address is 0007.ec69.c404 (bia 0007.ec69.c404)
BW 100000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s
input flow-control is off, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of show interface counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
956 packets input, 193351 bytes, 0 no buffer
Received 956 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
2357 packets output, 263570 bytes, 0 underruns
0 output errors, 0 collisions, 10 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
ALSwitch#
Kamu cek koneksi antara PC0 dan PC1 menggunakan ping di cmd. Apa hasilnya? Apakah PC0 dan PC1 tidak terhubung? Hal
ini terjadi karena Port FA0/1 yang terhubung dengan PC0 belum disamakan speed dan jenis duplexnya dengan Port FA0/4
yang terhubung ke PC1. Oke, kamu setting kembali switch kamu.
ALSwitch(config)#int fastEthernet 0/1
ALSwitch(config-if)#speed 100
ALSwitch(config-if)#duplex full
Kemudian cek kembali koneksi anatara PC0 dan PC1 dan jika belum bisa terkoneksi, kamu cek kembali interface
FastEthernet di PC0 dan di PC1. Pastikan interfacenya berkecepatan 100Mbps dan Full Duplex. Setelah itu, lihat hasil
konfigurasi yang telah kamu lakukan. Pastikan ada informasi VLAN 1 up.
ALSwitch#show interfaces vlan 1Vlan1 is up, line protocol is upHardware is CPU Interface, address is
000c.854a.b0b1 (bia 000c.854a.b0b1)
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 21:40:21, output never, output hang never
Last clearing of show interface counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1682 packets input, 530955 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

563859 packets output, 0 bytes, 0 underruns


0 output errors, 23 interface resets
0 output buffer failures, 0 output buffers swapped out
ALSwitch#
Salin hasil konfigurasi kamu menjadi konfigurasi startup dengan perintah copy running-config startup-config.
ALSwitch#copy running-config startup-configDestination filename [startup-config]?
Building configuration
[OK]
ALSwitch#
Kemudian cek konfigurasi yang berjalan di switch kamu.
ALSwitch#show running-config
Building configuration
Current configuration : 1249 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname ALSwitch
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
enable password cisco
!
!
!
interface FastEthernet0/1
duplex full
speed 100
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
duplex full
speed 100
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!

FastEthernet0/5
FastEthernet0/6
FastEthernet0/7
FastEthernet0/8
FastEthernet0/9
FastEthernet0/10
FastEthernet0/11
FastEthernet0/12
FastEthernet0/13

interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!
interface
!

FastEthernet0/14
FastEthernet0/15
FastEthernet0/16
FastEthernet0/17
FastEthernet0/18
FastEthernet0/19
FastEthernet0/20
FastEthernet0/21
FastEthernet0/22
FastEthernet0/23
FastEthernet0/24
GigabitEthernet1/1
GigabitEthernet1/2

interface Vlan1
ip address 192.168.1.2 255.255.255.0
!
ip default-gateway 192.168.1.1
!
!
line con 0
password cisco
login
!
line vty 0 4
password cisco
login
line vty 5
password cisco
login
line vty 6 15
login
!
!
end
ALSwitch#
Cek kembali koneksi dari PC0 yang memiliki IP 192.168.1.4 ke IP-IP lainnya.
PC>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time=4ms TTL=255
Reply from 192.168.1.2: bytes=32 time=4ms TTL=255
Reply from 192.168.1.2: bytes=32 time=5ms TTL=255
Reply from 192.168.1.2: bytes=32 time=4ms TTL=255
Ping statistics for 192.168.1.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 5ms, Average = 4ms
PC>ping 192.168.1.3
Pinging 192.168.1.3 with 32 bytes of data:
Reply from 192.168.1.3: bytes=32 time=8ms TTL=128

Reply from 192.168.1.3: bytes=32 time=9ms TTL=128


Reply from 192.168.1.3: bytes=32 time=8ms TTL=128
Reply from 192.168.1.3: bytes=32 time=8ms TTL=128
Ping statistics for 192.168.1.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 8ms, Maximum = 9ms, Average = 8ms
Oke, semuanya telah terkoneksi.
Konfigurasi VLAN Dasar telah selesai. Kini kedua PC kamu, PC0 dan PC1 dapat melakukan komunikasi.