Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 926
  • Last Modified:

How to setup VLan for Cisco IP Phones on cisco Switch

We are putting in a new Cisco ASA 5520 to replace our Pix 515. We have Cisco managed switches (I think Cisco 3750 but not sure ). We have Cisco  VOIP phones on the same network that the computers are on.

We would like to setup VLans to separate the traffic in order to improve the network performance. The cisco switches are Gigabit switches.

Is the only way to setup VLans thought port VLans or can we do it any other way. The reason is that we have one cable going into the phones and then the phones have a switch port that goes to the workstations. Therefore we can not do port VLans.
FYI, I am not familiar with VLans and am not sure how they work. Do you some how login to the switch and do it.
0
netcomp
Asked:
netcomp
  • 5
  • 4
2 Solutions
 
The_R0CKCommented:
Ok I can help you with this....

Yes it is best practise to seperate your voice and data networks using VLAN's. Vlans must be first setup on the switch (such as VLAN100 for data, VLAN200 for voice). Then the actually interfaces on the switches must be configure to "trunk" both voice and data VLAN's to the phone. The phone will then operate on the voice VLAN and the PC connected to it will operate on the data VLAN.

How does the phone know to take the VLAN200 and give VLAN100 to the PC? Sound like Magic? When configuring the switch interface, we use commands which identify which VLANs are used for Voice and for Data. This is the benfit of using Cisco switches with Cisco phones, they communicate using CDP "Cisco discovery protocol".

Here is an example of the VLAN configuration on the switch:
interface Vlan100
 description ### DATA VLAN ###
 ip address 192.168.100.1 255.255.255.0
!
interface Vlan200
 description ### VOICE VLAN ###
 ip address 192.168.100.1 255.255.255.0

and how we assign the VLAN's to the switch interface and identify VOICE vlan:
interface GigabitEthernet1/0/1
 description ### Trunk Link to Cisco IP Phone ###
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 100
 switchport voice vlan 200
 switchport mode trunk

So thats a good start on this subject. However when you have multiple switches, it gets a little more complicated. Usually we would use a single Layer 3 switch as a "core" switch which handles the routing between VLANs, the other switches would operate at layer 2. If you have a single stack of 3750 switches then this is easy becuase they are configured and operate as a single switch.

Let me know your thoughts...
0
 
The_R0CKCommented:
Oh I would also recommend implementing QoS (Quality of Service) on the switches. This will garantee that voice is prioritized. Again becuase you are using Cisco phones on Cisco switches, this is made very easy. It is as simple as putting in the following command on each switch interfaces:

auto qos voip cisco-phone

Anyway we could deal with that later ;)
0
 
Aaron StreetInfrastructure ManagerCommented:
REmber on Ciscos you can also have dynamic Vlans.

You set up your trunks as normal. but you can assing different mac addresses different Vlans.
then what ever switch port they are pluged in to. as long as you have set up the switchs correctly. will automatical place that port in to the correct vlan.

If you want to be able to move phones around with out having to reconfiger the vlan date each time this might be a good idea.

You only have to set up one switch (core switch normaly) as the vlan server and all the rest as clients. and it will proprogate through the network.

AS for Vlans decribed in a simple way. simple breack up the switch in to seperat switches and so stop traffic moving between them. You then need a router if you want one vlan to talk to another.

As the Rock said. QOS would be a great idea for Voip as well. As by default voice and data will compeate for bandwith. by running QOS you can garantee that a certian % of the link is always avalible for voip traffic.

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
The_R0CKCommented:
Also a note I would like to add to my first comment:
If you connect a PC (without first connecting to a phone) to a switch port which is configured as trunk port, the switch will assign the PC to VLAN100 because this is marked as the "Native VLAN". All devices will be assigned to the Native VLAN unless the switch knows it is an IP phone connecting... as mentioned the switch knows when a Cisco phone is connected (by use of CDP protocol) and assigns the phone to the VLAN marked with "switchport voice vlan xxx"

Hope that helps...
0
 
Aaron StreetInfrastructure ManagerCommented:
oh thats quite cool :)

sorry we dont use Voip here so i missed that in your post Rock. see arn't cisco helpfull..

but i have used dynamic vlans for different machines on site.

Learn something new every day :)
Aaron
0
 
netcompAuthor Commented:
Wow, Lots of great info. I have some confusion:
1.      What is a Trunk,  and how does it work.
2.      How does IP Addressing and DHCP play into this .
3.      What do you mean by  we assign Vlans to the switch interface . Also what does the command interface GigabitEthernet 1/0/1 do.  
4.      How do you assign a switch as core switch and make it handell the routing. Dont we need a router to do the routing between the Vlans.
Thanks for all of your help
0
 
Aaron StreetInfrastructure ManagerCommented:
A trunk is a link between the ports of two seperate switchs that can carry multiply vlans.

the idea is all ports on the switch are in a single vlan, and then the trunking ports are like the backbone ports that carry the information between different switchs.

usual you would have a different sub net associated with each vlan. so different Ip ranges. As for DHCP you can either have a seperate DHCP serve on each VLAN (rember vlans are the same as seperate switched network. ) or you can set up a DHCP helper on the switchs and you can use one DHCP server to servioce all the different ip ranges. (I can tell you how to do this if you want )

The command interface gig1/0/1 simple takes you in to the configeration settings for that inter face
the 1/0/1 is to do with the switch number (if you have a stack) the swithc moduel if you have more than one in some switchs and the port number

so in this case it would be .. first switch in stack... no module present and first port

any layer 3 switch can handle routing. most moden switchs are able to do this. there are in fact routers. and many switches these days have good routing functions on them. one of the main differences is that a true route will have serial ports and is able to run other proticals over these serial ports.
Switchs which are layer 3, can normaly only route between eathernet networks. where as routers can route between other protocals as well.

so yes you need a router to route between VLANS. but i know for a fact both the 3700 series of switchs have all the routing functions you will need.
0
 
The_R0CKCommented:
Do you need to know anything else on this topic?
0
 
The_R0CKCommented:
As per your initial question "Do you some how login to the switch and do it", the answer is most surely Yes. You will need to connect a console cable to switch (the switches have an RJ45 slot in the back called "Console") which is provided with the switch. You then must use a program such as hyperterminal to connect to the switch. Some of the new Cisco switches can be managed through a web-interface, however usually the are configured by command line. The information you  have been provided above is obviously for command line configuration. Just wanted to clarify in case you were unsure....
0
 
Aaron StreetInfrastructure ManagerCommented:
of course you can also configure it over the network through the console.

As long as the switch has a ipaddress set on it. (however of course by default it wont be set up)

The command line is very sright forwardx. (although it looks daunting) I will post a link to another thread on this site which deals with the basic introduction to the commands on Cisco ISO.

but really if you have a quick glance through a cisco manual (i can send you a PDF version of one if you need it ) you will be able to do the kind of configuring we are talking about here very quickly.

Just rember in the work of Cisco the "?" is your friend :) as is the show command!!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now