04-25-2013 04:49 AM - edited 03-16-2019 04:59 PM
Is there any command for CUCM to run from CLI which can give us which switchport it is connected to?
Something like show cdp neighbor.
I have tried different commands from CUCM CLI but none of them is giving this basic information.
Is there a SQL query or somethin which can provide such detail?
Any help would be much appreciated.
Solved! Go to Solution.
04-25-2013 07:43 AM
I tested this in the lab and it looks like the CDP traces aren't detailed enough to print the actual port information. Your other option is to just take a network capture from CUCM and download it with RTPT then filter for CDP traffic.
utils network capture eth0 file cdp.cap size all count 100000
04-25-2013 05:25 AM
You can watch the CDP trace in real-time and just wait up to 60 seconds for the next broadcast.
file tail activelog cm/trace/cdp/sdi/ recent
04-25-2013 05:40 AM
Hi Brain,
It is intresting that we can get this info.
Do u have any such snapshot with u ?
regds,
aman
04-25-2013 07:00 AM
Hi Brian, thanks for that command.
I tried it but I am still not getting switchport information.
Can you please help if I am missing something here.
admin:file tail activelog cm/trace/cdp/sdi/ recent
|<:MY_CLUSTERID><:MY_NODEID><:ERROR><:0001>
04/25/2013 14:58:47.512 CDP Daemon|-->cdp_read_tlv_duplex() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 14:58:47.512 CDP Daemon| cdp_read_tlv_duplex() Inside cdp_read_tlv_duplex method
|<:MY_CLUSTERID><:MY_NODEID><:ERROR><:0001>
04/25/2013 14:58:47.512 CDP Daemon| cdp_read_tlv_duplex() Method cdp_read_tlv_duplex ends
|<:MY_CLUSTERID><:MY_NODEID><:ERROR><:0001>
04/25/2013 14:58:47.512 CDP Daemon|<--cdp_read_tlv_duplex() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 14:58:47.512 CDP Daemon| cdpd_read_Cache() Duplex Match, full
|<:MY_CLUSTERID><:MY_NODEID><:SIGNIFICANT><:0001>
04/25/2013 14:58:47.512 CDP Daemon|<--cdpd_read_Cache() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
Control-C pressed
admin:
admin:
admin:file tail activelog cm/trace/cdp/sdi/ recent
|<:MY_CLUSTERID><:MY_NODEID><:ERROR><:0001>
04/25/2013 14:58:47.512 CDP Daemon|-->cdp_read_tlv_duplex() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 14:58:47.512 CDP Daemon| cdp_read_tlv_duplex() Inside cdp_read_tlv_duplex method
|<:MY_CLUSTERID><:MY_NODEID><:ERROR><:0001>
04/25/2013 14:58:47.512 CDP Daemon| cdp_read_tlv_duplex() Method cdp_read_tlv_duplex ends
|<:MY_CLUSTERID><:MY_NODEID><:ERROR><:0001>
04/25/2013 14:58:47.512 CDP Daemon|<--cdp_read_tlv_duplex() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 14:58:47.512 CDP Daemon| cdpd_read_Cache() Duplex Match, full
|<:MY_CLUSTERID><:MY_NODEID><:SIGNIFICANT><:0001>
04/25/2013 14:58:47.512 CDP Daemon|<--cdpd_read_Cache() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
CCM:
admin:show version active
Active Master Version: 7.1.3.32900-4
04-25-2013 07:06 AM
Hi,
You would be getting file name like ccm00000001.txt. Check for the recent one like ccm00000004.txt
regds,
aman
04-25-2013 07:11 AM
Hi Aman, where is the filename in my output I posted before..I cannot see any!
04-25-2013 07:14 AM
Hi,
I t should be file tail activelog cm/trace/cdp/sdi/?
Press enter .U should be able to find the file.
Can u share the output of this command.?
regds,
aman
04-25-2013 07:25 AM
admin:file tail activelog cm/trace/cdp/sdi/?
Syntax:
file tail activelog file-spec [options]
file-spec mandatory file to tail
options optional hex,[num lines],regexp "expression"
recent : to tail the most recently changed file in the directory.
admin:file tail activelog cm/trace/cdp/sdi/.
Executed command unsuccessfully
tail: error reading `/var/log/active/cm/trace/cdp/sdi/.': Is a directory
tail: /var/log/active/cm/trace/cdp/sdi/.: cannot follow end of this type of file; giving up on this name
tail: no files remaining
admin:file tail activelog cm/trace/cdp/sdi/ .
Executed command unsuccessfully
tail: error reading `/var/log/active/cm/trace/cdp/sdi/': Is a directory
tail: /var/log/active/cm/trace/cdp/sdi/: cannot follow end of this type of file; giving up on this name
tail: no files remaining
admin:
04-25-2013 07:22 AM
OK, first of all we need to run file list command to see which one is latest.
# file list activelog cm/trace/cdp/sdi/
I got a long list, the file at the end should be recent one cdpd000000250.txt
then I ran file view command
# file view activelog cm/trace/cdp/sdi/cdpd000000250.txt
I still cannot see switchpoport!
04/25/2013 07:51:20.486 CDP Daemon| cdpd_xml_process_doc() what do we have here in doc: GetInterface
|<:MY_CLUSTERID><:MY_NODEID><:SIGNIFICANT><:0001>
04/25/2013 07:51:20.486 CDP Daemon|-->cdpd_get_ifname() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.486 CDP Daemon|<--cdpd_get_ifname() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.486 CDP Daemon|-->cdpd_get_ifname() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.486 CDP Daemon|<--cdpd_get_ifname() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.486 CDP Daemon|-->is_accessible_interface() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.486 CDP Daemon|<--is_accessible_interface() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.486 CDP Daemon|-->cdpd_get_ip_addr() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.486 CDP Daemon|<--cdpd_get_ip_addr() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|-->cdp_get_if_flags() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|<--cdp_get_if_flags() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|-->cdpd_get_ifname() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|<--cdpd_get_ifname() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|-->is_accessible_interface() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|<--is_accessible_interface() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|-->cdp_get_if_flags() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|<--cdp_get_if_flags() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|-->cdpd_get_ifname() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|<--cdpd_get_ifname() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
options: q=quit, n=next, p=prev, b=begin, e=end (lines 1901 - 1920 of 9338) :
04/25/2013 07:51:20.504 CDP Daemon|-->is_accessible_interface() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|<--is_accessible_interface() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|-->cdp_get_if_flags() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|<--cdp_get_if_flags() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04/25/2013 07:51:20.504 CDP Daemon| cdpd_xml_process_doc() Response sending to client is Number of Interfaces=3
Interface Name=eth0
Interface IP=10.159.x.x
Status=1
IsInterfaceDisable=0
Interface Name=eth1
Interface IP=n/a
Status=0
IsInterfaceDisable=0
Interface Name=sit0
Interface IP=n/a
Status=0
IsInterfaceDisable=0
, length 234
|<:MY_CLUSTERID><:MY_NODEID><:SIGNIFICANT><:0001>
04/25/2013 07:51:20.504 CDP Daemon|-->ayrxml_send_printbuf() |<:MY_CLUSTERID><:MY_NODEID><:ENTRY_EXIT><:0001>
04-25-2013 07:41 AM
Hi,
You can download this file sftp.
May be some of the lines have got skipped.
regds,
aman
04-25-2013 07:52 AM
04-25-2013 07:43 AM
I tested this in the lab and it looks like the CDP traces aren't detailed enough to print the actual port information. Your other option is to just take a network capture from CUCM and download it with RTPT then filter for CDP traffic.
utils network capture eth0 file cdp.cap size all count 100000
04-25-2013 07:55 AM
Thanks Brian.
This is what I wanted to confirm as one of our customer asked this question and at first I thought there will be some command which will provide us this information but to my surprise found none. I think Cisco should introduce this in next releases as it can be very helpful.
04-25-2013 08:05 AM
Hi Brian,
Thanks for reply.
I was just seeing the logs captured by Asharsidd and see only 6509 switch.
regds,
aman
04-25-2013 10:50 AM
Brian, You are absolutely spot on..I ran a capture from CUCM CLI (f0r about 1 minute) and filtered on "cdp" and bingo I see the switch and port this server is connected to...Really good to know..Thanks
600 13.508540 Cisco_73:5f:b1 CDP/VTP/DTP/PAgP/UDLD CDP 482 Device ID: BN1UK-OX-CSW01.X1.com Port ID: FastEthernet1/34
Please rate all useful posts
"opportunity is a haughty goddess who waste no time with those who are unprepared"
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide