Netgear Switch Discovery Protocol
{{Short description|Manufacturer specific management protocol}}
{{No footnotes|date=September 2012}}
{{Infobox networking protocol
|name = NTDS (Netgear Switch Discovery Protocol)
|level = Прикладной
|family = TCP/IP
|ports = 63321, 63322, 63323, 63324
|purpose = Netgear level 2 switch management
}}
{{IPstack}}
Netgear Switch Discovery Protocol (NSDP) is a management protocol for several network device families, designed by Netgear.
Message structure
= Common message header =
class="wikitable" center" |
style="text-align:center;"
! style="width:10%;"| Offset ! style="width:10%;"| Length ! colspan="8" style="width:80%;"| Meaning |
style="text-align:center;"
| style="width:10%;"| 0x0000 | style="width:10%;"| 1 | colspan="8" style="width:80%; text-align:justify;"| Proto version – always 0x01 |
style="text-align:center;"
| style="width:10%;"| 0x0001 | style="width:10%;"| 1 | colspan="8" style="width:80%; text-align:justify;"| Operation code: may be 0x01 – read request, 0x02 – read response, 0x03 – write request, 0x04 – write response |
style="text-align:center;"
| style="width:10%;"| 0x0002 | style="width:10%;"| 2 | colspan="8" style="width:80%; text-align:justify;"| Operation result |
style="text-align:center;"
| style="width:10%;"| 0x0004 | style="width:10%;"| 4 | colspan="8" style="width:80%; text-align:justify;"| Unknown |
style="text-align:center;"
| style="width:10%;"| 0x0008 | style="width:10%;"| 6 | colspan="8" style="width:80%; text-align:justify;"| host MAC-address |
style="text-align:center;"
| style="width:10%;"| 0x000e | style="width:10%;"| 6 | colspan="8" style="width:80%; text-align:justify;"| network device MAC-address (value 00:00:00:00:00:00 is used as multicast address, request will be proceeded by all devices, which would receive it) |
style="text-align:center;"
| style="width:10%;"| 0x0014 | style="width:10%;"| 2 | colspan="8" style="width:80%; text-align:justify;"| Unknown |
style="text-align:center;"
| style="width:10%;"| 0x0016 | style="width:10%;"| 2 | colspan="8" style="width:80%; text-align:justify;"| Sequence number (value increments with every next request) |
style="text-align:center;"
| style="width:10%;"| 0x0018 | style="width:10%;"| 4 | colspan="8" style="width:80%; text-align:justify;"| Protocol signature NSDP |
style="text-align:center;"
| style="width:10%;"| 0x001С | style="width:10%;"| 4 | colspan="8" style="width:80%; text-align:justify;"| Unknown |
style="text-align:center;"
| style="width:10%;"| 0x0020 | style="width:10%;"| N | colspan="8" style="width:80%; text-align:justify;"| Message body – the sequence of TLV records |
style="text-align:center;"
| style="width:10%;"| 0x0020 + N | style="width:10%;"| 4 | colspan="8" style="width:80%; text-align:justify;"| End of message marker 0xFFFF0000 |
= Message body record structure =
Message body records are type–length–value (TLV) structures. Type field may be one of following values in the table(list in incomplete):
class="wikitable" center" |
style="text-align:center;"
! style="width:10%;"| Type ! style="width:90%;"| Meaning |
style="text-align:center;"
| style="width:10%;"| 0x0001 | style="width:90%; text-align:justify;"| Device model |
style="text-align:center;"
| style="width:10%;"| 0x0003 | style="width:90%; text-align:justify;"| Device given name |
style="text-align:center;"
| style="width:10%;"| 0x0004 | style="width:90%; text-align:justify;"| Device MAC-address |
style="text-align:center;"
| style="width:10%;"| 0x0005 | style="width:90%; text-align:justify;"| Device system location |
style="text-align:center;"
| style="width:10%;"| 0x0006 | style="width:90%; text-align:justify;"| Device current IP-address (may be unsupported by certain devices) |
style="text-align:center;"
| style="width:10%;"| 0x0007 | style="width:90%; text-align:justify;"| Device IP-network mask (may be unsupported by certain devices) |
style="text-align:center;"
| style="width:10%;"| 0x0008 | style="width:90%; text-align:justify;"| Router IP-address (may be unsupported by certain devices) |
style="text-align:center;"
| style="width:10%;"| 0x000a | style="width:90%; text-align:justify;"| administration password |
style="text-align:center;"
| style="width:10%;"| 0x000b | style="width:90%; text-align:justify;"| DHCP Mode (Refresh DHCP = 2, DHCP = 1, Static = 0) |
style="text-align:center;"
| style="width:10%;"| 0x000d | style="width:90%; text-align:justify;"| Device Firmware version slot 1 (may be unsupported by certain devices) |
style="text-align:center;"
| style="width:10%;"| 0x000e | style="width:90%; text-align:justify;"| Device Firmware version slot 2 (may be unsupported by certain devices) |
style="text-align:center;"
| style="width:10%;"| 0x000f | style="width:90%; text-align:justify;"| Next active firmware slot after reboot (01 = 1, 02 = 2, may be unsupported by certain devices) |
style="text-align:center;"
| style="width:10%;"| 0x0c00 | style="width:90%; text-align:justify;"| Speed/link status of ports |
style="text-align:center;"
| style="width:10%;"| 0x1000 | style="width:90%; text-align:justify;"| Port Traffic Statistic |
style="text-align:center;"
| style="width:10%;"| 0x2800 | style="width:90%; text-align:justify;"| Get VLAN info |
style="text-align:center;"
| style="width:10%;"| 0x2c00 | style="width:90%; text-align:justify;"| Delete VLAN (write only) |
Protocol flow examples
Network devices discovery (MAC-address an device model discovery):
Host with MAC=XX:XX:XX:XX:XX:XX from UDP-port 63321 or 63323 sending packet to broadcast IP-address 255.255.255.255 and UDP-port 63322 or 63324
Header @0x00000000 0x01 0x01 0x000000000000 0xXXXXXXXXXXXX 0x000000000000 0x0000 0x0001 0x4E534450 0x00000000
Body @0x00000020 0x0001 0x0000 0x0004 0x0000
Marker @0x00000028 0xFFFF0000
EACH Device responds with message like
Header @0x00000000 0x01 0x02 0x000000000000 0xXXXXXXXXXXXX 0xYYYYYYYYYYYY 0x0000 0x0001 0x4E534450 0x00000000
Body @0x00000020 0x0001 0x0028 0x47 0x53 0x31 0x30 0x35 0x45 0x20*0x22 0x0004 0x0006 0xYYYYYYYYYYYY
Marker @0x00000058 0xFFFF0000
Device support for protocol
- GS105E ProSAFE Plus
- GS108E ProSAFE Plus
- GS724T
- GS748T
- FS116E (IP-network description and Firmware version TLVs are not supported)
- FS726TP (uses 63323 and 63324 UDP-ports for interconnection)
Devices firmware update
Device firmware update is made with TFTP protocol, but you need to send NSDP request to turn on TFTP-server first.
See also
References
{{Reflist}}
External links
- [http://www.netgear.com/ NETGEAR official site]
- [http://www.vishnivetsky.ru/%D0%B7%D0%B0%D0%BC%D0%B5%D1%82%D0%BA%D0%B8%20%D1%81%D1%82%D0%B0%D1%82%D1%8C%D0%B8%20%D0%BE%D0%B1%D0%B7%D0%BE%D1%80%D1%8B/NETGEAR%20Prosafe%20Plus%20configuration%20linux.html openSource Perl-written cross-platform toolkit for NSDP managed devices project site (in russian)] {{Webarchive|url=https://web.archive.org/web/20161220060040/http://www.vishnivetsky.ru/%D0%B7%D0%B0%D0%BC%D0%B5%D1%82%D0%BA%D0%B8%20%D1%81%D1%82%D0%B0%D1%82%D1%8C%D0%B8%20%D0%BE%D0%B1%D0%B7%D0%BE%D1%80%D1%8B/NETGEAR%20Prosafe%20Plus%20configuration%20linux.html |date=2016-12-20 }}
- [http://sourceforge.net/projects/linnetx/ LinNetx openSource C-written utility for ProsafePlus switches management via NSDP, not operational]
- [http://www.netgeek.ovh/wiki/projets:ngadmin ngadmin] C-written admin utility; GPLv2 license
- [https://github.com/tabacha/ProSafeLinux ProSafeLinux] Remark: sparse information; FreeBSD license
- [https://github.com/kvishnivetsky/wireshark-dissector-nsdp NSDP Protocol Wireshark dissector] Remark: GPL license
- [http://www.curesec.com/en/publications/tools.html Nsdtool] – a toolset of scripts to detect NETGEAR switches in local networks
- [https://routerfirmwareupdates.com/netgear-firmware-update/ NETGEAR firmware update]