Using VLANs and Digium Phones

Not sure if this is the right forum but this is where I will start. I have the latest Distro of FreePBX installed. I have a Cisco 2821 router and Cisco 3550 PoE switch configured with vlan1 for data and vlan80 for voice. The port the FreePBX server is plugged into has vlan80 as its primary vlan since the server is static IP configured with a 10.80.x.x address. The router is using a single ethernet port sub-interfaced for the two vlans. All other ports are configured as IP Phone and Desktop ports using CNA. When I plug a Digium D40 phone into one of those ports, it gets its IP address from the data vlan rather than the voice vlan. I have dhcp configured and running on the FreePBX server. Following is that configuration. I am retyping from the FreePBX screen so hope I don’t make any mistakes.

ddns-update-style interim;
ignore client-updates;
DHCPARGS=eth0;
option tftp66 code 66 = string;
option tftp66 “10.80.0.31”;
subnet 10.80.0.0 netmask 255.255.0.0 {
range 10.80.0.100 10.80.0.254
option routers 10.80.0.1; #sub-interface on the 2811 router
option subnet-mask 255.255.0.0;
option tftp-server-name “10.80.0.31”;
option time-offset -7;
option ntp-servers 17.254.0.26;
max-lease-time 86400;
}

What I am trying to figure out is why the D40 does not pick up its IP address via dhcp from the voice vlan. Admittedly I am not as knowledgeable about FreePBX, Digium phone protocols, etc., as I am about many things Cisco. The Cisco 7960s I am using that I reconfigured as SIP phones seem to find their IP address just fine from the FreePBX server as well as their respective loads.

What am I missing and/or what is it I don’t understand about how Digium phones access a voice vlan.

Thank You.

Howdy Jim!

In Digium Phones config, edit your network and click to expand the little +Adavanced section towards middle of page. From there you can try disabling discovery and statically set the vlan id.

Thanks, Derek. That certainly seems to have fixed that issue. But now I notice that since the FreePBX computer is on the voice vlan and my computer is on the data vlan, some operations on the FreePBX GUI take minutes to execute. Others happen at regular speed but some – like Digium Phones – take minutes to display in the web browser. Would this possibly be expected behavior if I don’t have an internet connection in this test setup? Perhaps FreePBX is looking for something on the web as part of its processes. I’ll keep plugging away. Glad to hear you finally got your jeep. Now you can come up and crawl around Bangs Canyon in it.

Well, the latency has cleared up somewhat and the manual config on the vlans is working for the Digium phones.

For anyone else listening out there, regarding the initial issue, does my config for the tftp servers and the tftp options look correct. Not so sure they’re working as they should. The Cisco phones don’t seem to be picking up that option 150 right away. I’m getting a strange address for the tftp server in the Cisco phone network config. Think it it something like 48.45.46.48 or something along that line. So am wondering if I have that set up correctly or not. I’ve seen variants of the configuration for that portion in different threads on the web and want to make sure I have the right one for CentOS and FreePBX. Thank You.

Well, thanks anyway Derek. But the Digium phone is back to its old behavior. Picking up IP address from the data vlan instead of the voice vlan. But I did figure out the workaround for the Cisco phones. See the revised dhcpd.conf config below. Will get some other brand phones and see if they play better than the Digium phones. It’s obvious they will not recognize a voice vlan from a Cisco switch. And considering we have hundreds of these guys to eventually set up, I ainit about to be manually configuring the server on everyone of them. Here is the updated config that makes the Cisco phones boot up quite nicely – almost as quickly, if not moreso, than they do from Call Manager.

Let me know sometime when you want to come over to the west side of Colorado and play in the high desert.

ddns-update-style interim;
ignore client-updates;
DHCPARGS=eth0;
option voip-tftp-server code 150 = ip-address;
option voip-tftp-server code 66 = ip-address’
option voip-tftp-server 10.80.0.31;
subnet 10.80.0.0 netmask 255.255.0.0 {
range 10.80.0.100 10.80.0.254;
option routers 10.80.0.1;
option subnet-mask 255.255.0.0;
option tftp-server-name “10.80.0.31”;
option time-offset -7;
option ntp-servers 17.254.0.26;
max-lease-time 86400;
}

