I have a Rasberry Pi connected to my Windows 7 LAN port, which gets internet via "Wifi sharing" (ICS) enabled in my laptop. The only problem is every time RPI boots up, a new IP is assigned dynamically by the server. So, when ever SSH/VNC access is required for Rasberry Pi, I check the IP assigned to Rasberry Pi from the display and use it (usually in 192.168.137.x address range). Many times, felt the need to get this assigned IP info even with out display.

I tried to figure out cmdline method to configure and get the client IP details from my Windows 7 labtop using netsh or ifconfig /all cmd. But both methods were not convenient.

Hence would like to assign static address for my rasberry pi? when tried this solution its not working as expected(see this link). Not sure whether this method work out, as not sure windows build in server will honor this static request.

  • You could set static IP (try a current tutorial - not some obsolete 6 year old link) BUT you should do this on Windows. – Milliways Jan 20 '19 at 21:35
  • Please don't expect that we follow other tutorials and links to understand your question. You should explain what you have done. – Ingo Nov 4 '19 at 16:30

if you are using vnc for raspberrypi communication,Go at top of of window, you will see connected "wifi" signal. right click on it you will get "wired and wireless network options" set network details. Set the Static IP address as per domain of your Windows PC. See image for your reference.

|improve this answer|||||
  • I tried @Dipti, but the settings are not taking effect. After reboot, still dynamic IP address is assigned. – Murukz-userm Jan 21 '19 at 17:40

There is another way using network interface file as well as dhcpcd.conf file follow https://code.diyhobi.com/how-to-make-static-ip-on-raspberry-pi/

this link for your reference.

|improve this answer|||||

Edit the /etc/network/interfaces in your PI and add lines like this,

auto eth0
iface eth0 inet static
address 192.168.137.x
gateway 192.168.137.x
dns-server (optional)

The gateway supposed to be your laptop's LAN ip in this case, if your setup changes then change the gateway accordingly and now you can restart your PI's networking by sudo systemctl restart networking.

|improve this answer|||||

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.