0% found this document useful (0 votes)
17 views5 pages

VLAN Lab

A VLAN lab was configured with one switch containing 4 PCs each with unique IP addresses. Two VLANs were created - VLAN 10 for students and VLAN 20 for teachers. Ports 1-2 were assigned to VLAN 10 and ports 3-4 to VLAN 20. A second switch was connected to the first via trunk ports and one additional PC was added to VLAN 10. The switches were also connected to a router via separate access ports attached to each VLAN to allow communication between the VLANs.

Uploaded by

tunio.bscsf21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views5 pages

VLAN Lab

A VLAN lab was configured with one switch containing 4 PCs each with unique IP addresses. Two VLANs were created - VLAN 10 for students and VLAN 20 for teachers. Ports 1-2 were assigned to VLAN 10 and ports 3-4 to VLAN 20. A second switch was connected to the first via trunk ports and one additional PC was added to VLAN 10. The switches were also connected to a router via separate access ports attached to each VLAN to allow communication between the VLANs.

Uploaded by

tunio.bscsf21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

VLAN lab

there is one switch with 4 pcs

1 pc have ip address :192.168.0.1

2 pc have ip address :192.168.0.2

3 pc have ip address :192.168.0.3

4 pc have ip address :192.168.0.4

Switch:en

switch:show vlan brief

Switch:config t

Switch(config)#vlan 10 // FOR VLAN 10 for Students

Switch(config-vlan)#name students

Switch(config-vlan)#exit

Switch(config)#int

Switch(config)#interface fastethernet 0/1


Switch(config-if)#sw //here you press tab

Switch(config-if)#switchport mode ?

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access ?

Switch(config-if)#switchport access vlan 10

Switch(config-if)#do show vlan

Switch(config-if)#exit

Switch(config)#interface fastethernet 0/2

Switch(config-if)#sw //here you press tab

Switch(config-if)#switchport mode ?

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access ?

Switch(config-if)#switchport access vlan 10

Switch(config-if)#do show vlan

Switch(config-if)#exit

Switch(config)#vlan 20 // FOR VLAN 20 for Teachers

Switch(config-vlan)#name teachers

Switch(config-vlan)#exit

Switch(config)#int

Switch(config)#interface fastethernet 0/3

Switch(config-if)#sw //here you press tab

Switch(config-if)#switchport mode ?

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access ?

Switch(config-if)#switchport access vlan 20

Switch(config-if)#do show vlan

Switch(config-if)#exit

Switch(config)#interface fastethernet 0/4


Switch(config-if)#sw //here you press tab

Switch(config-if)#switchport mode ?

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access ?

Switch(config-if)#switchport access vlan 20

Switch(config-if)#do show vlan

Switch(config-if)#exit

Switch to Switch connection:

for switch 1: Go to cli then types these commands according to your interface

Switch(config)#interface fastethernet 0/6

Switch(config-if)#sw //here you press tab

Switch(config-if)#switchport mode trunk

for switch 2 : it has one pc(ip address :192.168.0.5) then make that pc part of vlan 10 through these
below commands

Switch(config)#interface fastethernet 0/1

Switch(config-if)#sw //here you press tab

Switch(config-if)#switchport mode ?

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access ?

Switch(config-if)#switchport access vlan 10

Switch(config-if)#do show vlan

Switch(config-if)#exit

for switch 2 to switch 1 interface:

Switch(config)#interface fastethernet 0/2

Switch(config-if)#sw //here you press tab

Switch(config-if)#switchport mode trunk


for router to switch connection there is 2 vlan so we connect with 2 lines with router.

Go to Switch(0) cli:

switch(config)#interface fastethernet 0/10

switch(config-if)#switchport mode access

switch(config-if)#switchport access vlan 10

switch(config-if)#exit

switch(config)#interface fastethernet 0/11

switch(config-if)#switchport mode access

switch(config-if)#switchport access vlan 20

switch(config-if)#exit

Go to router cli:

Router(config)#:interface gigabitEthernet 0/0/0

Router(config-if)#ip address 192.168.0.10 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#:interface gigabitEthernet 0/0/1


Router(config-if)#ip address 192.168.1.10 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy