aptitude install cdpr
$ sudo cdpr -help cdpr - Cisco Discovery Protocol Reporter Version 2.2.1 Copyright (c) 2002-2006 - MonkeyMental.com d: Specify device to use (eth0, hme0, etc.) h: Print this usage waiting for a packet (should be> 60) v [vv]: Set verbose mode ** Options dealing with server updates: ** u: Send cdpr information to a cdpr server requires config file as arg l: Location / description of this port for use with -u or -s and -p override with -u or -s and -p Server: Server / IP Example: 192.168.1.20:88 (default: 80) requires -p (overridden by -u) p: Path to server to send data to requires -s (overridden by -u)
$ sudo cdpr cdpr - Cisco Discovery Protocol Reporter Version 2.2.1 Copyright (c) 2002-2006 - MonkeyMental.com 1. eth0 (No description available) [... skip ...] 22. any (Pseudo-device that captures on all interfaces) 23. lo (No description available) 24. lo: ring (No description available) Enter the interface number (1-24): 13
Using Device: vlan1315 Waiting for CDP advertisement: (default config is to transmit CDP packets every 60 seconds) Device ID value: cisco.netcom.ks.ua Addresses value: 213.44.40.27 Port id value: FastEthernet0 / 1.1315
$ sudo cdpr -d vlan1315 -vvv cdpr - Cisco Discovery Protocol Reporter Version 2.2.1 Copyright (c) 2002-2006 - MonkeyMental.com Using Device: vlan1315 Waiting for CDP advertisement: (default config is to transmit CDP packets every 60 seconds) Received a CDP packet, header length: 372 cdp packet: version: 02 time to live: b4 checksum: cfcb cdp type / len / val: type: 0001 - Device ID length: 0016 Device ID value: cisco.netcom.ks.ua cdp type / len / val: type: 0005 - Software version length: 00fc Software version value: Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4 (12), RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2006 by Cisco Systems, Inc. Compiled Fri 17-Nov-06 12:02 by prod_rel_team cdp type / len / val: type: 0006 - Platform length: 000e Platform value: Cisco 2811 [... skip ...] cdp type / len / val: type: 000b - Duplex length: 0005 Duplex value: 01 Data Link Type: Ethernet (10MB, 100MB, 1000MB and up).
$ sudo dpkg -i lldpd_0.4.1-1_i386.deb
Interface: tun-cisco ChassisID: ciscotest (local) SysName: ciscotest SysDescr: cisco 7206VXR running on Cisco Internetwork Operating System Software IOS (tm) 7200 Software (C7200-PM), Version 12.2 (46), RELEASE SOFTWARE (fc1) Copyright (c) 1986-2007 by cisco Systems, Inc. Compiled Thu 26-Apr-07 21:56 by pwade MgmtIP: 172.19.18.2 Caps: Station (E) PortID: ca: 00: 50: 7b: 00: 00 (MAC) PortDescr: FastEthernet0 / 0 Autoneg: not supported / not enabled MAU oper type: unknown (0)
ciscotest # show cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID zoro Fas 0/0 104 Linux tun-cisco
Source: https://habr.com/ru/post/83356/
All Articles