Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

VLAN and cisco swtches question

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?
Avatar of rfc1180
rfc1180
Flag of United States of America image

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
Avatar of al4629740

ASKER

So if  I had phones and computers hooked up exclusively on this switch, would the programming be different for each port?
>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
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?
ASKER CERTIFIED SOLUTION
Avatar of rfc1180
rfc1180
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial