my RPi using Raspian, connected to a switch using DHCP, and I remote it by SSH. the first time I found RPI's IP by switch IP table and accessed successfully , but after reboot, I can't connect to my RPi anymore, and it's IP not in switch ip table as well. After many try, unplugg to connect and nmap to find ip, I figured out that : RPi have IP address when power on RPi without connect to switch for 10 -20s and then connect it to switch, I nmap to find it's IP. This problem is so annoying :oops: , I can't access it after reboot.

  • 1
    have you considered trying different switch or connect directly to the router?
    – lenik
    Commented Mar 6, 2014 at 4:33
  • can you clarify why you think the switch is relevant at all in this context, and can you let us know what DHCP server you are using? many offer "reserved" IP addresses that can guarantee to always provide the same IP address to a specific device, even after reboots. Commented Aug 20, 2014 at 13:58
  • Did any of those answers help to solve your problem?
    – Ghanima
    Commented Sep 8, 2014 at 15:12

4 Answers 4


In terms of networking the first thing i would check in the following order:

  1. Check the physical connection.
  2. Check if the router is registering the raspberry pi connection. (If it isn't restart your router)
  3. Check if the raspberry pi can directly connect to the switch or router (as close to the desired destination)
  4. If you are still experiencing problems, just do a general connectivity test without any advance settings, and if it works apply the relevant network connection changes while monitoring the connection on the router/switch.

(Doing a trace route can also solve a lot of problems troubleshooting wise)


You can use a dynamic domain name server like DynDNS if there's internet access to keep track of the IP address. Alternatively, your router may do this automatically. On my network a simple "ssh raspberrypi" almost always works because when the DHCP lease is requested, the Pi sends it's domain name along, which the router then puts in its local DNS service.


Are you sure that your switch has DHCP? Not all switches have DHCP.

Posibles solutions:

  1. You can create a script to ping all posible IPs.

  2. Also yo can conect a monitor and a keyword to RPi and see the output of ifconfig command in RPi.

  3. Other posible solution is connect direct to RPi and asign a fixed IP, then when you connect to switch the RPi have the fixed IP.


Please check /etc/hosts and /etc/hostname for the name of your system or set it to your wishes. Preset values may differ with the flavour of your OS (e.g. "raspberrypi"). Within your own subnet, that is behind your switch/router (assuming reasonable hardware and software on all parts within that network), you should be able to connect to your RPi using that hostname.

Further reading:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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