TransWikia.com

Configure RPI to set static IP address via ethernet from Windows laptop using wifi sharing (ICS)

Raspberry Pi Asked by Murukz-userm on December 28, 2020

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.

2 Answers

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

auto eth0
iface eth0 inet static
address 192.168.137.x
netmask 255.255.255.0
gateway 192.168.137.x
dns-server 8.8.8.8 (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.

Answered by Pavel Sayekat on December 28, 2020

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.

Answered by Dipti on December 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP