Jumat, 21 November 2014

Pengetahuan dasar VLAN



Switch 2
S2(config)#interface gigabitEthernet 1/1
S2(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1,
changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1,
changed state to up
S2(config-if)#exit
S2(config)#interface gigabitEthernet 1/2
S2(config-if)#switchport mode trunk
S2(config-if)#exit
S2(config)#interface fastEthernet 0/23
S2(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23,
changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23,
changed state to up
S2(config-if)#exit
S2(config)#interface fastEthernet 0/24
S2(config-if)#switchport mode trunk
S2(config-if)#exit
Switch 3
S3(config)#interface fastEthernet 0/24
S3(config-if)#switchport mode trunk
S3(config-if)#exit
S3(config)#interface gigabitEthernet 1/1
S3(config-if)#switchport mode trunk
S3(config-if)#exit

Virtual LAN (VLAN)

2.Create VLAN

Setelah konfigurasi server VTP waktu untuk mengatur VLAN. Kita hanya perlu membuat VLAN pada server VTP dan ulang akan dilakukan oleh VTP Server secara otomatis.
Switch 1
S1(config)#vlan 10
S1(config-vlan)#exit
S1(config)#vlan 20
S1(config-vlan)#exit
S1(config)#

Seperti yang telah kita mengkonfigurasi VTP server dalam jaringan kami sehingga kami tidak perlu membuat VLAN pada S2 atau S3. Kita hanya perlu menghubungkan VLAN dengan port.

3.Assign VLAN membership

Switch 1
S1(config)#interface fastEthernet 0/1
S1(config-if)#switchport access vlan 10
S1(config-if)#interface fastEthernet 0/2
S1(config-if)#switchport access vlan 20
Switch 2
S2(config)#interface fastEthernet 0/1
S2(config-if)#switchport access vlan 10
S2(config-if)#interface fastEthernet 0/2
S2(config-if)#switchport access vlan 20
Switch 3
S3(config)#interface fastEthernet 0/1
S3(config-if)#switchport access vlan 10
S3(config-if)#interface fastEthernet 0/2
S3(config-if)#switchport access vlan 20



Sekarang kita memiliki dua vlan. Untuk menguji konektivitas melakukan bentuk ping 10.0.0.2 ke 10.0.0.3 dan 10.0.0.4. jika Anda mendapatkan berhasil memutar ulang maka Anda telah berhasil membuat VLAN dan VTP server.

Spanning-Tree Protocol

Dalam konfigurasi ini STP akan memblokir port F0/24 S1, F0/23 dan F0/24 S2 dan S3 F0/24 untuk menghindari lingkaran pada lapisan ke dua. Verifikasi port tersebut diblokir karena fungsi STP

4.Verify STP ports

Switch 2
S2#show spanning-tree active
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0002.174D.7794
             Cost        4
             Port        26(GigabitEthernet1/2)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
 
  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     00D0.FF08.82E1
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20
 
Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- ---------------------------
Fa0/1            Desg FWD 19        128.1    P2p
Fa0/2            Desg FWD 19        128.2    P2p
Fa0/23           Desg FWD 19        128.23   P2p
Fa0/24           Altn BLK 19        128.24   P2p
Gi1/1            Desg FWD 4         128.25   P2p
Gi1/2            Root FWD 4         128.26   P2p
[Output is omitted]
S2#
You can test STP protocols status on S1 and S3 also with show spanning-tree active command

Router on Stick

Pada titik ini konfigurasi anda telah berhasil menjalankan dua VLAN tetapi mereka tidak akan terhubung satu sama lain. Untuk membuat komunikasi intra VLAN kita perlu mengkonfigurasi router. Untuk melakukan hal ini klik dua kali pada router dan pilih CLI.

5.Configure antar VLAN

Router
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown

Router(config-if)#switchport mode trunk
Router(config-if)#exit
 
Router(config)#interface fastEthernet 0/0.10  =>membentuk subinterface VLAN10
Router(config-subif)#encapsulation dot1Q 10   =>protocol vlan trunking 802.1q
Router(config-subif)#ip address 10.0.0.1 255.0.0.0  =>ip gateway u para member vlan
Router(config-subif)#exit
 
Router(config)#interface fastEthernet 0/0.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 20.0.0.1 255.0.0.0
Router(config-subif)#exit
 
>TES PING ANTAR MEMBER VLAN
>SHOW IP ROUTE
#copy running-config startup-config
 
 

VLAN Trunking Protocol

VTP cukup setting satu switch saja dan infonya akan tersebar ke switch lain. Klik dua kali pada Switch1 dan pilih CLI. Set hostname ke S1 dan menciptakan nama domain VTP contoh dan mengatur sandi untuk mypassword (Ingat password case sensitive).
Ketententaun:
-VTP Version (versi 1,2 ,3) dalam satu domain harue memiliki version yang sama
-VTP Domain : harus sama antara nama di server dn client
-VTP mode: tentukan mana switch server dan client
-VTP password: password server dan client harus sama

Switch 1
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname S1
S1(config)#vtp mode server
Device mode already VTP SERVER.
S1(config)#vtp domain example

S1(config)#vtp version 2
S1(config)#vtp password mypassword
S1(config)#end

2.Configure VTP clients

Setelah Anda membuat domain VTP. Konfigurasi tersisa Beralih ke modus Client.

Switch 2
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname S2
S2(config)#vtp mode client
S2(config)#vtp domain example
S2(config)#vtp password mypassword
S2(config)#
Switch 3
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostname S3
S3(config)#vtp mode client
S3(config)#vtp domain example
S3(config)#vtp password mypassword
S3(config)#



#show vtp status

Selanjutnya proses pembuatan VLAN cukup di SW1 saja atau di server saja.



VLAN ID
VLAN NAME
VLAN MEMBER
10
VLAN10
PC0,PC3
20
VLAN20
PC1,PC4
30
VLAN30
PC2,PC5
 
Sw1#conf t
#vlan 10
#Name vlan10

#vlan 20

#name vlan20

#vlan 30

#name vlan30

#sh vlan brief



SW1#config t

SW1#int fa0/1

SW1#switchport mode trunk

SW1#description koneksi ke sw2 (server to client)

SW1#end
SW1#sh int fa0/1

SW1#sh vlan brief



SW2#config t

SW2#int fa0/1

SW2#switchport mode trunk

SW2#description koneksi ke sw1 (client to serve)

SW2#end
SW2#sh int fa0/1

SW2#sh vlan brief



SW2#int fa0/11

SW2#switchport access vlan 10

SW2#int fa0/12

SW2#switchport access vlan 20

SW2#int fa0/13

SW2#switchport access vlan 10



Selanjutnya berikan IP pada tiap-tiap PC dan tes koneksi……

dengan VTP kita bias PING antar VLAN sejenis, agar bias PING antar VLAN gunakan Router on a STICK.

Tidak ada komentar:

Posting Komentar