Network Programming
Unlike serial programming that requires the serial port of the DS to be in the serial programming mode, in which the serial port cannot exchange data with the network host, network programming can continue concurrently with the data routing between the network host and attached serial device. Therefore, network programming is not a "mode" of the Ethernet port.
There are three methods of network programming:
Out-of-band UDP programming *** is effected by sending programming commands as UDP datagrams to one of the two UDP command ports - either 65535 or 32767. This programming method is called out-of-band programming since commands are sent outside of (separately from) the data connection. Programming through UDP command ports does not depend on any prior setup, always available and cannot be disabled.
Inband TCP programming is effected by sending programming commands within the TCP data connection itself, commands and replies are mixed right into the routing data stream (hence, the term "inband"). Inband programming is only possible when the current Transport Protocol (TP) [setting /parameter ] is 1 (TCP) and Inband (IB) setting is 1 (enabled). Therefore, certain prior setup is needed for this programming method to work.
Command-phase TCP programming is also effected by sending programming commands within the data TCP connection. The difference with the inband programming is that the routing data and commands are not intermixed. Instead, the TCP connection itself is divided into two phases: command-phase in which programming can be performed (hence, the name of this programming method) and the data phase in which the data is routed. Command-phase TCP programming is only possible when the current Transport Protocol (TP) [setting /parameter ] is 1 (TCP) and the Data Login (DL) setting is 1 (enabled). Therefore, certain prior setup is needed for this programming method to work.
"Telnet" TCP programming ( supported by firmware V3.50 and above ) is effected by establishing a TCP connection to the "telnet" port (port 23) of the DS. Such connection can be established regardless of whether current Transport Protocol (TP) [setting /parameter ] is 0(UDP) or 1(TCP). Several TCP connections to port 23 can be established at the same time but only one of them will be at "logged in" state at any given time. With this new functionality, port 23 cannot be used as the data port of the DS.
* Existence of two identical command ports is historical. Originally, only one UDP port 65535 was allocated for programming. Later it was discovered that some routers can only forward traffic to port numbers 0-32767. Consequently, another command port at 32767 was introduced.