I want to connect the IP phone to a switch and PC to the IP phone. If i specify the voice VLAN and data VLAN on the same port how will the phone take an IP from the voice VLAN if its dynamic DHCP configured on the phone.
I may be incorrect here (and welcome the correction), but I don't believe you can have 1 switch port (mode access) on more than 1 VLAN. Only ports configured for trunking can pass data for multiple VLANs. So I don't think you would be able to use the phone pass-through in the way you're describing. To do this I believe you would have to have your voice and data on the same VLAN.
n theory you are right the definition of voice vlan and data vlan leads to a trunk port.
However, in modern switches supporting VoIP and IP phones you just need to define the voice vlan and the data vlan and an implicit 802.1Q trunk carrying this two VLANs is formed (you don't need the switchport mode trunk command, in some older switches instead this is a workaround).
Actually there are more options for tagging but the usage of full 802.1Q tags provides full QoS support.
The voice vlan needs to be associated with a L3 SVI vlan/ router interface|subif that is configured with the ip helper address for the dhcp server(s).
On the dhcp server the scope for the voice vlan subnet needs a tftp server policy that lists the call manager servers. The list is passed on the dhcp response to the phone that starts to talk with the CCM cluster.
Communication between the IP phone and the switch port allows to configure correctly the PC port in the data vlan.
CDP exchange allows also to tune the online power if it is supported and user.
I see this every day on job and it works : phones and PCs get their IP addresses via DHCP from different scopes/subnets on "access ports".
In general you are correct that if a port is configured as an access port then it can have only a single VLAN on it. However there is an exception to this when you configure a port as an access port (its VLAN is the data VLAN) and under the port you configure voice-vlan. This allows a second VLAN to operate on that port. As Giuseppe points out this technically makes the port a trunk. But it can carry only the 2 VLANs and is not treated as a real trunk.
We are pleased to announce availability of Beta software for 16.6.3.
16.6.3 will be the second rebuild on the 16.6 release train targeted
towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are
looking for early feedback from customers befor...
Introduction Featured Speakers Luis Espejel is the Telecommunications
Manager of IENova, an Oil & Gas company. Currently he works with Cisco
IOS® and Cisco IOS XE platforms, and NX to some extent. He has also
worked as a Senior Engineer with the Routing P...
In this session you can learn more about Layer 3 multicast and the best
practices to identify possible threats and take security measures. It
provides an overview of basic multicast, the best security practices for
use of this technology, and recommendati...