Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up a voice and data vlan on a switch

Status
Not open for further replies.

skk391

Technical User
Mar 3, 2009
332
0
0
GB
Hi all,

I wanted some advise on how to setup the following please. I have a need to setup a network with a voip telephone system. At the moment I have a CAT 5 cable out of the switch going into a non-cisco phone and then another cable coming out of the phone and going into the PC. Both are supplied IP address from one DHCP server and both are on the same IP range.

I have read that the correct way to configure this is to setup a separate Voice and Data VLAN. slightly unsure on how to do this...

Would it be...

sw1# config t - vlan 10 - Description - Voice Vlan
I take it that there is no need to create a data Vlan I can use the Native Vlan.

Then on each interface which is connected to the phone I need to do the following ...

config t - switchport mode trunk ( to allow both vlans to send frames across this interface )
Switchport voice vlan 10 ( informs the switch that vlan 10 is the voice vlan )

I will then have to create two dhcp groups on my dhcp server and create two Ip ranges one for the voice phones and another for the data.

I'm very confused on how this actually works. How will the dhcp server know which device to assign which range to for example if my phone range is 192.168.0.x how will it know not to assign this range to a dhcp request made by a PC?

Im generally confused about the whole process and could do with a little guidance. I have also read up about lldp and any information regarding this would also be very helpful as my phones are not cisco

Thanks


 
what are your phones you will be using..do they support either LLDP or CDP?
 
Hi, the phones are Avaya 4610 so I take it that they do not support CDP
 
Hi,

I assume you are using Cisco switches? I have not tried this with Avaya phones but it works with Polycom.

create two L3 vlans (along with it's L2 counterparts) on switch with IP helper address
Enable LLDP globally on the switch. This will enable lldp on all ports.
Configure switch port for access and voice vlans

config t

*** Create L3 vlans
int vlan 100
description Data vlan
ip address 10.10.10.0 255.255.255.0
ip helper-address 172.21.100.50 (ip address of dhcp server)
no shut
exit

*** Create L2 vlans
vlan 100
name Data
exit

int vlan 200
description Voice vlan
ip address 192.168.200.0 255.255.255.0
ip helper-address 172.21.100.50 (ip address of dhcp server)
exit

vlan 200
name Voice
exit

*** enable lldp globally
lldp run

*** configure port as access for security. Configure a data and voice vlan.
int g0/1
switchport mode access
switchport access vlan 100
switchport voice vlan 200
spanning-tree portfast
no shut
exit
 
thanks guys,

I've just spend about an hour on the web doing some background research. I have a better understanding now but still confused on some principles.

Understand now that I have to config lldp on the cisco switch ( this is because im not using cisco phones so there is no CDP )

So like Stubnski said I enable lldp globally it will enable it on all interfaces

config t- feature lldp or lldp run ? -> this will enable the switch to receive and send lldp frames so that communication can be made between the Avaya phone and the Cisco switch. But do I have to do anything on the phone or will it be broadcasting these messages anyway i.e. by default.

I have read up about two command when creating the voice VLAN

one document said just to create 2 vlans with and then put the interfaces on the switch into both vlans ... so

config t - vlan 2 - name datavlan
config t- vlan 10 - name voicevlan

then

config t - int range fa 0/2 - 10
switchport mode access
switchport access vlan 2
switchport access vlan 10
exit

This doesn't make sense to me, how does the switch know what is voice traffic and what is data. How does it do about doing this?

The other command ( which makes more sense)
config t
switchport mode access
switchport mode access vlan 2 (data)
switchport voice vlan 10
spanning-tree portfast

so now the switch knows that traffic on vlan 10 is voice traffic, right? have I got my theory down?

How will the dhcp server know what device to assign address to. I mean if I have one dhcp server either windows or cisco & I have two ranges with different subnets how do I tell it that traffic on vlan 10 needs 192.168.1.x address and vlan 2 needs 10.1.1.x addresses assigned instead?

Also while I have got you guys online :) can I be cheeky and ask you about some tips on QoS please. Because I have using a voice vlan does this give the traffic a higher priority by default? Some basic knowledge would be very helpful.

Thanks
 
> I mean if I have one dhcp server either windows or cisco & I have two ranges with different subnets how do I tell it that traffic on vlan 10 needs 192.168.1.x address and vlan 2 needs 10.1.1.x addresses assigned instead?

The DHCP server will know that because of the source address of the request - any requests from a different VLAN (i.e. one from a different subnet from the DHCP server) will be received as a unicast request. The source network for this request is compared to the known DHCP scopes and theaddress issued. The router device (in this case L£ switch) is responsible for the broadcast / unicast conversion using the dhcp helper function.

Code:
conf ter
int vlan 200
ip dhcp helper x.x.x.x  <---- address of DHCP server

>Hi, the phones are Avaya 4610 so I take it that they do not support CDP

I'm not sure they support LLDP. To be honest, I use DHCP to configure handsets - like this
in the data DHCP scope add option 176 as text and configure L2VLAN=200,VLANTEST=60
in the voicescope add option 176 as text and L2VLAN=200,VLANTEST=60, MCIPADDR etc
The handset will boot on the data LAN, reconfigure its VLAN, reboot and tagg packets on the voice vlan 200

> some tips on QoS please

Whole can of worms here...
1) decide whether you are using L2 marking, L£ marking or both
2) what other traffic are you running, or are you just trying to prioritise voice?
3) what switch models (hopefully all the same)
In essence, you need to check the cos-dscp maps and the queue mapps to map your DSCP/COS to the right (priority) queue. Also enable the priority (low latency queue) bandwidth for 10% of portspeed.

Depending on your LAN/WAN setup and traffic profile there is a potential whole raft of other things to consider too

BTW, what sort of phone system?



Take Care

Matt
I have always wished that my computer would be as easy to use as my telephone.
My wish has come true. I no longer know how to use my telephone.
 
Hi Matt,

The phone system is an Avaya Ip 500. I've got to configure a network for a small number of users around 10 in a couple of weeks so wanted to start some research on it. I have another production network with the same telephone system with 55 users. There is no voice vlan on this network with 55 users, everything is flat on the native vlan so wanted to test on the smaller network first and then when all is well there I was planning to make the changes on the larger network.

So the DHCP server will know what to assign depending on the broadcast address when the client requests an address? got it!

I remember assigning the 176 option when I setup the network in the first place... Just pulled part of the config



option 242 ascii "172.16.0.2,MCPORT=1719,HTTPSRVR=172.16.0.2,VLANTEST=1"

option 176 ascii "MCIPADD=172.16.0.2,MCPORT=1719,TFTPSRVR=172.16.0.2,HTTPSRVR=172.16.0.2,VLANTEST=1"

So I would add the option in 176 at the end of the statement = L2VLAN=10 VLANTEST=1

So this is telling the switch that the voice vlan = 10 ( L2VLAN=10 )

Had a quick search on line looks like the Avaya 4610 does support lldp by default. If it didn't would there be any work around?

I'm not sure they support LLDP. To be honest, I use DHCP to configure handsets - like this
in the data DHCP scope add option 176 as text and configure L2VLAN=200,VLANTEST=60
in the voicescope add option 176 as text and L2VLAN=200,VLANTEST=60, MCIPADDR etc
The handset will boot on the data LAN, reconfigure its VLAN, reboot and tagg packets on the voice vlan 200



 
another quick question while I have it in my head, if the dhcp server was a windows server would it then have to have two nic's installed??

ignore the bottom part of my last post I had just copied and pasted part of your last reply
 
Hi,

--> if the dhcp server was a windows server would it then have to have two nic's installed??

No. You need to remember the "IP helper-address" that you configure in the layer 3 interface of the Vlan. What this command is doing is telling all devices on that particular vlan to route to that IP to get DHCP addressing. You can have multiple IP helper addresses for redundancy. You can have your DHCP server on a totally separate network (say 10.10.x.x /24 while your voice network is 10.20.x.x /24 and data is 10.30.x.x /24) as long as routing is correct, meaning you can ping the server from the L3 switch or router.

Just try the configuration I posted earlier. You seem like you understand the majority of it and will figure out the rest as you do more research.

As for QOS, I agree with Matt. It is a big ol can of worms that requires a lot of planning
 
So the DHCP server will know what to assign depending on the broadcast address when the client requests an address? got it!

