Solved

VLAN and cisco swtches question

Posted on 2011-02-25
6
400 Views
Last Modified: 2012-05-11
On a typical cisco 2960, I am trying to understand how to program it.  First of all what is a vLAN and what is the purpose of programming a switch with a vLAN?
0
Comment
Question by:al4629740
  • 3
  • 2
6 Comments
 
LVL 24

Expert Comment

by:rfc1180
ID: 34985767
The acronym VLAN expands to a Virtual Local Area Network. A VLAN is a logical local area network (or LAN) that extends beyond a single traditional LAN to a group of LAN segments, given specific configurations. A VLAN is a logical entity, its creation and configuration is done completely in software. Think of 2 separate VLANs as 2 separate switches not connected to each other with each switch connected to a router for physical separation from a layer 3 prespective.

Here is a simple config for your switch:


!
vlan 10
name network1
!
vlan 20
name network2
!
interface GigabitEthernet0/1
 switchport access vlan 10
 switchport mode access
 no shut
!
interface GigabitEthernet0/2
 switchport access vlan 20
 switchport mode access
 no shut
!
interface Vlan1
 description management
 ip address 192.168.1.10 255.255.255.0
 no ip route-cache
 no shut

Billy
0
 

Author Comment

by:al4629740
ID: 34985833
So if  I had phones and computers hooked up exclusively on this switch, would the programming be different for each port?
0
 
LVL 24

Expert Comment

by:rfc1180
ID: 34985858
>So if  I had phones and computers hooked up exclusively on this switch, would the programming be different for each port?

By design, you should have the phones separated from the rest of the network, so yes, the programming would be different for switchports:

!
vlan 10
name LAN
!
vlan 20
name VoIP


interface GigabitEthernet0/1
 description computer1
 switchport access vlan 10
 switchport mode access
 no shut
!
interface GigabitEthernet0/2
 description computer2
 switchport access vlan 10
 switchport mode
!
interface GigabitEthernet0/1
 description phone1
 switchport access vlan 20
 switchport mode access
 no shut
!
interface GigabitEthernet0/3
 description phone2
 switchport access vlan 20
 switchport mode
0
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 

Author Comment

by:al4629740
ID: 34985893
so if i understand your programming.

You essentially made two vlans.  One for data and one for voice.

interface 1 and 3 are for phones and 1 and 2 are for computers?

The ports can be dual setup for both phone and computer?

Also what is the statement "switchport access vlan 20" doing?
0
 
LVL 24

Accepted Solution

by:
rfc1180 earned 250 total points
ID: 34985929
sorry, no, effects of copy and paste and not paying attention

interface GigabitEthernet0/1
 description computer1
 switchport access vlan 10
 switchport mode access
 no shut
!
interface GigabitEthernet0/2
 description computer2
 switchport access vlan 10
 switchport mode
!
interface GigabitEthernet0/3
 description phone1
 switchport access vlan 20
 switchport mode access
 no shut
!
interface GigabitEthernet0/4
 description phone2
 switchport access vlan 20
 switchport mode

switchport access vlan x is assigning a vlan to the switchport

Billy
0
 
LVL 7

Assisted Solution

by:diepes
diepes earned 250 total points
ID: 34988584
al4629740:
>> so if i understand your programming.
>> You essentially made two vlans.  One for data and one for voice.
Yes split the switch, all ports with "switchport access vlan10" can see each other and used for computers, you need a router in this vlan as the gateway.

>>interface 1 and 3 are for phones and 1 and 2 are for computers?
yes for example above

>>The ports can be dual setup for both phone and computer?
Yes on cisco switch with cisco phone
Config a port with
  switchport access vlan 10
  switchport voice vlan 20
this will put the port into vlan10, when a cisco phone connects and the switch recognizes the phone, it will run a trunk port to the phone, carrying vlan 10 and 20, and the phone will then connect to the pc and put the pc traffic on the cable to the switch as vlan 10.

>> Also what is the statement "switchport access vlan 20" doing?
adding the port into vlan20 ( think of it as virtual switch 20)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cant browse or ping a particular URL 2 53
capture pcap with filtered traffic 1 96
access vs trunk with voice vlan 2 68
Cisco Switch VLAN voice and Data 2 40
The worst thing when starting a new job is when the previous Network Administrator left behind no documentation. How do you get into the devices? If you've been in this situation or just accidently mistyped your password, this article will hopefully…
I see many questions here on Experts Exchange regarding switch port configurations and trunks. This article is meant for beginners in the subject to help to get basic knowledge about Virtual Local Area Network (VLAN (http://en.wikipedia.org/wiki/Vir…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question