Thursday, September 4, 2008

Pipe-ology CDP

Ever need to get the Device name or IP address from other devicesconnected to the router/switch you are currently in? A "show cdpneighbors detail" will do the trick. But what if you have multipledevices connected to your router or switch? Sifting through the outputcould be painful. That's where the pipe (|) comes in. Our format isshow cdp neighbors detail | include [string1]|[string2]. Issue the"sh cdp neighbors detail | include Device|IP" and we'll get the desiredoutput without the sifting. (sh cdp ne det | in Dev|IP - for short)