0

Using PI 3:

> pi@raspberrypi:~ $ lsb_release -a
>     No LSB modules are available.
>     Distributor ID: Raspbian
>     Description:    Raspbian GNU/Linux 8.0 (jessie)
>     Release:        8.0
>     Codename:       jessie

I initially checked the pi 3 ip address by scanning via the router. The address was 192.168.1.248.

I ssh'ed into the pi and installed vnc. I could now vnc into the pi which was exactly what I wanted to do via a direct connection to the ethernet cable on the laptop.

Next I altered the raspbery pi 3 ip address as follows:

sudo nano /etc/network/interfaces

then:

iface eth0 inet static
     address 169.254.0.2
     netmask 255.255.255.0
     broadcast 169.254.0.255

However, on reboot, I could not ssh into the device via the ethernet cable and when I reconnected to the router it reappeared a 192.168.1.248.

Other people appeared to be having the same problem. smith666 stated:

I fixed the problem just by adding the following command into /etc/dhcpcd.conf nodhcp

I added nodhcp and brilliant, the pi didn't appear on the router, (static ip). I then tried to ssh into the new ip address 169.254.0.2 via the ethernet on my pc but it doesn't work.

Any ideas what I have done wrong? Do I need to change the ethernet properties on my laptop?

SeanJ
  • 105
  • 1
  • 7
  • 1
    Why would you change raspberry pi IP to public IP instead of private IP? You state that your raspberry pi IP is 192.168.1.248, so I'm guessing that your router gateway is 192.168.1.1. So it obvious that you can't connect to pi because your laptop/router isn't in same IP block with raspberry pi. – xdhe Jun 11 '16 at 23:23
  • @xdhe apologies, I changed the pi address to 169.254.0.2 not the laptops address. I have edited to make this clearer. – SeanJ Jun 11 '16 at 23:25

1 Answers1

1

Attempting to set a static address this way doesn't work reliably. See How do I set up networking/WiFi/Static IP

169.254.0.2 is a Link-local_address and is not routable.

Milliways
  • 59,890
  • 31
  • 101
  • 209