Solved

VLAN and cisco swtches question

Posted on 2011-02-25
6
377 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

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.

Question has a verified solution.

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

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…
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 designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

21 Experts available now in Live!

Get 1:1 Help Now