Jumat, 24 November 2017

Vlan dan Router

First of all we will make the network topology as in the following picture,


If you've made a topology like the picture above, then we fill in the PC IP address of each PC

  







then we make vlan in switch 1 with command,


Switch>en

Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#name Muhammad-Zaid
Switch(config-vlan)#ex
Switch(config)#vlan 20
Switch(config-vlan)#name Misbakhul-Munir
Switch(config-vlan)#ex

then Also in Switch 0,

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 30
Switch(config-vlan)#name pakeko
Switch(config-vlan)#ex
Switch(config)#vlan 40
Switch(config-vlan)#name masheru
Switch(config-vlan)#ex

next we go for Pc 0-1 to vlan 10 Pc 2-3 to vlan 20,

Switch(config)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#ex
Switch(config)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#ex
Switch(config)#int fa0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#ex
Switch(config)#int fa0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#ex

and also in pc 4-5 we input into vlan 30 and pc 6-7 to vlan 40

Switch(config)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#ex
Switch(config)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#ex
Switch(config)#int fa0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 40
Switch(config-if)#ex
Switch(config)#int fa0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 40
Switch(config-if)#ex

Then we add ip on the 2nd part router fa0 / 0 and 0/1 with configuration like this,

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip add 192.168.5.7 255.255.255.128
Router(config-if)#no shut
Router(config)#int fa0/0
Router(config-if)#ip add 192.168.20.64 255.255.255.192
Router(config-if)#no shut
Router(config-if)#ex

and also we add ip on router 0 with configuration like this,

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip add 192.168.5.6 255.255.255.128
Router(config-if)#no shut
Router(config-if)#ex
Router(config)#int fa0/0
Router(config-if)#ip add 192.168.10.11 255.255.255.0
Router(config-if)#no shut
Router(config-if)#ex 

if we have registered vlan 10 and 20 to router 2 with configuration like this,

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/1.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip add 192.168.10.35 255.255.255.224
Router(config-subif)#no shut
Router(config-subif)#ex
Router(config)#int fa0/1.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip add 192.168.20.35 255.255.255.224
Router(config-subif)#no shut
Router(config-subif)#ex

then we also add vlan 30 and 40 in router 0 with configuration like this,

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa0/0.30
Router(config-subif)#encapsulation dot1Q 30
Router(config-subif)#ip add 192.168.30.35 255.255.255.240
Router(config-subif)#no shut
Router(config-subif)#ex
Router(config)#int fa0/0.40
Router(config-subif)#encapsulation dot1Q 40
Router(config-subif)#ip add 192.168.40.51 255.255.255.240
Router(config-subif)#no shut
Router(config-subif)# exit

Next we will connect the two VLANs by making the Trunk configuration on both switches as below:

Switch1  
Switch(config)#int fa0/5(yang menuju ke router)
Switch(config-if)#switchport mode trunk 
Switch(config-if)#

di switch 7


Switch(config)#int fa0/1(yang menuju ke router)
Switch(config-if)#switchport mode trunk 
Switch(config-if)#ex
Switch(config)#int fa0/3(yang menuju ke router) 
Switch(config-if)#switchport mode trunk 

di switch 0 
 
Switch(config)#int fa0/5(yang menuju ke router)
Switch(config-if)#switchport mode trunk
 
If we have previously written the vlan configuration in switch 3 with the aim that vlan 10 and 20 can be accessed with configuration like this,
 
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#ex
Switch(config)#vlan 20
Switch(config-vlan)#ex

Next we will connect router 0 and router 2 by using ip route, its configuration like this,

Di Router 0 


Router(config)#ip route 192.168.20.64 255.255.255.192 192.168.5.6

Router(config)#ip route 192.168.10.32 255.255.255.224 192.168.5.6

Router(config)#ip route 192.168.20.32 255.255.255.224 192.168.5.6

Di router 2 
 
Router(config)#ip route 192.168.40.48 255.255.255.240 192.168.5.5
Router(config)#ip route 192.168.30.32 255.255.255.240 192.168.5.5

Then We already connect between our routers check if succes we further set the Server like this,


add Ip server
 
We also dns settings to be accessible via the browser on pc configuration
 
And the result
 


Konfigurasi Vlan Di Packet Tracer

Konfigurasi Vlan Di Packet Tracer

Cara Konfigurasi VLAN Di Cisco Packet Tracer, Sebelum menuju konfigurasi lebih lanjut perhatikan gambar diatas adalah topologi VLAN Di Cisco Packet Tracer , Yang akan kita gunakan untuk konfigurasi, Diantaranya adalah :

  • 1 Router
  • 9 PC
  • 3 Switch
  • 1 Server
  • Kabel Straight 
Jika sudah Seperti topologi di atas Lanjut kita Konfigurasi VLAN Di Cisco Packet Tracer , Yang pertama kita Konfig adalah IP Pada masing masing PC Pada Switch 1

PC 1 IP    : 192.168.50.130 / Netmask 255.255.255.128 / Gateway 192.168.50.129
PC 2 IP    : 192.168.50.131/ Netmask 255.255.255.128 / Gateway 192.168.50.129
PC 3 IP    : 192.168.60.66 / Netmask 255.255.255.192 / Gateway 192.168.60.65
PC 4 IP    : 192.168.60.67/ Netmask 255.255.255.192 / Gateway 192.168.60.65


