Creating a VLAN

Standard

Education and helping others go hand in hand.

Today, while playing around with learning VLAN Configuration, I thought it would be beneficial if I listed the Cisco Commands to make that happen. 

Keep in mind – not all Cisco Commands work on every Cisco Device – but this should do the trick

What is VLAN ?

A LAN is a local area network and is defined as all devices in the same broadcast domain.

A 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.

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.

EXAMPLE

In this example we want to create VLAN’s 5 and 10. We want to put ports 2 & 3 in VLAN 5 (Network1) and ports 4 and 5 in VLAN 10 (Network2).

Switch(config) # vlan 5

Switch(config-vlan) # Network1

Switch(config-vlan) # interface fastEthernet 0/2

Switch(config-vlan) # switchport  mode aceess

Switch(config-vlan) # switchport access vlan 5

Switch(config-vlan) # interface fastEthernet 0/3

Switch(config-vlan) # switchport  mode aceess

Switch(config-vlan) # switchport access vlan 5

Switch(config-vlan) # exit

Switch(config) # vlan 10

Switch(config-vlan) # Network2

Switch(config-vlan) # interface fastEthernet 0/4

Switch(config-vlan) # switchport  mode aceess

Switch(config-vlan) # switchport access vlan 5

Switch(config-vlan) # interface fastEthernet 0/5

Switch(config-vlan) # switchport  mode aceess

Switch(config-vlan) # switchport access vlan 5

Switch(config-vlan) # exit

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s