0% found this document useful (0 votes)
16 views3 pages

VLAN Lab Guide For Cisco Switnches

This document provides instructions for configuring VLANs on a Cisco switch. It describes: 1. Creating VLANs 10 and 20 on the switch, assigning ports to each VLAN, and making port e0/3 a trunk port. 2. Verifying the VLAN configuration and assigning IP addresses to each VLAN. 3. Configuring DHCP pools to assign IP addresses to devices in each VLAN and exclude addresses. 4. Creating subinterfaces on a router corresponding to each VLAN to allow communication between VLANs.

Uploaded by

falaad64
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)
16 views3 pages

VLAN Lab Guide For Cisco Switnches

This document provides instructions for configuring VLANs on a Cisco switch. It describes: 1. Creating VLANs 10 and 20 on the switch, assigning ports to each VLAN, and making port e0/3 a trunk port. 2. Verifying the VLAN configuration and assigning IP addresses to each VLAN. 3. Configuring DHCP pools to assign IP addresses to devices in each VLAN and exclude addresses. 4. Creating subinterfaces on a router corresponding to each VLAN to allow communication between VLANs.

Uploaded by

falaad64
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/ 3

VLAN Lab Guide for Cisco Switches

Introduction
VLANs (Virtual Local Area Networks) allow you to divide a physical network into multiple
logical networks. This can be useful for a variety of reasons, such as:

 To improve security by isolating different types of traffic from each other


 To improve performance by reducing broadcast and multicast traffic
 To simplify network management by grouping devices together based on their
function

How to Configure VLANs on a Cisco Switch

On Switch 1 please do the following steps to create Your First VLAN

Step 1: Enter configuration mode

Sw1>enable
Sw1# configure terminal

Step 2: Create the VLANs

SW1

SW1(config)#vlan 10
SW1(config-vlan)#name Sales
SW1(config-vlan)#exit

SW1(config)#vlan 20
SW1(config-vlan)#name IT
SW1(config-vlan)#exit

Step 3: Assign ports to the VLANs

SW1(config)#interface e1/0
SW1(config-if)#switchport access vlan 10
SW1(config-if)#exit

SW1(config)#int e1/2
SW1(config-if)#switchport access vlan 20
SW1(config-if)#exit
SW1(config)#

Step 4: Make interface e0/3 Trunk

SW1(config)#int e0/3
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk

Step 5: Verify the VLAN configuration


SW1#show vlan

VLAN Name Status Ports


---- -------------------------------- ---------
------------------------------
-
1 default active Et0/0, Et0/1, Et0/2,
Et0/3
Et1/1, Et1/3
10 Sales active Et1/0
20 IT active Et1/2

The output of the show vlan command will show the two VLANs that you have created.

Step 6: Create and Assign IP address to your newly created VLANs


SW1(config)#interface vlan 10
SW1(config-if)#ip add 172.7.1.10 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit

SW1(config)#interface vlan 20
SW1(config-if)#ip add 173.x.y.20 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit

Step 7: Create Dynamic IP address (DHCP) for each VLANs

SW1(config)#ip dhcp pool VLAN10


SW1(dhcp-config)#network 172.x.y.0 255.255.255.0
SW1(dhcp-config)#default-router 172.x.y.1
SW1(dhcp-config)#dns-server 8.8.8.8
SW1(dhcp-config)#exit

SW1(config)#ip dhcp pool VLAN20


SW1(dhcp-config)#network 173.x.y.0 255.255.255.0
SW1(dhcp-config)#default-router 173.x.y.1
SW1(dhcp-config)#dns-server 8.8.8.8
SW1(dhcp-config)#exit

Step 8: Exclude these addresses to reuse them later.


SW1(config)#ip dhcp excluded-address 172.x.y.1 172.16.10.10
SW1(config)#ip dhcp excluded-address 172.x.y.1 172.16.20.20

Step 9: Go to your Win-1 and Enable DHCP, then ping this Network
172.16.10.10

Step 10: Go to R1 and create Sub-interface Corresponding to the VLANs you’ve


created earlier

Router>enable
Router# configure terminal
Router(config)#hostname R1
R1(config)#interface e0/3
R1(config-if)#no shutdown
R1(config-if)#exit

R1(config)#interface e0/3.10
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#ip address 172.x.y.1 255.255.255.0
R1(config-subif)#exit

R1(config)#interface e0/3.20
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip address 172.x.y.1 255.255.255.0
R1(config-subif)#exit

Step 5: Verify the Sub-Interfaces


R1#show ip interface brief
Interface IP-Address OK? Method Status
Protocol
Ethernet0/3.10 172.x.y.1 YES manual up up
Ethernet0/3.20 172.x.y.1 YES manual up up

The output of the show vlan command will show the two VLANs that you have created

Congratulations now you’ve created your first VLAN on SW, do the above steps to the
rest of Switches.

You might also like