I’m able to talk from MY pc (10.4.210.24) to target 192.168.2.1
with telnet, so I assume that FTP will be OK as well.
Good you mention this.
When you use telnet, your embedded device is the TCP server, it accepts a connection.
Also when you connect to the embedded FTP-server and execute
, things works well.
When the embedded device is the TCP server, it doesn’t bother looking up the return MAC address. It just swaps the two MAC addresses when replying. The driver also stores the return MAC address for later use.
For the FTP commands “LIST” and “STOR”, and “RETR”, a new connection is needed. These commands need a separate data-only connection. It can be established either passively or actively.
PASV // The server will receive a connection using accept()
227 Entering Passive Mode (192,168,2,1,45,67)
PORT 10,4,20,24,249,127 // The server will connect() to the client
For you PASV would have worked OK. But you used an active connection ‘
The routing thing: as I wrote, when your device
connects to a strange IP address such as
, it will not bother looking up the IP-address with ARP. In stead it will send all packets to the configured gateway address.
What should you use as a gateway address?
That can not be said in general. Maybe your router will do the routing. If not (when using a switch), you can use the IP-address of the adapter that is connected to that switch.
For your device, it looks like a DELL device with MAC address
, being the return address of the FTP client.