Vous êtes sur la page 1sur 2

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 1
0 and other ports on switch B can be in VLAN 10. Broadcasts between these device
s 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 add
itional configuration, they would not be able to communicate with any other devi
ces, 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 <vlan number>
Eg:
Let s say we wanted to create VLAN s 5 and 10. We want to put ports 2 in VLAN 5 (Mar
keting) 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 s
witch, 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 subinterfa
ce and then do the encapsulation dot1q <vlan ID> command. This command basicall
y assigned the vlan to the subinterface. In this example, there are 2 vlans, vl
an 100 and 201. On the eth 0/0 interface, I created two subinterfaces. fasteth
ernet0/0.100 and f0/0.201. Notice that I matched the subinterface number with t
he vlan ID. You do not have to do this, but it is a best practice and really he
lps you as the administrator keep things organized. So, under f0/0.100, there i
s 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

Vous aimerez peut-être aussi