Selasa, 11 Juni 2013

Membuat VLAN secara DHCP

Iseng-iseng lagi bengong, hahahahhahaa.., keinget waktu dulu di training pernah dikasih tau masalah DHCP. Tapi gak cuman itu, DHCP-nya ditambahkan dengan VLAN. Kita buat aja deh case jaringannya sederhana aja, biar gak capek buat ngertiinnya.

Yuk kita langsung cabs alias cabut ke case-nya.

1.    Buat 1 switch tipe 2960 dan 1 router tipe 1841 lalu hubungkan seperti gambar di bawah ini.

2.    Lakukan konfigurasi Switch
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hos S1
S1(config)#vlan 10
S1(config-vlan)#name VLAN10
S1(config-vlan)#vlan 20
S1(config-vlan)#name VLAN20
S1(config-vlan)#vlan 30
S1(config-vlan)#name VLAN30
S1(config-vlan)#do sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                                Gig1/1, Gig1/2
10   VLAN10                           active   
20   VLAN20                           active   
30   VLAN30                           active   
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
10   enet  100010     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
30   enet  100030     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0  
1003 tr    101003     1500  -      -      -        -    -        0      0  
1004 fdnet 101004     1500  -      -      -        ieee -        0      0  
1005 trnet 101005     1500  -      -      -        ibm  -        0      0  

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------
S1(config-vlan)#exit
S1(config)#int range fa0/2-5
S1(config-if-range)#switchport mode access
S1(config-if-range)#switchport access vlan 10
S1(config-if-range)#exit
S1(config)#int range fa0/6-9
S1(config-if-range)#switchport mode access
S1(config-if-range)#switchport access vlan 20
S1(config-if-range)#exit
S1(config)#int range fa0/10-15
S1(config-if-range)#switchport mode access
S1(config-if-range)#switchport access vlan 30
S1(config-if-range)#
%LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to up

S1(config-if-range)#exit
S1(config)#int gig1/1
S1(config-if)#sw
S1(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

3.    Lakukan konfigurasi Router
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos R1
R1(config)#int fa0/0
R1(config-if)#no sh
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip address 192.168.10.1 255.255.255.0
R1(config-subif)#no sh
R1(config-subif)#exit
R1(config)#int fa0/0.2
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip address 192.168.20.1 255.255.255.0
R1(config-subif)#no sh
R1(config-subif)#ex
R1(config)#int fa0/0.3
R1(config-subif)#encapsulation dot1Q 30
R1(config-subif)#ip address 192.168.30.1 255.255.255.0
R1(config-subif)#no sh
R1(config-subif)#ex
R1(config)#

4.    Lakukan konfigurasi DHCP pada R1
R1(config)#ip dhcp pool DHCP-VLAN10
R1(dhcp-config)#default-router 192.168.10.1
R1(dhcp-config)#network 192.168.10.1 255.255.255.0
R1(dhcp-config)#ex
R1(config)#ip dhcp pool DHCP-VLAN20
R1(dhcp-config)#default-router 192.168.20.1
R1(dhcp-config)#network 192.168.20.1 255.255.255.0
R1(dhcp-config)#ex
R1(config)#ip dhcp pool DHCP-VLAN30
R1(dhcp-config)#default-router 192.168.30.1
R1(dhcp-config)#network 192.168.30.1 255.255.255.0
R1(dhcp-config)#ex
R1(config)#

5.    Hasil yang didapat setelah PC dibuat secara DHCP
·      VLAN 10:
PC-0
PC-1
·      VLAN 20:
PC-2
·      VLAN 30:
PC-3
PC-4
PC-5
Gampang kan yaa prinsip DHCP ini? Buat konsep DHCP-nya, lalu tentukan default router-nya, terus network-nya deh.. Kalau ada yang kurang jelas, langsung tanya aja kea ne yaaa… SEMANGAAAATTTTT!!!!




Tidak ada komentar:

Posting Komentar