2.3. cdpr - Cisco Discovery Protocol Reporter

简介:
$ sudo apt-get install cdpr
		
$ sudo cdpr
[sudo] password for neo:
cdpr - Cisco Discovery Protocol Reporter
Version 2.4
Copyright (c) 2002-2010 - MonkeyMental.com

1. eth0 (No description available)
2. tun0 (No description available)
3. usbmon1 (USB bus number 1)
4. usbmon2 (USB bus number 2)
5. usbmon3 (USB bus number 3)
6. usbmon4 (USB bus number 4)
7. usbmon5 (USB bus number 5)
8. lo (No description available)
Enter the interface number (1-8):1
Using Device: eth0
Waiting for CDP advertisement:
(default config is to transmit CDP packets every 60 seconds)
Device ID
  value:  4A3750G
Addresses
  value:  193.168.0.254
Port ID
  value:  GigabitEthernet1/0/15

		

通过cdprs.php收集CDP数据,很容易改写,实现写入数据库

/usr/share/doc/cdpr/examples/

$ find /usr/share/doc/cdpr/examples/
/usr/share/doc/cdpr/examples/
/usr/share/doc/cdpr/examples/cdprs
/usr/share/doc/cdpr/examples/cdprs/cdprs.cgi.gz
/usr/share/doc/cdpr/examples/cdprs/cdprs.php
/usr/share/doc/cdpr/examples/cdpr.conf
		

这个功能可以实现后自动绘制网络拓扑,分析收集的数据,然后通过Graphviz绘制网络拓扑图。




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
5月前
|
SQL JavaScript 关系型数据库
Client does not support authentication protocol requested by server
Client does not support authentication protocol requested by server
43 0
|
JavaScript
How to monitor your mobile application network traffic in your own LAPTOP
How to monitor your mobile application network traffic in your own LAPTOP
100 0
How to monitor your mobile application network traffic in your own LAPTOP
gateway 报错 allowedOrigins cannot contain the special value "*"
gateway 报错 allowedOrigins cannot contain the special value "*"
486 0