Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Identify from PC the directly connected IP Phone

Hello,

I need to automatically identify from a PC the IP Phone that is connected to. So, I would like to discover from PC the mac-address or the Device Name of that IP Phone. How could I do it?

I think one possibility could be the computer to listen to CDP packages. But if the PC receives all CDP packages of all devices trough the same interface, could it distinguish which phone is the directly connected to?

Other possibility would be ARP tables allocated in the switches, but I think it would be difficult to automate.

What do you think? Any idea?

Thanks,

Christian

6 REPLIES
Hall of Fame Super Gold

Re: Identify from PC the directly connected IP Phone

If you configure switchport voice vlan and switchport access, then use the command "show mac- int ".  You should get two results:  One for the phone and one for the PC.

Does this help?

New Member

Re: Identify from PC the directly connected IP Phone

I think leolaohoo's method is sound.  There is a way to learn the phone's MAC address from the PC rather than the switch, although either would be tough to automate.  In the past when I wanted to monitor a IP phone's traffic from the attached PC, I enabled 'Span to PC Port' in the Device>Phone configuration record.

It is shown here:

http://www.cisco.com/en/US/products/sw/custcosw/ps1846/products_tech_note09186a008075025a.shtml

Having enabled that option, I used a sniffer program (e.g. Wireshark) to analyze the phone's packets in addition to the PC's packets, and the IP phones MAC address was present in the packet capture.  Heck, you may simply be able to type ARP -A from a DOS window on the PC after enabling Span to PC port to see the MAC of the phone, but we'll have to wait to get back to work to try that one out.

New Member

Re: Identify from PC the directly connected IP Phone

Thanks leolaohoo and tzunt for your ideas. As tzunt comments I think that leolaohoo suggestion is difficult to automate but not imposible (I'm thinking on a solution based on a web service, SOAP or XML-RPC, that recives as input the MAC address of the pc and returns the MAC address of the phone. The web service would use Expect scprinting language to launch telnet/SSH connections to Cisco switches and launch the needed commands)

tzunt solution should also be possible, but I would have to develop a mini-sniffer to see the phone traffic and so to discover the MAC address of the phone. I disagree with tzunt about I think that MAC address of the phone wouldn't be able on the ARP table of the PC and would be necessary to use the sniffer to discover the MAC address of the phone.


So at this point I only have two posible solutions:

- develop a sniffer

- use mac tables and cdp utilities of Cisco Switches

A third solution could be to develop a mini-application that talks CDP (Cisco Discovery Protocol) and would be executed from PC. But I don't know if Cisco have an API to do this, do you know?

Thanks again,

Christian

New Member

Re: Identify from PC the directly connected IP Phone

Hi all,

I am also dealing with same problem.But we can't develop a sniffing application since we have account restrictions. How can I use mac tables or cdp utılıtıes of cisco switches.Basicly I need MAC Address of IP Phone from my PC.It shouldn't be complicated

Regards

Olcay

Hall of Fame Super Gold

Identify from PC the directly connected IP Phone

Try this command:

conf t

ip device tracking

Interface

ip device tracking max 10

end

Wait for approximately 30 seconds, then try the command "sh ip device tracking all".

NOTE:  This set of commands will depend entirely upon your IOS version.

New Member

Re: Identify from PC the directly connected IP Phone

Thanks for your reply.

I guess these are switch commands but I don't have access to switch. (Although I will tell the switch administrator to run these commands on switch if possible).

When I use wireshark on my PC, I can see CDP packages which has deviceID information for both soft and hard phone. So I guess, i can see MAC address of hardphone from my PC.But when I use 'arp -a', i cant. (I use windows 7)

756
Views
0
Helpful
6
Replies