https://github.com/ytti/netcrawl
LLDP/CDP crawler
https://github.com/ytti/netcrawl
Last synced: over 1 year ago
JSON representation
LLDP/CDP crawler
- Host: GitHub
- URL: https://github.com/ytti/netcrawl
- Owner: ytti
- Created: 2014-03-30T18:47:53.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2018-07-20T08:06:42.000Z (almost 8 years ago)
- Last Synced: 2025-03-12T16:05:33.581Z (over 1 year ago)
- Language: Ruby
- Size: 21.5 KB
- Stars: 61
- Watchers: 11
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Netcrawl
Given snmp community and single device, crawls the network via discovering
LLDP/CDP neighbours, while producing list or dot file (for graphviz digraphs)
## Install
% gem install netcrawl
## Use
% netcrawl --graphiz router.example.com
## Command line
```
Usage: netcrawl [options] hostname
-g, --graphviz dot output use 'dot -Tpng -o map.png map.dot'
-l, --list list nodes
-j, --json json output
-y, --yaml yaml output
-a, --hash hash/associative array output
-r, --resolve resolve addresses to names
-p, --purge remove peers not in configured CIDR
-c, --community SNMP community to use
-d, --debug turn debugging on
-h, --help Display this help message.
```
* graphiz - graphis (dot) output
* list - list nodes found
* json - json output
* yaml - yaml output
* hash - ruby hash output
* resolve - resolve IP addresses
* purge - remove non-cidr matching peers from output
* community - sets snmp community
* debug - turn on debugging
## Config
```
---
use:
- LLDP
- CDP
poll:
- 192.0.2.0/24
snmp:
community: public
timeout: 1
retries: 2
bulkrows: 35
dot:
bothlinks: true
color:
- - cpe
- gold
- - -sw
- blue
- - -pe
- red
- - ' -p'
- yellow
dns:
afi:
log: STDERR
debug: false
namemap:
- - -re\d+
- ''
- - (.*(?