Introduction:
In a LAB or network environment, being able to determine which IP are used and what devices are connected to help IT, LAB Managers with new IP assignment.
the Nodegrid Manager have the ability to scan the network for IP addresses being used by devices to determine the state with ping automatically. Once the IP address is added into the "Managed Device", using a script to retrieves the MAC address of the end device to determine the device manufacturer.
Procedure:
In order to Network scan using the Nodegrid Manager, created a device so that the Nodegrid Manager can use it to emulate the new device for other to be cloned from. For this documentation, lets use the Device and name it as "ip_default"
Copy the Script attached get_MAC.sh to the Nodegrid /etc/scripts/access folder and change it to be an executable.
In the "Managed Devices::Devices::Access" click on add, in the Field set as below
Name: ip_default
Type: device_console
IP Address:: <a gateway address>
Checked " Credential Set Now" radio button
Username and Password should be set as blank.
Mode: On-Demand
Checked "Enable device state detection based on network traffic (icmp)
Optional "Enable Hostname Detection"
The Custom Field for the MAC address of the ip_default device must be added to be used for all new scanned devices.
The Field Name: MAC must matched with the "Managed Devices::Preferences::Views" Custom Columns field defined below.
in the WebUI "Managed Devices::Devices::Custom Fields" Then Click Add
set the Field Value to "Not Found" for the initial state
Add the script to the ip_default device so that it will run when the device is pingable from the Nodegrid.
in the WebUI, "Managed Devices::Devices::Management" in the "Run on Device UP:" add the new copied get_MAC,.sh script
Set the custom field for the keeping the MAC address field for each of the device. In the "Managed Devices::Preferences::Views" and add MAC in the custom Columns
Setup Auto Discovery process to scan the network. In "Managed Devices::Auto Discovery::Network Scan" of the WebUI then click "Add" to setup the network scanning
Set a Scan ID: to a recognizable name
IP Range Start: start of the IP address for scanning
IP Range End: the ending IP address of the scan
Checked the Enable Scanning,
Chedked the Similar Devices and choose ip_default devices created in the Device list
Checked teh port Scanning and use 22-23,623
and set ping interval to 1 minute so the script can executes quickly
Setup the Discovery rule for the scanning, in the WebUI "Managed Devices::Auto Discovery::Discovery Rules"
Create a Rule name and set the status to enabled
Choose the Discovery Method to "Network Scan" and add the Scan ID to the Network Scan ID created in the previous step.
in the Action: "Clone (Mode: On-Demand)" and "CLone from" the IP_default previously created
The Network scanning is now ready to be scan and add as a Managed device. To start scanning with the defined Network Scan.
Go to "Managed Devices::Auto Discovery::Discovery Now" and checked the Network Scan ID then press "Discover Now" button
IP Devices will start showing up in the Access page.