Solved

VLAN and cisco swtches question

Posted on 2011-02-25
6
367 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

This tutorial will go through the steps required to write a script that will back up the configuration settings of a HP-ProCurve switch. You will need to get the following things to follow this tutorial: Telnet Scripting Tool e.g. TST10.exe …
I eventually solved a perplexing problem setting up telnet for a new switch.  I installed a new Cisco WS-03560X-24P switch connected to an existing Cisco 4506 running a WS-X4013-10GE Sup II-Plus. After configuring vlans and trunking,  I could no…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now