ā12-18-2023 09:03 PM
Good Day,
I'm a bit new to networking and have a question related to enable voice and data vlan on the same switchport in access mode.
Can we have DHCP enable for the data vlan alone and not the voice vlan? Want to assign address manually for the voice network. Or does both vlan need to use DHCP if using the same switchport
Solved! Go to Solution.
ā12-18-2023 09:51 PM - edited ā12-19-2023 09:51 AM
Hello @darylramharack
In a scenario where you have both voice and data VLANs configured on the same switchport in access mode, you can have DHCP enabled for the data VLAN while manually assigning addresses for the voice VLAN. DHCP settings are typically configured on a per-VLAN basis.
--
interface GigabitEthernet0/1
switchport mode access
switchport access vlan 10 ! Data VLAN
switchport voice vlan 20 ! Voice VLAN
spanning-tree portfast
!
interface Vlan10
ip address x.x.x.x. <mask>
!
interface Vlan20
ip address 192.168.1.1 255.255.255.0 Manually assign addresses for the voice VLAN
!
---
After the initial setup and configuration, once the VoIP devices have obtained their IP addresses from DHCP, you can choose to assign static IP addresses to them manually if needed.
DHCP is enabled for the data VLAN (VLAN 10) by configuring `ip address dhcp` under `interface Vlan10`.
This way, devices connected to the switchport will obtain IP addresses from the DHCP server for the data VLAN, while the voice VLAN will use manually assigned addresses.
Keep in mind that the actual configuration might vary based on your specific networking equipment and requirements, so always refer to the documentation for your device and software version for accurate information.
ā12-18-2023 09:20 PM - edited ā12-18-2023 09:57 PM
the VoIP need DHCP, there are some option the VoIP need to learn it, and the simple way is learn it via DHCP.
so you can make Data have static IP
but VoIP you need DHCP
https://blog.router-switch.com/2013/03/dhcp-option-150-dhcp-option-66/
MHM
ā12-19-2023 09:41 AM
@MHM Cisco World wrote:
the VoIP need DHCP, there are some option the VoIP need to learn it, and the simple way is learn it via DHCP.
so you can make Data have static IP
but VoIP you need DHCPhttps://blog.router-switch.com/2013/03/dhcp-option-150-dhcp-option-66/
MHM
You're assuming Cisco VoIP phones?
Some Brand X only need an IP, which might be assigned statically on the VoIP phone for via DHCP.
ā12-18-2023 09:51 PM - edited ā12-19-2023 09:51 AM
Hello @darylramharack
In a scenario where you have both voice and data VLANs configured on the same switchport in access mode, you can have DHCP enabled for the data VLAN while manually assigning addresses for the voice VLAN. DHCP settings are typically configured on a per-VLAN basis.
--
interface GigabitEthernet0/1
switchport mode access
switchport access vlan 10 ! Data VLAN
switchport voice vlan 20 ! Voice VLAN
spanning-tree portfast
!
interface Vlan10
ip address x.x.x.x. <mask>
!
interface Vlan20
ip address 192.168.1.1 255.255.255.0 Manually assign addresses for the voice VLAN
!
---
After the initial setup and configuration, once the VoIP devices have obtained their IP addresses from DHCP, you can choose to assign static IP addresses to them manually if needed.
DHCP is enabled for the data VLAN (VLAN 10) by configuring `ip address dhcp` under `interface Vlan10`.
This way, devices connected to the switchport will obtain IP addresses from the DHCP server for the data VLAN, while the voice VLAN will use manually assigned addresses.
Keep in mind that the actual configuration might vary based on your specific networking equipment and requirements, so always refer to the documentation for your device and software version for accurate information.
ā12-19-2023 09:47 AM
Hmm, I had assume OP was asking about host IP assignments, not the SVI IPs.
"DHCP is enabled for the data VLAN (VLAN 10) by configuring `ip address dhcp` under `interface Vlan10`.
This way, devices connected to the switchport will obtain IP addresses from the DHCP server for the data VLAN, while the voice VLAN will use manually assigned addresses."
Not necessarily. For the SVI to obtain a DHCP IP the DHCP server would need to know the subnet to pull an IP from. And, although that can be done, the hosts would need to also be configured to use DHCP on the data VLAN. Of course, the host wouldn't be able to use the SVI IP as a gateway unless you assigned a specific IP to the SVI's MAC.
Likewise, even if the VoIP VLAN has a static IP, its hosts might also use DHCP.
ā12-19-2023 09:52 AM - edited ā12-19-2023 09:53 AM
Problem on my snippet. Why ip address dhcp under SVI 10 ? LoL Christmas panic LoL
Sorry error....edited. Thanks for pointing that.
ā12-19-2023 10:11 AM
M02@rt37 wrote:
Problem on my snippet. Why ip address dhcp under SVI 10 ? LoL Christmas panic LoL
Sorry error....edited. Thanks for pointing that.
LoL, actually, I didn't see it as an error. Possibly OP was asking about SVI IP assignments.
ā12-19-2023 09:27 AM
Thanks both for the feedback.
I understand the data vlan, however both solutions indicates the opposite for the voice vlan. One indicates for voice vlan, dhcp is not needed as dhcp is per vlan basis (M02@rt37) and the other indicated its needed (MHM Cisco World )
So as how DHCP settings are typically configured on a per-VLAN basis, if not configured for the voice, then there is no automatic assignments.
ā12-19-2023 09:42 AM
After the initial setup and configuration, once the VoIP devices have obtained their IP addresses from DHCP, you can choose to assign static IP addresses to them manually if needed.
Both vlan need to use DHCP if using the "same" switchport ? No !
ā12-19-2023 09:32 AM
Friend
You needed to push op if not via dhcp then you need to add manually in all phone.
MHM
ā12-19-2023 09:38 AM
"Can we have DHCP enable for the data vlan alone and not the voice vlan?"
Sure can.
"Want to assign address manually for the voice network."
Being curious, why?
"Or does both vlan need to use DHCP if using the same switchport"
Nope. Because, although they share the port, they are different VLANs, and different VLANs (almost always) host different subnets, and DHCP provides IPs per subnet.
ā12-19-2023 09:48 AM
Thanks. Why is because the current configurations have the data and voice vlan on sperate switchports. Data vlan uses dhcp and voice vlan is statically assigned. Now they are asking, to also put the data vlan on the switchport with the voice vlan. Being not to experienced, wasn't sure if this would cause issues but understand now.
ā12-19-2023 09:57 AM
Ok, now it clear
You can use dhcp for both and config port with data and voice vlan.
It not effect the dhcp at all.
The VoIP use CDP to learn it voice vlan ID and send broadcast tag with this vlan and dhcp response with correct IP and op.
MHM
ā12-19-2023 10:10 AM
"The VoIP use CDP to learn it voice vlan ID and send broadcast tag with this vlan and dhcp response with correct IP and op."
Again, sort of assumes a CDP capable VoIP phone, but OP has not identified VoIP phones being used. Brand X VoIP phones often do not support CDP.
ā12-19-2023 10:12 AM
If not cdp then lldp.
Both are same except cdp is only for cisco and lldp is standard.
MHM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide