Community discussions

MikroTik App
 
totten
just joined
Topic Author
Posts: 6
Joined: Wed May 05, 2021 4:21 am

Option 132 for voice vlan doen't work

Mon May 31, 2021 12:10 pm

Hi
I want to configure the voice vlan implementation through option 132 in DHCP, but for some reason it doesn't work.
I have two hap ac devices, one configured as a router, the other as a switch.
Here is a router settings:
/interface vlan
add interface=ether2 name=vlan30 vlan-id=30
/ip address
add address=10.30.30.1/24 interface=vlan30 network=10.30.30.0
/ip dhcp-server
add address-pool=voip-pool disabled=no interface=vlan30 name=vlan30-dhcp
/ip dhcp-server option
add code=132 name=option132 value="s'30'"
/ip dhcp-server network
add address=10.30.30.0/24 comment=vlan30 dhcp-option=option132 dns-server=10.30.30.1 gateway=10.30.30.1
Here is a switch settings:
/interface bridge
add name=bridge1 vlan-filtering=yes
/ip dhcp-client
add disabled=no interface=bridge1
/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
/interface bridge vlan
add bridge=bridge1 tagged=ether1,ether2,ether3,ether4,ether5 vlan-ids=30
When I connect the IP phone to switch, it gets the IP address from the network 10.10.10.0/24, although it has the option 132 enabled to get the correct vlan
Image

Does anyone have any idea what I'm doing wrong and why this way of getting the vlan for voip doesn't work?
 
tdw
Forum Guru
Forum Guru
Posts: 1841
Joined: Sat May 05, 2018 11:55 am

Re: Option 132 for voice vlan doen't work

Mon May 31, 2021 1:21 pm

The DHCP option should be part of the /ip dhcp-server network settings for the untagged network to which the phone is connected. The phone will initially make a DHCP request on the untagged network, see the option in the reply, switch to using the specified VLAN and make a second DHCP request.

Depending on the phone you may also have to disable other voice VLAN discovery mechanisms, such as LLDP.
 
totten
just joined
Topic Author
Posts: 6
Joined: Wed May 05, 2021 4:21 am

Re: Option 132 for voice vlan doen't work

Mon May 31, 2021 3:44 pm

The DHCP option should be part of the /ip dhcp-server network settings for the untagged network to which the phone is connected. The phone will initially make a DHCP request on the untagged network, see the option in the reply, switch to using the specified VLAN and make a second DHCP request.

Depending on the phone you may also have to disable other voice VLAN discovery mechanisms, such as LLDP.
Thanks for the answer, I forgot to mention that option 132 is set on the main dhcp server
/ip dhcp-server network
add address=10.10.10.0/24 dhcp-option=option132 dns-server=10.10.10.1 gateway=10.10.10.1 \
    netmask=24
LLDP and CDP are disabled on the phone
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Option 132 for voice vlan doen't work

Mon May 31, 2021 3:47 pm

you do not post full export,
your DHCP server is working on VLAN30, but if your phone is not already on vlan30,
how know to go on VLAN30 if the DHCP do not reply on non VLAN30 phone request?

and if your phone already are on vlan30, must give the "command" from dhcp-server to go on vlan30, if is already on vlan30 to see the dhcp-server?


and this is for???
/ip dhcp-client
add disabled=no interface=bridge1
 
totten
just joined
Topic Author
Posts: 6
Joined: Wed May 05, 2021 4:21 am

Re: Option 132 for voice vlan doen't work  [SOLVED]

Mon May 31, 2021 5:35 pm

hah … I solved this issue, maybe it will be useful to someone, vlan id should be transmitted in hex form.
In my case vlan 30 should look like this
/ip dhcp-server option
add code=132 name=option132 value="s'0x1e'"
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Option 132 for voice vlan doen't work

Mon May 31, 2021 5:39 pm

s'30' = 30 as string
s'0x1e' = 0x1e as string
'0x1e' or '30' = 30 / 0x1e as numeric value
 
totten
just joined
Topic Author
Posts: 6
Joined: Wed May 05, 2021 4:21 am

Re: Option 132 for voice vlan doen't work

Mon May 31, 2021 6:09 pm

s'30' = 30 as string
s'0x1e' = 0x1e as string
'0x1e' or '30' = 30 / 0x1e as numeric value
Thank you, for some reason I thought it should always be a string. As a numeric value it also works.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Option 132 for voice vlan doen't work

Mon May 31, 2021 6:11 pm

s'30' = 30 as string
s'0x1e' = 0x1e as string
'0x1e' or '30' = 30 / 0x1e as numeric value
Thank you, for some reason I thought it should always be a string. As a numeric value it also works.
Brand count, yeastar works differently than gigaset, etc.
 
totten
just joined
Topic Author
Posts: 6
Joined: Wed May 05, 2021 4:21 am

Re: Option 132 for voice vlan doen't work

Mon May 31, 2021 6:39 pm

Brand count, yeastar works differently than gigaset, etc.
Yep, I checked it with Fanvil and Grandstream phones and it works either with a hex string or a numeric value.
Any way thanks for advise.

Who is online

Users browsing this forum: Ahrefs [Bot], Rhydu and 54 guests