cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1425
Views
5
Helpful
17
Replies

Voice & Data VLAN - DHCP Query

darylramharack
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

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.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

17 Replies 17

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


@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 DHCP

https://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.

M02@rt37
VIP
VIP

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.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

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.

@Joseph W. Doherty 

Problem on my snippet. Why ip address dhcp under SVI 10 ? LoL Christmas panic LoL

Sorry error....edited. Thanks for pointing that.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.


M02@rt37 wrote:

@Joseph W. Doherty 

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.

darylramharack
Level 1
Level 1

M02@rt37 @MHM Cisco World 

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.  

 

@darylramharack 

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 !

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Friend

You needed to push op if not via dhcp then you need to add manually in all phone. 

MHM

Joseph W. Doherty
Hall of Fame
Hall of Fame

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

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.  

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

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

If not cdp then lldp.

Both are same except cdp is only for cisco and lldp is standard.

MHM

Review Cisco Networking for a $25 gift card