INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Setting up a voice and data vlan on a switch

Setting up a voice and data vlan on a switch

(OP)
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


RE: Setting up a voice and data vlan on a switch

what are your phones you will be using..do they support either LLDP or CDP?

RE: Setting up a voice and data vlan on a switch

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

RE: Setting up a voice and data vlan on a switch

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

RE: Setting up a voice and data vlan on a switch

(OP)
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

RE: Setting up a voice and data vlan on a switch

> 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.

RE: Setting up a voice and data vlan on a switch

(OP)
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



RE: Setting up a voice and data vlan on a switch

(OP)
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

RE: Setting up a voice and data vlan on a switch

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

RE: Setting up a voice and data vlan on a switch

Quote:

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!

Quote (http://en.wikipedia.org/wiki/Dynamic_Host_Configur...)


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.

Quote:

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.

Quote:

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.

RE: Setting up a voice and data vlan on a switch

(OP)
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!

RE: Setting up a voice and data vlan on a switch

(OP)
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

RE: Setting up a voice and data vlan on a switch

(OP)
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.

RE: Setting up a voice and data vlan on a switch

(OP)
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 ?

RE: Setting up a voice and data vlan on a switch

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.

https://supportforums.cisco.com/thread/2001399


RE: Setting up a voice and data vlan on a switch

Here is also an artical on LLDP that may help as well.

http://packetlife.net/blog/2010/oct/4/link-layer-d...

I know of some people that actually did try setting up trunk ports to each phone, so that could be a method. Otherwise, you can put both voice/data in the same vlan, although not reccommended.

RE: Setting up a voice and data vlan on a switch

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.

RE: Setting up a voice and data vlan on a switch

(OP)
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.

RE: Setting up a voice and data vlan on a switch

"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.

RE: Setting up a voice and data vlan on a switch

(OP)
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

RE: Setting up a voice and data vlan on a switch

--> I assume it's a kind of ignorance thing where they don't actually understand what's going on with the frame header.

Vince - What is happening with the frame header? I am truly curious as I have gone from a Cisco phone world to a non-Cisco(polycom) phone world and the same setup works for both vendors, ie switchport voice vlan.

Using voice vlan with LLDP does the same job as a trunk, tagging voice traffic in a separate vlan while keeping the port as an access port, so why would a port setup as a trunk be better? Plus, voice vlans are very easy to look at a port and know what is voice and what is data. I personally do not like to setup ports as trunks to end user devices (Yes, voice vlan + data vlan is technically a trunk).



RE: Setting up a voice and data vlan on a switch

(OP)
Hi All, Im in need of some help please. I stuck, I mean really stuck :)

I wasn't getting anywhere with registering my phones with the two vlans so I just gone back to basics. I got rid of all the telephony kit at the moment

here is my config

Switch#show config
Using 2869 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
no ip subnet-zero
ip routing
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
interface FastEthernet5/0/1
!
interface FastEthernet5/0/2
switchport access vlan 100
switchport mode access
!
interface FastEthernet5/0/3
!
interface FastEthernet5/0/4
!
interface FastEthernet5/0/5
switchport access vlan 100
switchport trunk encapsulation dot1q
switchport trunk native vlan 100
switchport trunk allowed vlan 100,200
spanning-tree portfast
!
interface FastEthernet5/0/6
switchport access vlan 100
switchport trunk encapsulation dot1q
switchport trunk native vlan 100
switchport trunk allowed vlan 100,200
spanning-tree portfast
!
interface FastEthernet5/0/7
!
i
!
interface FastEthernet5/0/16
!
interface FastEthernet5/0/17
switchport access vlan 100
switchport mode access
!
interface FastEthernet5/0/18
switchport access vlan 200
switchport mode access
!
interface FastEthernet5/0/19
!
i
!
interface Vlan1
ip address 172.16.0.1 255.255.0.0
!
interface Vlan100
description Data
ip address 192.168.10.1 255.255.255.192
!
interface Vlan200
description Voice
ip address 192.168.10.65 255.255.255.192
!
ip default-gateway 192.168.10.65
ip classless
ip http server
ip http secure-server
!
!
!
control-plane
!
!
line con 0
line vty 5 15



so I have my data vlan 100 and a voice vlan of 200.
I have a laptop in fa 5/0/5 with a vlan 100 address 192.168.10.10 /26 and another in fa 5/0/6 with a vlan 200 address of 192.168.10.66.
both laptops have the correct default gateway of vlan 100 = 192.168.10.1 & vlan 200 = 192.168.10.65

I have ip routing enabled but I cant ping from laptop to laptop which I should be able to. If I plug in the laptops into fa 5/0/17 & 18 all is find, I can send my pings around.

I have tried to remove the config and use the voice vlan command instead but I still cant ping across the different subnets. Strange? or im I missing something pretty straight forward!

any idea's please

RE: Setting up a voice and data vlan on a switch

"portfast TRUNK".

The Microsoft OS has a security process which blocks ICMP that's being routed. That's why it works when the two laptops are on the same subnet.

RE: Setting up a voice and data vlan on a switch

Hang on, I didn't read what you wrote properly.

The laptop in 5/0/6 isn't going to work as it's on a tagged VLAN. Laptops generally don't have ethernet cards capable of doing 802.1q.

The purpose of having a laptop on an Access port configured in VLAN200 is to test your DHCP is working for VLAN 200, and your inter-VLAN routing is working. That's what you've done with ports 17 & 18.

Now you need a phone in port 6 to test it can register with the voice server/gateway.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close