Solved

VLAN and cisco swtches question

Posted on 2011-02-25
6
405 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
capture pcap with filtered traffic 1 102
Link issue 11 71
Cisco 2960 unable to add SFP modules to device 9 130
Password recovery 2950 is Deleting configuration Why 8 60
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…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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