0

I have a Pi that was set to some static IP that I don't remember (I can't nmap it out because the static IP works in a different part of the network than the one I am in right now).

I'm trying to access it headless from my laptop by directly connecting the LAN cord, but I'm not sure what IP settings I ought to give my laptop so that it can connect to the Pi.

What LAN settings should I give my laptop so that I can ssh in and change the static IP of the Pi?

1

Unfortunately, the answer is - you should give your laptop an IP address from the same network that your RaspberryPi is configured to use. For example, if you know that your RaspberryPi uses something like 192.168.1.XX, you should set your laptop's IP to for example 192.168.1.254. Then you can use nmap to search the specific IP address that your RaspberryPi is using.

If you don't even remember the address of the network, there is no way you can connect to your RaspberryPi.

1

In this case it appears that you have physical access to your Pi. Why not plugin a monitor and keyboard, log in and run "ifconfig" from the terminal. This should show you the IP address.

If the above is not possible you may be able to connect directly to the Ethernet port and run Wireshark to capture traffic, while capturing traffic the Pi may broadcast a service and show the IP address.

  • Capturing traffic may indeed be an option, providing it will make some traffic after booting. One another option is to connect SD card to a SD card reader and read /etc/network/interfaces file from it. But that requires an operating system that is able to read Linux filesystems. – Krzysztof Adamski Dec 27 '13 at 13:06
0

If you can connect directly to RPi, you can try tcpdump or any network sniffer:

"tcpdump -n -i eth0" (assuming eth0 is the name of your ethernet device on your laptop)

Assuming the RPi is running correctly, sooner or later it will try to reach another host in the network (dns p.e.), and you can check origin IP address. You can try to reboot the RPi also, while using tcpdump.

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.