cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11639
Views
0
Helpful
10
Replies

VOIP phone not getting IP from correct VLAN

Andy White
Level 3
Level 3

Hello,

(sorry not sure if it is a VOIP or Switch issue)

We are installing a couple of VOIP phones in a new office, the VOIP service is hosted and the phones are Yealink. Off these VOIP phones are PC, but both the phone and PC get an IP from the DATA VLAN, I want the VOIP phone to go on it's VOICE VLAN.

Here is an example of the port, it is a Layer 2 switch (2960x):

description PC & IP Phone

switchport trunk native vlan 10

switchport trunk allowed vlan 10,62

switchport mode trunk

spanning-tree portfast trunk

spanning-tree bpduguard enable

The trunk port:

interface GigabitEthernet1/0/24

description ROUTER-LAN

switchport trunk allowed vlan 1,10,62

switchport mode trunk

speed 100

duplex full

spanning-tree portfast trunk

Router:

ip dhcp pool Data

   domain-name gb.vo.local

   default-router 172.30.12.8

   dns-server 192.168.21.10 192.168.21.11

   option 66 ip 192.168.28.89

!

ip dhcp pool Voice

   network 172.30.212.0 255.255.255.0

   domain-name gb.vo.local

   dns-server 192.168.21.10 192.168.21.11

   default-router 172.30.212.1

interface FastEthernet0/1

description LAN

no ip address

duplex full

speed 100

!

!

interface FastEthernet0/1.10

description DATA LAN

encapsulation dot1Q 10

ip address 172.30.12.11 255.255.255.0

standby 1 ip 172.30.12.8

standby 1 priority 110

standby 1 preempt

standby 1 track 1 decrement 10

!

interface FastEthernet0/1.62

description VOICE VLAN

encapsulation dot1Q 62

ip address 172.30.212.1 255.255.255.0

!

Does it all look ok?

I can see the phones:

sh lldp neighbors

Capability codes:

    (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device

    (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

Device ID           Local Intf     Hold-time  Capability      Port ID

IPPHONE             Gi1/0/14       138        B,T             0015.654c.6630

IPPHONE             Gi1/0/19       156        B,T             0015.654c.65f6

Thanks

10 Replies 10

Guru Mysoruu
Level 1
Level 1

Hi Andy,

Is the configs are you posted is correct.

Then,switch configuration must be

description PC & IP Phone

switchport access vlan 10

switchport voice vlan 62

spanning-tree portfast

spanning-tree bpduguard enable

Your Voive pool Must be

ip dhcp pool Voice

   network 172.30.212.0 255.255.255.0

   domain-name gb.vo.local

   dns-server 192.168.21.10 192.168.21.11

   default-router 172.30.212.1

   ip helper address ( Your DHCP address)

   option 66 ip TFTP Address

your default router of vlan will be vlan address itself

For your data network,you dont need option 66

I will try your config.  The DHCP I think is correct as they download the config via the internet and if I make the port just vlan 10 it works

Karthick Murugan
Cisco Employee
Cisco Employee

Hi Andy,

In the DHCP pool of voice and data, please specify option 150.

option 150 ip

Thanks & Regards,
Karthick Murugan
CCIE#39285

Thanks & Regards, Karthick Murugan CCIE#39285

Hi Andy,

Please look at the below post as well which would help.

https://supportforums.cisco.com/thread/2146496

Thanks & Regards,
Karthick Murugan
CCIE#39285

Thanks & Regards, Karthick Murugan CCIE#39285

John Blakley
VIP Alumni
VIP Alumni

If you're wanting to use lldp for the phones, you can create a network profile and then apply that profile to the individual ports:

network-policy profile 1

voice vlan 10

interface FastEthernet0/3

switchport mode access

network-policy 1

mls qos trust dscp

spanning-tree portfast

The phone will see lldp from the switch and place itself in vlan 10 (change to what you're needing). You then don't need to worry about putting your phones on a trunked port. I don't configure my ports like the above on most of my switches though. For the most part, the phones connect to the PC which connects to the port on the switch. The switchport is trunked for both vlans - data and voice. The phone gets an address from the native vlan which also has the string that tells the phone what vlan it should be on. The phone then changes to that vlan and pulls an address from the voice vlan along with any information that it needs for the call server etc.

Looking at your config, I'm not sure what string your phone supports, but somehow you have to tell it what vlan to tag its traffic with. As Karthick mentions, option 150 is one type of string, and there is option 242. You have to find out which one your phones support and use that to tell the phone what vlan to tag their traffic with, set the call server to, etc.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Seems:

description PC & IP Phone

switchport access vlan 10

switchport voice vlan 62

spanning-tree portfast

spanning-tree bpduguard enable

Fixed it, I will know more in the morning, but our VOIP portal with Natterbox who host this VOIP services sees it all as good and has sent the config and firmware down to it successfully, plus I can ping it.

Will know more in the morning.

Thanks

Seems I spoke too soon.

The VOIP phone works but the PC connected via te VOIP phones gig port can't get a DHCP address, an ideas?

Thanks

Hi Andy,

The problem is,there is mismatch in data vlan and voice vlan dhcp pool.

remove option 66 for ip dhcp  data pool in your config

enable option for 66 for voice vlan

Retain same switch config

Now both will work

Andy,

Your DHCP pool for voice and data don't make any sense.

Post the configuration which contains the DHCP pools, exceptions and the VLAN IP addressing.

All was all good, it was jus tthe network command missing:

ip dhcp pool Data

  network 172.30.12.0 255.255.255.0

   domain-name gb.vo.local

   default-router 172.30.12.8

   dns-server 192.168.21.10 192.168.21.11

!

ip dhcp pool Voice

   network 172.30.212.0 255.255.255.0

   domain-name gb.vo.local

   dns-server 192.168.21.10 192.168.21.11

   default-router 172.30.212.1

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco