Configuring VoIP VLAN through DHCP - where?

Hi,

as you might know it is possible to assing a VLAN ID to IP based phones (VoIP). So when they start they request an IP address in the untagged VLAN, will get an IP together with a VLAN ID. Then they do not ACK the offered IP, instead restart a request, now with the given VLAN ID tag. The DHCP server in the VLAN now answers the request and the phone will use the IP from the correct VLAN. So basically you will need settings like this in your dhcp-server:
VLAN

My UCS serves the local (untagged) VLAN and a second dhcp server serves the taggen VoIP-VLAN. The phone boots and everything works perfectly, because I have it configured a while ago.

Unfortunately I was so lame not to document what I have done and I would like to change the number of my VLAN…

So I have configured my UCS dhcp in some way to provide this information as my IP phone picks it up and runs fine. But: WHERE is it configured?
So I did:

root@ucs:/etc/dhcp# ucr dump| grep dhcpd
dhcpd/autostart: yes
dhcpd/options/voip-vlan/132: string
dhcpd/restart/listener: yes

I see I have added the option 132 as string here which means I would have to assign the VLAN ID to this option…

The dhcpd.conf got rewritten through ucr commit /etc/dhcp/dhcpd.conf and shows this option. But not more.
I checked through udm and any policies in the subnets but did not find any hint how it gets theVLAN ID.

So I’d say I am currently a little bit dumb assuming it is very easy to figure out. I just do not see it…

Please, give me a hint where I configured the VLAN ID!

Thanks a lot!

/KNEBB

Hello,

it’s possible to add DHCP options and DHCP statements to the LDAP objects “DHCP service” and “DHCP subnet” in UCS. For an example see https://help.univention.com/t/9931. Maybe you can find your VLAN ID option there?

Best regards,
Michael

Hi& thanks for the idea.

I have checked this previously. And now double checked.
None of these objects does have any options set:
dhcp2

I am really wondering because I do not see any occurences of the VLAN ID “7” at all… is it guessing???

Strange…

/KNEBB

Hmm, strange. Maybe we should check if the VLAN ID is served by the DHCP daemon at all? Two possibilities come to my mind:

First, check the config:

  • Edit /etc/dhcp/dhcpd.conf and remove the # in front of the line ldap-debug-file "/var/log/dhcp-ldap-startup.log";

  • Before:

[...]
# ldap-debug-file "/var/log/dhcp-ldap-startup.log";
[...]
  • After:
[...]
ldap-debug-file "/var/log/dhcp-ldap-startup.log";
[...]
  • Restart the DHCP daemon:
systemctl restart univention-dhcp.service
  • Check the debug log file: /var/log/dhcp-ldap-startup.log
    You should find the service, subnet and pool configurations there. Does the VLAN ID option show up?

Second one: Install the tool dhcpdump from the unmaintained repository. It works similar to (and relies on) tcpdump, but is better suited for DHCP packets. You should be able to examine the DHCP packets the server sends to your VoIP phones:

dhcpdump -i interface -h mac-address

Hi,

as usual: I haven’t changed anything! But today the phone did not get it’s VLAN ID. 8-\

I checked the logs yesterday- it worked yesterday!

Anyways, now I have added advanced options and it is working again. dhcp

And I know where to change the settings.

Thanks for the great hint for dhcpdump- I will use it in future!

/KNEBB

Mastodon