Solved

VLAN and cisco swtches question

Posted on 2011-02-25
6
397 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
gns3 with layer 3 switch 6 101
policy routing to fw2 18 77
ospf neighbors not coming up 6 59
2960 not recognizing subinterface configuraton of 5510 11 30
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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