0
VLAN are an extension of Virtual LAN whose function is to create virtuals in a cisco switch. In the application of this VLAN we can configure it virtually without having to match the location of the device. And we can be more flexible in segment distribution based on department and also organization. Usually these VLANs are used in a large company where there are multiple divisions, and each division can access different data from other divisions. In fact, each division has a different server according to its needs just by using a single cisco switch. With this method we will be more efficient for the use of cables and switches. And the following tutorial to create the VLAN: 

How to Create a VLAN With Cisco Packet Tracer

1. Topology Image
In this discussion, I use the topology as above.

2. Setting Router 1 and Switch 1
First make a topology as above, Router and Switch settings.
On Router settings As follows:
[code h1="1, 4, 7"]
Router>en
Router#conf t
Router(config)#int gigabitEthernet 0/1
Router(config-if)#ip address 192.168.10.5 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)#exit

Router(config)#interface gigabitEthernet 0/1.50
Router(config-subif)#encapsulation dot1Q 50
Router(config-subif)#ip address 192.168.50.129 255.255.255.128
Router(config-subif)#description REZA
Router(config-subif)#no shutdown
Router(config-subif)#exit

Router(config)#interface gigabitEthernet 0/1.60
Router(config-subif)#encapsulation dot1Q 60
Router(config-subif)#ip address 192.168.60.65 255.255.255.192
Router(config-subif)#description LUTFI
Router(config-subif)#no shutdown
Router(config-subif)#exit

Router(config)#do sh run
[/code]
So the result looks like this:
Then setting the switch as follows:
[code h1="1, 4, 7"]
Switch>en
Switch#vlan database
Switch(vlan)#vlan 50 name REZA
Switch(vlan)#vlan 60 name LUTFI
Switch(vlan)#exit
Switch#

Switch#conf t
Switch(config)#int vlan 1
Switch(config-if)#ip address 192.168.10.6 255.255.255.252
Switch(config-if)#description TRUNK
Switch(config-if)#no shutdown
Switch(config-if)#exit

Switch(config)#ip default-gateway 192.168.10.5
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit

Switch(config)#interface range fastEthernet 0/2-3
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 50
Switch(config-if-range)#exit

Switch(config)#interface range fastEthernet 0/4-5
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 60
Switch(config-if-range)#exit
[/code]
3. Added Server and Client
Settings Server, Switch and Client As in the picture above. Do not forget to give me the appropriate IP that I have marked red. If necessary edit HTML Index on server as follows:
Then check using web browser on client:
If it is accessible, then connect the router with a switch connected to the server, then the router settings as follows:

[code h1="1, 4, 7"]
Router>en
Router#conf t
Router(config)#interface gigabitEthernet 0/0
Router(config-if)#ip address 192.168.20.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
[/code]
4. Add Switches and Clients That Connect to a Vlan Switch with Trunk
The last stage, add Switch and Client as in the picture I have marked red. Then connect the switch with the switch you have previously set.
Switch settings as follows:
[code h1="1, 4, 7"]
Switch>en
Switch#vlan database
Switch(vlan)#vlan 50 name REZA
Switch(vlan)#vlan 60 name LUTFI
Switch(vlan)#exit

Switch#conf t
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit

Switch(config)#interface range fastEthernet 0/2-3
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 50
Switch(config-if-range)#exit

Switch(config)#interface range fastEthernet 0/4-5
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 60
Switch(config-if-range)#exit
[/code]
So my tutorial on How to Configure a Cisco Vlan Switch. If I have any errors in writing or misconfiguration or maybe this post is useful to you, I ask you to give criticism and suggestions in the comments. Thanks.

Posting Komentar

Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.