Why don’t you just use LLDP so the phones discover their VLAN?

Yes, you need to run LLDP med. How do you have the two VLAN’s routed together?

What is the gateway? You should have no delay between the VLAN’s

Thanks for the replies. LLDP is what I had on the phones for the first two days of trying. As for the switch, LLDP is not a configurable option on the Cisco 3550. However, the Polycom phones seem to have no problem with finding the voice vlan on the same switch and registering with FreePBX. If they insist on Digium phones – and not sure that’s even an issue – then we’ll go with Switchvox. I’ll try two or three other brands of phones and see how they react. To answer your questions, the VLANS are configured via sub-interface on a Cisco 2821 router. The 3550 PoE is configured via CNA and CLI. Since the data vlan dhcp server is running on the router and the voice dhcp server is running on the FreePBX server which has an IP address on the voice vlan, the phone apparently does not differentiate between data and voice vlan and just picks the first dhcp server it finds, which appears to be the one running on the 2821 router. Thank you again for your replies.

The 3550 does support LLDP MED, since IOS 12.2

It sounds to me like you don’t have the ports in 802.1q trunking mode. There is no way the Digium phone will ignore the VLAN tags and bridge the two VLAN’s. This would cause major network issues.

Even if you have to manually enter the Voice VLAN ID in the Digium phone and forget about LLDP you should have no issues.

Also the phone service should be in an access port only on the voice VLAN. The data VLAN should be native and the voice VLAN tagged.

Below is the configuration for the first three (3) ports on the switch. Port 1 is the router port. Port 2 has the FreePBX server attached. Ports 3 and beyond would be phone ports. This configuration works with no issue for the Cisco and Polycom phones. Are you indicating that I need to set the encapsulation on all of the phone switchports to dot1q? Have never seen that on any switch I’ve ever configured but that’s not saying there is a first time for everything.

interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
mls qos trust dscp
auto qos voip trust
macro description cisco-router
wrr-queue bandwidth 10 20 70 1
wrr-queue min-reserve 1 5
wrr-queue min-reserve 2 6
wrr-queue min-reserve 3 7
wrr-queue min-reserve 4 8
wrr-queue cos-map 1 0 1
wrr-queue cos-map 2 2 4
wrr-queue cos-map 3 3 6 7
wrr-queue cos-map 4 5
priority-queue out
spanning-tree portfast
spanning-tree bpduguard enable
!
interface FastEthernet0/2
switchport access vlan 80
switchport mode access
switchport port-security
switchport port-security aging time 2
switchport port-security violation restrict
switchport port-security aging type inactivity
macro description cisco-desktop
spanning-tree portfast
spanning-tree bpduguard enable
!
interface FastEthernet0/3
switchport mode access
switchport voice vlan 80
switchport port-security
switchport port-security maximum 3
switchport port-security aging time 2
switchport port-security violation restrict
switchport port-security aging type inactivity
mls qos trust device cisco-phone
mls qos trust cos
auto qos voip cisco-phone
macro description cisco-phone
wrr-queue bandwidth 10 20 70 1
wrr-queue min-reserve 1 5
wrr-queue min-reserve 2 6
wrr-queue min-reserve 3 7
wrr-queue min-reserve 4 8
wrr-queue cos-map 1 0 1
wrr-queue cos-map 2 2 4
wrr-queue cos-map 3 3 6 7
wrr-queue cos-map 4 5
priority-queue out
spanning-tree portfast
spanning-tree bpduguard enable
!

Please consider case closed and spend no further of your valuable time on it.

What did you find? The voice-vlan 80 has the same effect as:

switchport mode trunk
switchport trunk native vlan xx (where xx is data vlan)

Thanks to everyone for their input on this topic. Looks like we’ll just have to touch each of the Digium phones at least once when they are first set up. If I can lay my hands on a copy of the Cisco IOS that has LLDP enabled, I’ll give that a try.