Broadly right, apart from the broadcast bit. Don't forget that broadcast doesn't propogate between VLANs (that's one of the advantages of VLANs). Wikipedia explains it better than I can!
[URL unfurl="true" said:
http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#DHCP_relaying[/URL]]
In small networks, where only one IP subnet is being managed, DHCP clients communicate directly with DHCP servers. However, DHCP servers can also provide IP addresses for multiple subnets. In this case, a DHCP client that has not yet acquired an IP address cannot communicate directly with the DHCP server using IP routing, because it doesn't have a routable IP address, nor does it know the IP address of a router. In order to allow DHCP clients on subnets not directly served by DHCP servers to communicate with DHCP servers, DHCP relay agents can be installed on these subnets. The DHCP client broadcasts on the local link; the relay agent receives the broadcast and transmits it to one or more DHCP servers using unicast. The relay agent stores its own IP address in the GIADDR field of the DHCP packet. The DHCP server uses the GIADDR to determine the subnet on which the relay agent received the broadcast, and allocates an IP address on that subnet. When the DHCP server replies to the client, it sends the reply to the GIADDR address, again using unicast. The relay agent then retransmits the response on the local network.

Had a quick search on line looks like the Avaya 4610 does support lldp by default.
If it didn't would there be any work around?
Ok, as I said I've not used LLDP... Personally, I find using DHCP scopes an easier and more robust method. LLDP doesn't, as far as I can see, provide full configuration of Avaya handsets.
You could use LLDP to configure the VLAN information to the handset and then use the voice vlan DHCP scope to complete it. However, if you are going to set up the Voice DHCP scope for Avaya, it is as easy to do the data one too....
and just to remind you, option 176 is for old 46xx/56xx handsets (and IIRC changes in newer firmware releases for those handsets)and option 242 is for newer 96xx,96x1,16xx series phones. For futureprooofing, probably add both option 176 and option 242 with identical values on both scopes.

another quick question while I have it in my head, if the dhcp server was a windows server would it then have to have two nic's installed??
No, the DHCP server will only need one NIC and only it should be only connected to the data lan




Take Care

Matt
I have always wished that my computer would be as easy to use as my telephone.
My wish has come true. I no longer know how to use my telephone.
 
Thanks for all your helps with this guys. I am still a little confused but I think I have enough to at least start to lab some of this up. I going to try it when I have some time at work over the next couple of days. Im sure I'll be back asking some more questions!

Thanks again!
 
Hi again, I started to lab the network. I havent got the telephone switch on site at the moment but wanted to start the network side just to start to play around.

I've setup the following and wanted you guys to take a look to check it looked correct.....

I've plugged a laptop into purt 43 and I'm getting a DHCP address from the data range so all looks ok.

So by just entering the 'switchport voice vlan 20 ' command on int fa 5/0/1 - this will tell the switch to pass voice traffic to vlan 20. How will it know what that traffic is actually voice, is this done by lldp? I have enable lldp on the switch but a little unsure of what to expect. I connected a POE phone to the int 5/0/1 interface and the phone looks like it is requesting a ip address but it never actually gets one. but it does state something about searching vlan 20 (my voice vlan) on the phones display. I take it that it is seraching to the phone system - which isnt connected at the moment, but I would have though that it should at least have picked up an ip address, no?



Switch>
Switch>en
Switch#show config
Using 2732 out of 524288 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
switch 5 provision ws-c3750-48p
system mtu routing 1500
ip subnet-zero
no ip dhcp use vrf connected
!
ip dhcp pool Data
network 192.168.0.0 255.255.255.192
default-router 192.168.0.1
dns-server 192.168.0.1
domain-name DataNetwork.com
!
ip dhcp pool Voice
network 192.168.0.64 255.255.255.192
default-router 192.168.0.1
dns-server 192.168.0.1
domain-name VoiceNetwork.com
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
lldp run
!
!
!
!
interface FastEthernet5/0/1
switchport mode access
switchport voice vlan 20
spanning-tree portfast
!
** left out the rest of the interfaces **

!
interface FastEthernet5/0/43
switchport mode access
switchport voice vlan 20
spanning-tree portfast
!

!
interface Vlan1
ip address 192.168.0.62 255.255.255.192
!
interface Vlan20
ip address 192.168.0.126 255.255.255.192
!
ip classless
ip http server
ip http secure-server
 
I again,

made a mistake on the config

Made the following changes

Ip dhcp pool Data
default-router 192.168.0.62

Ip dhcp pool Voice
default-router 192.168.0.126

and i've enabled ip routing

When I then go to
show ip dhcp binding
I can see the ip address and mac address of the avaya phone - the ip address is from the voice range so all looks good.

 
Hi again, looks like the Avaya phones so NOT support lldp according to our Avaya maintainers. My question is that if the phones don't support cdp nor lldp how will the switch know how to separate voice from data ?
 
According to the documentation the Avaya 4610 does support LLDP (software 2.6 or later) so it should work however there is the option of 'double-DHCP' boot where the phone boots on the untagged VLAN and through DHCP vendor options received from the DHCP server learns the Voice VLAN Tag and then begins transmitting and receiving frames with the Voice VLAN tag.

 
The switch doesn't "know" what traffic is "Voice" and what is "Data", but it does know the difference between frames that are tagged for VLAN 20 and frames that are untagged and therefore assumed to be in VLAN 1.
Therefore the phones need to be configured to tag their (Voice) traffic with VLAN20 in their frame header.
You can do this in a number of ways:
- manually configure the phone with the VLAN ID of 20. You might do this when you are setting up a new network and want to test it from a Layer-2 & Layer-3 perspective prior to rolling out the entire complement of handsets by using one phone.
- use your phone vendor's DHCP option to use DHCP in the default VLAN to instruct the phones on what the correct VLAN tag is for Voice. This is a common way to set it up. The phone will boto up in VLAN1, get a DHCP address plus a DHCP option telling it the Voice VLAN is VLAN 20. The phone will then reboot and send a DHCP request on VLAN 20. It then gets the correct IP address details for VLAN 20 from the DHCP server.
- use LLDP on the switch to instruct the phone that the Voice VLAN is VLAN ID 20. The phone then knows to send its DHCP request on VLAN 20. Many people seem to prefer configuring a DHCP option rather than adding LLDP config to all the Access switches on their network. On the voice projects I've done, only one used LLDP, (and that was an Avaya/Nortel project).

As far as switch configs go, as you aren't using CDP, you won't use switchport config in the form:
int g1/0/1
switchport mode access
switchport access vlan 10
switchport voice vlan 20
Although it will work.

Instead, you would explicitly configure it as a trunk with VLAN 20 tagged:
int g1/0/1
switchport mode trunk
switchport trunk native vlan 10
switchport trunk allow vlan 10,20

Don't forget
switchport portfast trunk

Notice I am using VLAN 10 for Data, not 1. Don't use VLAN 1.

Generally-speaking, this is the sequence of events for implementing a network for a purpose such as yours:
- design
- write switch configs & DHCP configuration
- configure core switch and edge switch as per design and attach DHCP server
- patch my laptop into an access switchport and confirm a Data VLAN IP address is correctly assigned by DHCP
- temporarily configure a switchport as an Access port in VLAN 20, attach a laptop to it and confirm VLAN 20 DHCP is working locally.
- patch phone into Access port and confirm VLAN 20 address is successfully assigned.
After that, you'll be testing the voice system, ie, does the phone register successfully, can it dial another internal phone, can it dial out, then test voice quality.
 
Thanks, the switch I using is a L3 switch so I would I be able to use the config...?


int g1/0/1
switchport mode access
switchport access vlan 10
switchport voice vlan 20


I'll be also configuring the switch to be a dhcp server for the two ranges. I going to test today.
 
Voice VLAN" is the config that gives you CDP.

If your phones don't support CDP, I don't see the point.
It's not an "Access" port, it's clearly a "Trunk", seeing as it's carrying multiple VLANs.

The only Cisco whitepaper I've ever found that dealt with non-Cisco edge devices used the "Trunk" config, which seems pretty obvious to me.

Having said that, I've seen lots of people setting up multi-vendor VoIP networks using Access ports with a "Voice VLAN". Not sure why they do that, I assume it's a kind of ignorance thing where they don't actually understand what's going on with the frame header. It makes no real difference, except for making your config look a bit silly.
 
Ok thanks, I'm currently labing the config. I take it that I put the option statements under my Data dhcp scope ? Where does the actual telephone system fall under is it the data or voice range or does it really matter if routing is config
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top