Jika sudah Config IP Pada Konfigurasi VLAN Di Cisco Packet Tracer Selanjutnya sekarang kita Konfigurasi Switch 1,

Click Switch1 > CLI

Kemudian masukkan perintah nya seperti di bawah ini,

Menamai Vlan 50 dan 60 Switch 1

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 50
Switch(config-vlan)#name Muhammad-Zaid
Switch(config-vlan)#exit
Switch(config)#vlan 60
Switch(config-vlan)#name Misbakhul-Munir
Switch(config-vlan)#exit

MENGHUBUNGKAN VLAN 50 DAN 60 Switch 1

Switch(config)#int fa0/1
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 50
Switch(config-if)#exit
Switch(config)#int fa0/2
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 50
Switch(config-if)#exit
Switch(config)#int fa0/3
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 60
Switch(config-if)#exit
Switch(config)#int fa0/4
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 60
Switch(config-if)#exit

MENJADIKAN SWITCH KE MODE TRUNK Switch 1

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int fa0/5
Switch(config-if)#sw
Switch(config-if)#switchport mo
Switch(config-if)#switchport mode t
Switch(config-if)#switchport mode trunk 
Switch(config-if)#

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int fa0/6
Switch(config-if)#sw
Switch(config-if)#switchport mo
Switch(config-if)#switchport mode t
Switch(config-if)#switchport mode trunk 

Switch(config-if)#

Selanjutnya sekarang kita Konfigurasi Switch 2,


PC 7 IP    : 192.168.50.132 / Netmask 255.255.255.128 / Gateway 192.168.50.129
PC 8 IP    : 192.168.50.133/ Netmask 255.255.255.128 / Gateway 192.168.50.129
PC 5 IP    : 192.168.60.68 / Netmask 255.255.255.192 / Gateway 192.168.60.65
PC 6 IP    : 192.168.60.69/ Netmask 255.255.255.192 / Gateway 192.168.60.65


Click Switch1 > CLI

Kemudian masukkan perintah nya seperti di bawah ini,

Menamai Vlan 50 dan 60 Switch 2

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 50
Switch(config-vlan)#name Ahmad_Syaifuddin
Switch(config-vlan)#exit
Switch(config)#vlan 60
Switch(config-vlan)#name Noor_Afiyanto
Switch(config-vlan)#exit


MENGHUBUNGKAN VLAN 50 DAN 60 Switch 2

Switch(config)#int fa0/1
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 50
Switch(config-if)#exit
Switch(config)#int fa0/2
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 50
Switch(config-if)#exit
Switch(config)#int fa0/3
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 60
Switch(config-if)#exit
Switch(config)#int fa0/4
Switch(config-if)#switchport mode access 
Switch(config-if)#switchport access vlan 60
Switch(config-if)#exit

MENJADIKAN SWITCH KE MODE TRUNK Switch 2

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int fa0/5
Switch(config-if)#sw
Switch(config-if)#switchport mo
Switch(config-if)#switchport mode t
Switch(config-if)#switchport mode trunk 
Switch(config-if)#

Kemudian Setting Konfigurasi Router 0,

masukkan perintah nya seperti di bawah ini,

Memberi IP ke Gig0/0 dan Gig0/1

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int gig0/0
Router(config-if)#ip add 192.168.10.5 255.255.255.252
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#int gig0/1
Router(config-if)#ip add 192.168.20.1 255.255.255.0
Router(config-if)#no shut

Router(config-if)#exit

Menghubungkan Vlan yang satu ke Vlan yang lain

Router(config)#int gig0/0.50
Router(config-subif)#encapsulation dot1Q 50
Router(config-subif)#ip add 192.168.50.129 255.255.255.128
Router(config-subif)#exit
Router(config)#int gig0/0.60
Router(config-subif)#encapsulation dot1Q 60
Router(config-subif)#ip add 192.168.60.65 255.255.255.192
Router(config-subif)#exit

Router(config)#


Dan yang terakhir kita cuma ngasih IP dan Setting Server nya

PC 0 IP    : 192.168.20.3 / Netmask 255.255.255.0 / Gateway 192.168.20.1
Server IP : 192.168.20.4 / Netmask 255.255.255.0 / Gateway 192.168.20.1

Click Server > Service > DNS

kemudian kita edit sedikit index.html nya,

Click Server > Service > HTTP > index.html > edit

saya ganti seperti ini,

<html>
<center><font size='+2' color='blue'>Muhammad Zaid</font></center>
<hr>Welcome to Cisco Packet Tracer. Opening doors to new opportunities. Mind Wide Open.
<p>Quick Links:
<br><a href='helloworld.html'>A small page</a>
<br><a href='copyrights.html'>Copyrights</a>
<br><a href='image.html'>Image page</a>
<br><a href='cscoptlogo177x111.jpg'>Image</a>

</html>

Save, trus setiap PC DNS nya di isi okta.com

kita coba, dan hasil nya sperti ini,


Sekian dan Terima Kasih