cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1366
Views
16
Helpful
3
Replies

Creating VLAN

Feroz_1600
Level 1
Level 1

How is VLANs configured on a switch ? What are the parameters defined while creating a VLAN/ Voice VLAN ? Since switch operates on layer 2 switch, is it required to define vlans on router as well. This might be very simple and basics of networking. Need to understand to clarify my doubts.

Thanks
Feroz

Sent from Cisco Technical Support iPhone App

3 Replies 3

InayathUlla Sharieff
Cisco Employee
Cisco Employee

HI Feroz,

VLAN is a virtual LAN. In technical terms, a VLAN is a broadcast domain created by switches. Normally, it is a router creating that broadcast domain. With VLAN’s, a switch can create the broadcast domain.

This works by, you, the administrator, putting some switch ports in a VLAN other than 1, the default VLAN. All ports in a single VLAN are in a single broadcast domain.

Because switches can talk to each other, some ports on switch A can be in VLAN 10 and other ports on switch B can be in VLAN 10. Broadcasts between these devices will not be seen on any other port in any other VLAN, other than 10. However, these devices can all communicate because they are on the same VLAN. Without additional configuration, they would not be able to communicate with any other devices, not in their VLAN.

Please find the details below:

Vlan on Switches:-

Two types of Vlan(Layer 2 - Layer3)

Layer 2 vlan:

config t# vlan

Eg:

Let’s say we wanted to create VLAN’s 5 and 10. We want to put ports 2 in VLAN 5 (Marketing) and port 3 in VLAN 10 (Human Resources). On a Cisco 2950 switch, here is how you would do it:

# vlan 5

#name marketing

vlan 10

name humanresouces

exit

int f0/2

switchport mode access

switchport access vlan 5

int f0/3

switchport mode access

switchport access vlan 10

Layer 3:

conf t# interface vlan 2

followed by ip address.

Please find below link which explains complete info on VLans.

http://www.cisco.com/en/US/docs/switches/lan/catalyst2950/software/release/12.1_9_ea1/configuration/guide/swvlan.html

2- Vlan on Router:

A vlan configuration on a router is slightly different than on a switch.  On a switch, you would create the vlan and then the routed vlan interface.

On a router you tie a vlan to a subinterface.  You need to create the subinterface and then do the encapsulation dot1q command.  This command basically assigned the vlan to the subinterface.  In this example, there are 2 vlans, vlan 100 and 201.  On the eth 0/0 interface, I created two subinterfaces.  fastethernet0/0.100 and f0/0.201.  Notice that I matched the subinterface number with the vlan ID.  You do not have to do this, but it is a best practice and really helps you as the administrator keep things organized.  So, under f0/0.100, there is the encapsulation dot1q 100, which basically binds vlan 100 to subinterface f0/0.100, then I assigned the IP.  The same is for the other subinterface.  So the router is trunking two vlans on its f0/0 interface, vlan's 100 and 201.

interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.100
description test Network
encapsulation dot1Q 100
ip address 192.168.102.1 255.255.255.128
no snmp trap link-status
!
interface FastEthernet0/0.201
description  Office
encapsulation dot1Q 201
ip address 205.127.102.129 255.255.255.128
no snmp trap link-status

Kindly go through the same and reply back if you need any clarification on the same.

HTH

Regards

Inayath

*Plz rate the usefull posts.

harvisin
Level 3
Level 3

Hello,

I went through your query and found that the link below might help you out for your better understanding on the VLANS.

http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SX/configuration/guide/vlans.html

rais
Level 7
Level 7

You can use the following link if you are new to switch configuration or if you want to configure a lot of ports:

http://netdept.com/sw.php

HTH

Review Cisco Networking for a $25 gift card