I've been wondering if there is any way to find out the IP address of an IP Phone from the pc it is connected to via the PC Port. My first thought was to try to "tracert" to the callmanager from the PC, taking notes of the IP adresses that the packet went through, but obviously that won't work - IP phones don't act like routers :/
The problem is that the phone-pc connection is not "static", the phones are moved around a lot, so creating a database or smth similiar with a list of phones assigned to PC's is not an option.
So, is it possible to get the IP I am looking for?
Thank you in advance,
The first thing that comes to mind this early in the morning for me is if you have the PC and phones plugged into a Cisco switch you could do a show cdp neighbors or show cdp neighbors detail command on the swith. If memory serves that should give you the info you are looking for.
Hope this helps
Please remember to rate all replies.
Unfortunately I don't have a switch available at the moment to check it out. As far as I understand, the "show cdp neighbors" command will show all the devices plugged into the switch, including other PC's and phones, is that right? I've noticed that in the response to the command, you get "Port ID" values for each device. According to a Cisco manual the "Port ID" value is "The protocol and port number of the device". Does that mean that in my case, I will have to look for devices with the same port number as the PC has?
Thank you for your help,
there are programs/scripts around to do a CDP capture(monitor) from the PC.
It captures packets, but only works on phones like 7940 where packets are replicated to the PC.
have a look here, look for cdpr
Of course, there are other Switches than Cisco so the bottom line is there's no reliable and Switch independent way to get this done.
Why do you move phones rather than using EM?
Well, you never know.. somebody might want to move his/her laptop to another desk, and I wanted to make sure that even in that case the laptop would be able to find the ip of the phone to which it is now connected.
Anyway, in case the Phone-PC link is static.. What do you think would be the best way to keep a list of PC's and phones associated to them? Creating a custom database is all I can think of at the moment.
Well, the best thing I can think of would be this:
1) Use extension mobility or set the phone owner user id for each phone
2) configure the associated PC for each user in the callmanager.
Now, you can query the EM service or the CCM database to figure out who owns a phone, and then access the DC directory to find the name of the pc associated to that user, and you have the PC <-> phone link.
If you need to go from PC name to phone, search the DC directory for the PC name in question, that gets you the user, then you check the EM service or CCM db to see which phone the user is currently logged into / which phone the user owns.
That sounds interesting. How do I find out which other phones replicate the packets to the PC? Could you give me a link?
I can you can always just run that tool and connect your PC to various phone types.. I've never seen anything about CDP and phones being mentioned before.
Ethereal should also understand CDP so you can run Ethereal on your laptop, and connect it to the switch of the different phone types and see if you get any traffic.
But in any case, the lookup procedures I outlined should be universal. If you have static PCs where user log in (and the same for the phones), that methodology won't work though.. in that case you effectively would need a DB, then again as I understand you you have mobile users that will always take their PC with them, and that may or may not take the phone with them.