1

I have a weird problem here.

I use ftp to exchange files between my smartphone (Xperia Z5 compact) and my pc. A while back the pc had a static ip address but now it's assigned one via dhcp. When I try to connect to the pc from the phone by way of the pc's hostname it still uses the old static ip the pc once had.

Any ideas as to what I can do about this?

  • Are you root? Which FTP server app/program you use? Your PC's old IP must be saved in FTP server's cache. Try resetting server app by clearing data. Or check your /etc/hosts file if an entry is added there. – Irfan Latif Aug 23 '18 at 6:01
  • No, I don't have root access. I use Total Commander's FTP plugin. The problem doesn't only occur with the FTP client. When I use the terminal emulator and ping my pc its hostname only gets "resolved" to its old ip address. /etc/hosts just contains the standard localhost entries. – Miriam Aug 23 '18 at 9:33
  • Clear arp entries – Irfan Latif Aug 23 '18 at 9:39
  • How do I do that on Android? – Miriam Aug 23 '18 at 11:24
  • That command is not found on my phone. – Miriam Aug 23 '18 at 17:40
1

You can clear arp cache using this command in terminal:

ip -s -s neigh flush all 

(or simply ip neigh flush 192.168.xx.0/yy if you know the network range)

While not necessary, you may need to reboot the device, ping the hostname again and see if its resolved to new IP.

Looking from the other side, you can try resetting winsock entries and TCP/IP stack for the PC and see if it solves the issue.

  • Thanks, the command works, but the problem still remains. I think this may be a router problem. – Miriam Aug 27 '18 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.