1

I am using PuTTY and a VNC viewer to control my Raspberry Pi. Now, I have to change the static IP-address of the LAN Interface of my PC from:

192.168.0.1

to

ip: 192.168.1.20
netmask: 255.255.0.0

RPi IP:

ip: 192.168.10.100
netmask: 255.255.0.0

The problem is that PuTTY cannot connect to the Raspberry Pi anymore, if I do so.

Is it even possible to control the Raspberry Pi, if I change the client IP-address? And if so, what do I have to configure on the Raspberry Pi so that this works?

Here my properties of the LAN Interface on the PC (sorry, it's in german):

PC lan properties

Here my dhcpcd.conf on the RPi:

RPi: dhcpcd.conf

(I already tried to change static routers and static domain_name_servers to 192.168.1.20)

And my interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet dhcp

# WLAN-Interface Hostapd
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.1
netmask 255.255.255.0

  • I think your problem is on network, you cannot access 192.168.0.XXX IPs when you are on 192.168.**1**.XXX IP, could you display your Raspberry IP and netmask? – Francesco Gusmeroli Jul 28 '17 at 13:57
  • Ah ok, yes of course: – Jannis Kappertz Jul 28 '17 at 14:20
  • IP address eth0: 192.168.10.100 Mask: 255.255.0.0 – Jannis Kappertz Jul 28 '17 at 14:21
  • And the netmask on your PC? have you tried to ping the raspberry? – Francesco Gusmeroli Jul 28 '17 at 14:22
  • PC LAN-Connection 2: IP-address: 192.168.1.20, Mask: 255.255.0.0 – Jannis Kappertz Jul 28 '17 at 14:28
1

Ok, I managed to solve the problem.

The thing was, that my WLAN network already allocated the IP-addresses 192.168.1.X, so the RPi could not connect to the IP-address 192.168.1.20.

Now, I use 192.168.2.X for my WLAN network.

0

First of all:

why you have setup domain_name_servers=192.168.0.1? maybe is better to use google DNS 8.8.8.8

try to change netmask on interfaces and set it on 255.255.0.0

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.