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
2. Setting Router 1 and Switch 1
First make a topology as above, Router and Switch settings.
On Router settings As follows:
01 | Router>en |
02 |
03 | Router #conf t |
04 |
05 | Router(config) #int gigabitEthernet 0/1 |
06 |
07 | Router(config - if ) #ip address 192.168.10.5 255.255.255.252 |
08 |
09 | Router(config - if ) #no shutdown |
10 |
11 | Router(config - if ) #exit |
12 |
13 |
14 |
15 | Router(config) #interface gigabitEthernet 0/1.50 |
16 |
17 | Router(config - subif) #encapsulation dot1Q 50 |
18 |
19 | Router(config - subif) #ip address 192.168.50.129 255.255.255.128 |
20 |
21 | Router(config - subif) #description REZA |
22 |
23 | Router(config - subif) #no shutdown |
24 |
25 | Router(config - subif) #exit |
26 |
27 |
28 |
29 | Router(config) #interface gigabitEthernet 0/1.60 |
30 |
31 | Router(config - subif) #encapsulation dot1Q 60 |
32 |
33 | Router(config - subif) #ip address 192.168.60.65 255.255.255.192 |
34 |
35 | Router(config - subif) #description LUTFI |
36 |
37 | Router(config - subif) #no shutdown |
38 |
39 | Router(config - subif) #exit |
40 |
41 |
42 |
43 | Router(config) #do sh run |
So the result looks like this:
Then setting the switch as follows:
01 | Switch>en |
02 |
03 | Switch #vlan database |
04 |
05 | Switch(vlan) #vlan 50 name REZA |
06 |
07 | Switch(vlan) #vlan 60 name LUTFI |
08 |
09 | Switch(vlan) #exit |
10 |
11 | Switch # |
12 |
13 |
14 |
15 | Switch #conf t |
16 |
17 | Switch(config) #int vlan 1 |
18 |
19 | Switch(config - if ) #ip address 192.168.10.6 255.255.255.252 |
20 |
21 | Switch(config - if ) #description TRUNK |
22 |
23 | Switch(config - if ) #no shutdown |
24 |
25 | Switch(config - if ) #exit |
26 |
27 |
28 |
29 | Switch(config) #ip default-gateway 192.168.10.5 |
30 |
31 | Switch(config) #interface fastEthernet 0/1 |
32 |
33 | Switch(config - if ) #switchport mode trunk |
34 |
35 | Switch(config - if ) #exit |
36 |
37 |
38 |
39 | Switch(config) #interface range fastEthernet 0/2-3 |
40 |
41 | Switch(config - if - range ) #switchport mode access |
42 |
43 | Switch(config - if - range ) #switchport access vlan 50 |
44 |
45 | Switch(config - if - range ) #exit |
46 |
47 |
48 |
49 | Switch(config) #interface range fastEthernet 0/4-5 |
50 |
51 | Switch(config - if - range ) #switchport mode access |
52 |
53 | Switch(config - if - range ) #switchport access vlan 60 |
54 |
55 | Switch(config - if - range ) #exit |
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:
01 | Router>en |
02 |
03 | Router #conf t |
04 |
05 | Router(config) #interface gigabitEthernet 0/0 |
06 |
07 | Router(config - if ) #ip address 192.168.20.1 255.255.255.0 |
08 |
09 | Router(config - if ) #no shutdown |
10 |
11 | Router(config - if ) #exit |
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:
01 | Switch>en |
02 |
03 | Switch #vlan database |
04 |
05 | Switch(vlan) #vlan 50 name REZA |
06 |
07 | Switch(vlan) #vlan 60 name LUTFI |
08 |
09 | Switch(vlan) #exit |
10 |
11 |
12 |
13 | Switch #conf t |
14 |
15 | Switch(config) #interface fastEthernet 0/1 |
16 |
17 | Switch(config - if ) #switchport mode trunk |
18 |
19 | Switch(config - if ) #exit |
20 |
21 |
22 |
23 | Switch(config) #interface range fastEthernet 0/2-3 |
24 |
25 | Switch(config - if - range ) #switchport mode access |
26 |
27 | Switch(config - if - range ) #switchport access vlan 50 |
28 |
29 | Switch(config - if - range ) #exit |
30 |
31 |
32 |
33 | Switch(config) #interface range fastEthernet 0/4-5 |
34 |
35 | Switch(config - if - range ) #switchport mode access |
36 |
37 | Switch(config - if - range ) #switchport access vlan 60 |
38 |
39 | Switch(config - if - range ) #exit |
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
0 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.
Click to see the code!
To insert emoticon you must added at least one space before the code.