Detect unknown NAS from commandline

This forum is for devlopers to discuss questions about apps/plug-ins/extension modules/API specifically developed for using with Synology DiskStations.
gpglang
Novice
Novice
Posts: 55
Joined: Thu May 31, 2007 3:21 pm
Location: Zeewolde
Contact:

Detect unknown NAS from commandline

Postby gpglang » Wed Feb 15, 2017 9:19 pm

For business purpose I need commandline command that does the same as the assistant: finding the NAS without knowing its IP or name. NAS systems in our clients networks have diff names and ip-address. But one share is the same on all. Need it to make a transparent deployment environment.
Thx
-----------------------------------
411+; 4xHD103SJ (SHR)
412+; 2x4Tb (R1), SSD (DSM logs and cache), 1TB (AV), 8Tb USB Archive
216+II / 716+II -- 2xyTb in SHR (several and all in management with CMS)
RT1900ac
drabisan
Specialist
Specialist
Posts: 1196
Joined: Sat Jul 17, 2010 12:04 pm

Re: Detect unknown NAS from commandline

Postby drabisan » Thu Feb 16, 2017 4:59 pm

fping -c 1 -g 192.168.1.0/24 && arp -n | grep "00:11:32"
Assuming Linux.
You can put your own subnet.
AFAIK 00:11:32 is the mac subnet assigned to Synology. But this needs to be confirmed, as there may be something different for 10G interfaces or very new models.
gpglang
Novice
Novice
Posts: 55
Joined: Thu May 31, 2007 3:21 pm
Location: Zeewolde
Contact:

Re: Detect unknown NAS from commandline

Postby gpglang » Fri Feb 17, 2017 11:56 am

I have to turn this into powershell.. but you idea is as simple as genius... Thx!
[edit]
Powershell line:
$IpAddress = arp -a | select-string "00-11-32" |% { $_.ToString().Trim().Split(" ")[0] }
-----------------------------------
411+; 4xHD103SJ (SHR)
412+; 2x4Tb (R1), SSD (DSM logs and cache), 1TB (AV), 8Tb USB Archive
216+II / 716+II -- 2xyTb in SHR (several and all in management with CMS)
RT1900ac

Return to “Developer Discussion Room”

Who is online

Users browsing this forum: No registered users and 1 guest