Cari Blog Ini

Kamis, 12 April 2012

konfigurasi Vlan simple

VLAN disebut juga virtual LAN, pada tutorial kali ini akan dijelaskan bagaiman membuat VLAN pada CISCO. disini saya memakai simulasi CISCO yaitu Packet Tracer V5, sedangkan definisi VLAN sendiri anda bisa melihat disini

kita akan membuat 3 vlan yaitu :
1. vlan 10 dosen
2. vlan 20 mahasiswa
3. vlan 30 karyawan

berikut gambarannya :


vlan

definisikan ip address gateway di router dengan membuat interface virtual :

- untuk gateway vlan 10

01    Router>enable
02    Password:
03    Router#configure terminal
04    Enter configuration commands, one per line.  End with CNTL/Z.
05    Router(config)#interface fa0/0.10
06    Router(config-subif)#encapsulation dot1Q 10
07    Router(config-subif)#ip address 192.168.10.254 255.255.255.0
08    Router(config-if)#exit
09    Router(config)#exit
10    %SYS-5-CONFIG_I: Configured from console by console

- untuk gateway vlan 20

01    Router>enable
02    Password:
03    Router#configure terminal
04    Enter configuration commands, one per line.  End with CNTL/Z.
05    Router(config)#interface fa0/0.20
06    Router(config-subif)#encapsulation dot1Q 20
07    Router(config-subif)#ip address 192.168.20.254 255.255.255.0
08    Router(config-if)#exit
09    Router(config)#exit
10    %SYS-5-CONFIG_I: Configured from console by console

- untuk gateway vlan 30

01    Router>enable
02    Password:
03    Router#configure terminal
04    Enter configuration commands, one per line.  End with CNTL/Z.
05    Router(config)#interface fa0/0.30
06    Router(config-subif)#encapsulation dot1Q 30
07    Router(config-subif)#ip address 192.168.30.254 255.255.255.0
08    Router(config-if)#exit
09    Router(config)#exit
10    %SYS-5-CONFIG_I: Configured from console by console

Lalu kita setting switchnya, langkah-langkahnya sebagai berikut :
- Definisikan Vlan :

1    Switch#vlan database
2    Switch(vlan)#vlan 10 name Dosen
3    Switch(vlan)#vlan 20 name Mahasiswa
4    Switch(vlan)#vlan 30 name Karyawan

- Delegasikan port untuk mengakses tiap-tiap Vlan yang sudah didefinisikan :

01    Switch>enable
02    Switch#configure terminal
03    Enter configuration commands, one per line.  End with CNTL/Z.
04    Switch(config)#interface fa0/1 -> Menuju router
05    Switch(config-if)#switchport mode trunk
06    Switch(config-if)#exit
07    Switch(config)#interface fa0/2 -> Menuju PC Dosen
08    Switch(config-if)#switchport access vlan 10
09    Switch(config-if)#exit
10    Switch(config)#interface fa0/3 -> Menuju PC Mahasiswa
11    Switch(config-if)#switchport access vlan 20
12    Switch(config-if)#exit
13    Switch(config)#interface fa0/4 -> Menuju PC Karyawan
14    Switch(config-if)#switchport access vlan 30
15    Switch(config-if)#exit

- verifikasi vlan

01    Switch#show vlan
02    
03    VLAN Name                             Status    Ports
04    ---- -------------------------------- --------- -------------------------------
05    1    default                          active    Fa0/5, Fa0/6, Fa0/7, Fa0/8
06                                                    Fa0/9, Fa0/10, Fa0/11, Fa0/12
07                                                    Fa0/13, Fa0/14, Fa0/15, Fa0/16
08                                                    Fa0/17, Fa0/18, Fa0/19, Fa0/20
09                                                    Fa0/21, Fa0/22, Fa0/23, Fa0/24
10    10   dosen                            active    Fa0/2
11    20   mahasiswa                        active    Fa0/3
12    30   karyawan                         active    Fa0/4

Setting IP masing – masing PC :

01    - PC 0 :
02    IP Address………………….: 192.168.10.1
03    Subnet Mask…………………: 255.255.255.0
04    Default Gateway……………..: 192.168.10.254
05    
06    - PC 1 :
07    IP Address………………….: 192.168.20.1
08    Subnet Mask…………………: 255.255.255.0
09    Default Gateway……………..: 192.168.20.254
10    
11    - PC 2 :
12    IP Address………………….: 192.168.30.1
13    Subnet Mask…………………: 255.255.255.0
14    Default Gateway……………..: 192.168.30.254

- Test Ping ke router dan ke masing – masin pc :

01    PC>ipconfig
02    
03    IP Address......................: 192.168.10.1
04    Subnet Mask.....................: 255.255.255.0
05    Default Gateway.................: 192.168.10.254
06    
07    PC>ping 192.168.20.1
08    
09    Pinging 192.168.20.1 with 32 bytes of data:
10    
11    Reply from 192.168.20.1: bytes=32 time=109ms TTL=127
12    
13    Ping statistics for 192.168.20.1:
14        Packets: Sent = 2, Received = 1, Lost = 1 (50% loss),
15    Approximate round trip times in milli-seconds:
16        Minimum = 109ms, Maximum = 109ms, Average = 109ms
17    
18    Control-C
19    ^C
20    PC>ping 192.168.30.1
21    
22    Pinging 192.168.30.1 with 32 bytes of data:
23    
24    Reply from 192.168.30.1: bytes=32 time=109ms TTL=127
25    Reply from 192.168.30.1: bytes=32 time=125ms TTL=127
26    
27    Ping statistics for 192.168.30.1:
28        Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
29    Approximate round trip times in milli-seconds:
30        Minimum = 109ms, Maximum = 125ms, Average = 117ms
31    
32    Control-C
33    ^C
34    PC>ping 192.168.10.254
35    
36    Pinging 192.168.10.254 with 32 bytes of data:
37    
38    Reply from 192.168.10.254: bytes=32 time=63ms TTL=255
39    Reply from 192.168.10.254: bytes=32 time=62ms TTL=255
40    
41    Ping statistics for 192.168.10.254:
42        Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
43    Approximate round trip times in milli-seconds:
44        Minimum = 62ms, Maximum = 63ms, Average = 62ms
45    
46    Control-C

reserensi dari bang toink :

http://mti.ugm.ac.id/~thohir/

Tidak ada komentar:

Posting Komentar