CDP entry wildcard match

Message of the Day: Every day is a lesson!

I just found that show cdp entry command supports wildcard search. I am a frequent user of this command, and it usually happens when I first execute show cdp neighbors to find a neighbor of interest, followed by a show cdp entry <name> to find its management IP address. I usually copy/paste the full name of the neighbor, until just now. A short example will tell you the rest…

SWITCH#sh cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
 S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
 D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID Local Intrfce Holdtme Capability Platform Port ID
SWITCH1 Gig 1/0/27 157 S I WS-C3750- Gig 2/0/1
SWITCH1 Gig 2/0/27 172 S I WS-C3750- Gig 1/0/1
SWITCH#show cdp entry SWI*
-------------------------
Device ID: SWITCH1
Entry address(es):
 IP address: 10.185.1.131
Platform: cisco WS-C3750-48P, Capabilities: Switch IGMP
Interface: GigabitEthernet1/0/27, Port ID (outgoing port): GigabitEthernet2/0/1
Holdtime : 155 sec

Version :
Cisco IOS Software, C3750 Software (C3750-IPSERVICES-M), Version 12.2(50)SE2, RELEASE SOFTWARE...
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Fri 15-May-09 19:41 by nachen

advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF01...
VTP Management Domain: 'null'
Native VLAN: 10
Duplex: full
Management address(es):
 IP address: 10.185.1.131

Well, if you know that… ignore me, if not – welcome to the club of those who like to find about tiny and nice IOS features 🙂

Leave a Reply

%d bloggers like this: