githubEdit

Netdisco

Overview

Nodes and Devices

  • Devices are network devices such as routers, switches and firewalls

  • Nodes are end-stations connected to devices such as pcs, servers, printers and ip phones

Jobs

  • There are 4 principal job types:

    • discover: Gather information about a Device, including interfaces, vlans, PoE status, and chassis components (modules). Also learns about potential new Devices via neighbor protocols and adds jobs for their discovery to the queue. Read thisarrow-up-right for further information

      • Ping sweep: works with subnet, ping first, those responded will be added to job queue

    • macsuck: Gather MAC to port mappings from known devices reporting layer 2 reachability

    • arpnip: Gather Mac to IP mappings from known devices reporting layer 3 reachability

    • nbtstat: poll a node to obtain its NetBIOS name

Configuration

  • There are two configuration files: config.yml (which lives inside the Netdisco package) and deployment.yml (which usually lives in ${HOME}/environments) such as: /opt/netdisco/environments/deployment.yml

Some settings

  • device_auth: authentication for all polling

  • device_identity: control cananoical name or identity of devices in Netdisco

  • host_group_displaynames: assign host groups friendly names

Command

  • perldoc ${HOME}/bin/netdisco-do: view document about netdisco-do command

  • Backend Status: ${HOME}/bin/netdisco-backend status

  • Daemon Status: ${HOME}/bin/netdisco-daemon status

  • Start/Restart Webapp Server: ${HOME}/bin/netdisco-web start|restart

  • Start/Restart Job Control Daemon: ${HOME}/bin/netdisco-backend start|restart: this start those job like device polling, port control, etc

  • First manual discovery: ${HOME}/bin/netdisco-do discover -d $NameorIPofseedDevice

  • Add ping sweep task to the queue: netdisco-do pingsweep -d 192.0.2.0/24 --enqueue

  • Do task with debugging: netdisco-do discover -d $ipaddress -DIQ: D for debugging, I for SNMP::Info and Q for SQL tracing

  • SNMP Community string is hidden by default, so to show it: SHOW_COMMUNITY=1 ~/bin/netdisco-do discover -d $ipaddress -DIQ

Netdisco-do

  • Dump an SNMP object for a device:

  • Interactive SQL terminal on Netdisco DB

  • See how Netdisco has parsed the configuration file

Troubleshooting

Cisco Device - Device name doesn't match hostname

  • When searching for device using device hostname, device is listed with a different name rather than its hostname.

  • Cause: This is because it has a DNS A or PTR record with that name. Solution is changing it

  • Cause: It doesn't have dns name, but information is old. Delete it using netdisco-do delete -d $name and rediscover using netdisco-do discover -d $name

Reference

Last updated