Vlan Standard: Konfigurasi PC
Vlan Standard: Konfigurasi PC
Vlan Standard: Konfigurasi PC
VLAN STANDARD
Konfigurasi PC
PC0 :
IP Address : 192.168.10.1
Subnetmask : 255.255.255.0
PC1 :
IP Address : 192.168.10.2
Subnetmask : 255.255.255.0
C:\>ipconfig
Bluetooth Connection:
C:\>ping 192.168.10.2
C:\>
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW1
SW1(config)#vlan 10
SW1(config-vlan)#name GURU
SW1(config-vlan)#exit
SW1(config)#vlan 20
SW1(config-vlan)#name KEPSEK
SW1(config-vlan)#exit
SW1(config)#interface fa0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 10
SW1(config-if)#exit
SW1(config)#interface fa0/2
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 20
SW1(config-if)#exit
SW1(config)#exit
SW1#
%SYS-5-CONFIG_I: Configured from console by console
C:\>ipconfig
Bluetooth Connection:
C:\>ping 192.168.10.2
C:\>
Konfigurasi PC
PC2 :
IP Address : 192.168.10.3
Subnetmask : 255.255.255.0
PC3 :
IP Address : 192.168.10.4
Subnetmask : 255.255.255.0
Lakukan pengujian Ping dari PC2 ke PC0, PC1dan PC3, begitu juga dari PC3 ke PC0, PC1 dan PC2. Amati
apa kira-kira yang terjadi.
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW2
SW2(config)#vlan 10
SW2(config-vlan)#name GURU
SW2(config-vlan)#exit
SW2(config)#vlan 20
SW2(config-vlan)#name KEPSES
SW2(config-vlan)#exit
SW2(config)#interface fa0/1
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 10
SW2(config-if)#exit
SW2(config)#interface fa0/2
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 20
SW2(config-if)#exit
SW2(config)#exit
SW2#
%SYS-5-CONFIG_I: Configured from console by console
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW3
SW3(config)#vlan 10
SW3(config-vlan)#name GURU
SW3(config-vlan)#exit
SW3(config)#vlan 20
SW3(config-vlan)#name KEPSEK
SW3(config-vlan)#exit
SW3(config)#interface fa0/1
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 10
SW3(config-if)#exit
SW3(config)#interface fa0/2
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 20
SW3(config-if)#exit
SW3(config)#exit
SW3#
%SYS-5-CONFIG_I: Configured from console by console
Lakukan tes Ping dari PC2 ke PC0, PC1 dan PC3. Selanjutnya lakukan tes ping dari PC3 ke PC0, PC1
dan PC2. Perhatikan hasil dari masing-masing tes tersebut, lalu simpulkan apa perubahan yang
terjadi setelah dilakukan konfigurasi VLAN pada SW2 dan SW3
SW1>enable
SW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#interface range fa0/23 - 24
SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#exit
SW1(config)#exit
SW1#show interface trunk
Port Mode Encapsulation Status Native vlan
Fa0/23 on 802.1q trunking 1
Fa0/24 on 802.1q trunking 1
SW2>enable
SW2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#interface fa0/23
SW2(config-if)#switchport mode trunk
SW2(config-if)#exit
SW2(config)#exit
SW2#
%SYS-5-CONFIG_I: Configured from console by console
SW3>enable
SW3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW3(config)#interface fa0/24
SW3(config-if)#switchport mode trunk
SW3(config-if)#exit
SW3(config)#exit
SW3#
C:\>ipconfig
Bluetooth Connection:
C:\>ping 192.168.10.1
C:\>ping 192.168.10.2
C:\>ping 192.168.10.4
C:\>
Masih dengan konsep topologi yang sama dengan topologi mode Trunk, lakukan perubahan
konfigurasi pada setiap switch yang sebelumnya sudah dikonfigurasi table VLAN secara manual.
SW1>enable
SW1#show vlan brief
SW2>enable
SW2#show vlan brief
SW2(config)#no vlan 10
SW2(config)#no vlan 20
SW2(config)#exit
SW2#
%SYS-5-CONFIG_I: Configured from console by console
SW3>enable
SW3#show vlan brief
SW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#vlan 10
SW1(config-vlan)#name GURU
SW1(config-vlan)#exit
SW1(config)#vlan 20
SW1(config-vlan)#name KEPSEK
SW1(config-vlan)#exit
SW1(config)#exit
SW1#
%SYS-5-CONFIG_I: Configured from console by console
SW2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW2(config)#vtp domain SMK
Domain name already set to SMK.
SW2(config)#vtp password smk
Setting device VLAN database password to smk
SW2(config)#exit
SW2#
SW3>enable
SW3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW3(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW3(config)#vtp domain SMK
Domain name already set to SMK.
SW3(config)#vtp password smk
Setting device VLAN database password to smk
SW3(config)#exit
SW3#
%SYS-5-CONFIG_I: Configured from console by console
SW1>enable
SW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#vlan 30
SW1(config-vlan)#name TU
SW1(config-vlan)#exit
SW1(config)#exit
SW1#
%SYS-5-CONFIG_I: Configured from console by console
Amati setiap perubahan pada SW2 dan SW3 ketika ada perubahan pada table VLAN di dalam SW1
INTER-VLAN ROUTING
Sebelum melakukan konfigurasi inte-vlan routing rubah terlebih dahulu IP Address pada masing-
masing PC sesuai segment VLAN nya.
PC0 :
IP Address : 192.168.10.2
Subnetmask : 255.255.255.0
Gateway : 192.168.10.1
PC1:
IP Address : 192.168.20.2
Subnetmask : 255.255.255.0
Gateway : 192.168.20.1
PC2:
IP Address : 192.168.20.3
Subnetmask : 255.255.255.0
Gateway : 192.168.20.1
PC3:
IP Address : 192.168.10.3
Subnetmask : 255.255.255.0
Gateway : 192.168.10.1
Konfigurasi R1
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface fa0/0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fa0/0.10
R1(config-subif)#encapsulation dot1q 10
R1(config-subif)#ip address 192.168.10.1 255.255.255.0
R1(config-subif)#exit
R1(config)#interface fa0/0.20
R1(config-subif)#encapsulation dot1q 20
R1(config-subif)#ip address 192.168.20.1 255.255.255.0
R1(config-subif)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console
SW1>enable
SW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#interface fa0/22
SW1(config-if)#switchport mode trunk
SW1(config-if)#exit
SW1(config)#exit
SW1#
%SYS-5-CONFIG_I: Configured from console by console
C:\>ipconfig
Bluetooth Connection:
C:\>ping 192.168.10.3
C:\>ping 192.168.20.2
C:\>ping 192.168.20.3
C:\>
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW4
SW4(config)#vlan 100
SW4(config-vlan)#name TKJ
SW4(config-vlan)#exit
SW4(config)#vlan 200
SW4(config-vlan)#name FARMASI
SW4(config-vlan)#exit
SW4(config)#vlan 300
SW4(config-vlan)#name PERHOTELAN
SW4(config-vlan)#exit
SW4(config)#interface fa0/1
SW4(config-if)#switchport mode access
SW4(config-if)#switchport access vlan 100
SW4(config-if)#exit
SW4(config)#interface range fa0/22 - 24
SW4(config-if-range)#switchport mode trunk
SW4(config-if-range)#exit
SW4(config)#vtp mode server
Device mode already VTP SERVER.
SW4(config)#vtp domain JURUSAN
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW5
SW5(config)#interface fa0/23
SW5(config-if)#switchport mode trunk
SW5(config-if)#exit
SW5(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW5(config)#vtp domain JURUSAN
Domain name already set to JURUSAN.
SW5(config)#vtp password smk
Setting device VLAN database password to smk
SW5(config)#interface fa0/1
SW5(config-if)#switchport mode access
SW5(config-if)#switchport access vlan 200
SW5(config-if)#exit
SW5(config)#exit
SW5#
%SYS-5-CONFIG_I: Configured from console by console
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW6
SW6(config)#interface fa0/24
SW6(config-if)#switchport mode trunk
SW6(config-if)#exit
SW6(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW6(config)#vtp domain JURUSAN
Domain name already set to JURUSAN.
SW6(config)#vtp password smk
Setting device VLAN database password to smk
SW6(config)#interface fa0/1
SW6(config-if)#switchport mode access
SW6(config-if)#switchport access vlan 300
SW6(config-if)#exit
SW6(config)#exit
SW6#
%SYS-5-CONFIG_I: Configured from console by console
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface fa0/1
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fa0/1.100
R2(config-subif)#encapsulation dot1q 100
R2(config-subif)#ip address 192.168.110.1 255.255.255.0
R2(config-subif)#exit
R2(config)#interface fa0/1.200
R2(config-subif)#encapsulation dot1q 200
R2(config-subif)#ip address 192.168.120.1 255.255.255.0
R2(config-subif)#exit
R2(config)#interface fa0/1.300
R2(config-subif)#encapsulation dot1q 300
R2(config-subif)#ip address 192.168.130.1 255.255.255.0
R2(config-subif)#exit
R2(config)#exit
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
PC4 :
IP Address : 192.168.110.2-192.168.110.254
Subnetmask : 255.255.255.0
Gateway : 192.168.110.1
PC5:
IP Address : 192.168.120.2-192.168.120.254
Subnetmask : 255.255.255.0
Gateway : 192.168.120.1
PC6 :
IP Address : 192.168.130.2-192.168.130.254
Subnetmask : 255.255.255.0
Gateway : 192.168.130.1
Lakukan pengujian konfigurasi pada VLAN wilayah R2. Pastikan semua PC dapat saling terhubung.
Lakukan pengujian dari anggota VLAN pada R2 ke anggota VLAN pada R1. Amati proses yang terjadi.
Konfiguras Routing R1 dan R2 untuk menghubungkan VLAN pada R1 dengan VLAN pada R2
R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fa0/1
R1(config-if)#ip address 10.10.10.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
R1(config-if)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console
R2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
R2(config-if)#exit
R2(config)#exit
R2#
%SYS-5-CONFIG_I: Configured from console by console
R1#
Menambahkan table routing ke network VLAN 100, VLAN 200 dan VLAN 300 yang terdapat pada
wilayah R2
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 192.168.110.0 255.255.255.0 fa0/1
R1(config)#ip route 192.168.120.0 255.255.255.0 fa0/1
R1(config)#ip route 192.168.130.0 255.255.255.0 fa0/1
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, 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
R2#
Menambahkan table routing yang mengarah ke network VLAN 10 dan VLAN 20 pada wilayah R1
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip route 192.168.10.0 255.255.255.0 fa0/0
R2(config)#ip route 192.168.20.0 255.255.255.0 fa0/0
R2(config)#exit
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
Sampel : akan dilakukan ping dari VLAN 100 menuju ke VLAN 10 dan VLAN 20
Packet Tracer PC Command Line 1.0
C:\>ipconfig
Bluetooth Connection:
C:\>ping 192.168.10.2
C:\>ping 192.168.10.2
C:\>ping 192.168.20.2
C:\>ping 192.168.20.2
C:\>
Skenario : VLAN 100, VLAN 200 dan VLAN 300 pada anggota R2 tidak diizinkan mengakses VLAN 20
pada R1
Logika penyelesaian : Karena yang diblok adalah jalur masuk dari R2 maka konfigurasi ACL akan
dilakukan pada router terdekat dengan VLAN 20 yaitu pada R1. Disini ACL yang dipakai adalah ACL-
Extended yang akan mengeblok koneksi dari alamat network. Mengingat bahwa VLAN 100, VLAN
200 dan VLAN 300 pengalamatan dilakukan secara dinamis.
R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#access-list 100 deny ip 192.168.110.0 0.0.0.255 192.168.20.0 0.0.0.255
R1(config)#access-list 100 deny ip 192.168.120.0 0.0.0.255 192.168.20.0 0.0.0.255
R1(config)#access-list 100 deny ip 192.168.130.0 0.0.0.255 192.168.20.0 0.0.0.255
R1(config)#access-list 100 permit ip 192.168.110.0 0.0.0.255 any
R1(config)#access-list 100 permit ip 192.168.120.0 0.0.0.255 any
R1(config)#access-list 100 permit ip 192.168.130.0 0.0.0.255 any
R1(config)#interface fa0/1
R1(config-if)#ip access-group 100 in
R1(config-if)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#show access-list
Extended IP access list 100
10 deny ip 192.168.110.0 0.0.0.255 192.168.20.0 0.0.0.255 (4 match(es))
20 deny ip 192.168.120.0 0.0.0.255 192.168.20.0 0.0.0.255
30 deny ip 192.168.130.0 0.0.0.255 192.168.20.0 0.0.0.255
40 permit ip 192.168.110.0 0.0.0.255 any (4 match(es))
50 permit ip 192.168.120.0 0.0.0.255 any (4 match(es))
60 permit ip 192.168.130.0 0.0.0.255 any
C:\>ipconfig
Bluetooth Connection:
C:\>ping 192.168.10.2
C:\>ping 192.168.20.2
C:\>
Lakukan juga pengujian dari VLAN 200 dan VLAN 300 menuju ke VLAN 10 dan VLAN 20.