2

To start, I'll say it's been nearly 2 decades since I've fiddled with *nix, and that was OBSD.. so to say I'm rusty is an understatement... And I'm new to Rpi.

So I've edited the /etc/network/interfaces file, and added my desired static IP and netmask, I exit, I pull the interface down and back up, and it is set and working.. I reboot, and I have some weird IP again, the file is as I left it... I must be missing something somewhere, what is it?

/etc/network/interfaces is GNU nano 2.2.6 File: /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth- inet manual



allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

/etc/dhcpcd.conf is

interface eth0 static ip_address= 192.168.1.250/16



hostname


clientid

persistent


option rapid_commit


option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes

option ntp_servers



require dhcp_server_identifier

slaac private

nohook lookup-hostname

OK, I removed all the comments that seemed to be offensive to formatting

Milliways
  • 59,890
  • 31
  • 101
  • 209
Rx7man
  • 29
  • 1
  • 4
  • 1
    See the tutorial at How do I set up networking/WiFi/Static IP which explains why it doesn't work and how to fix it – Milliways Mar 04 '16 at 04:29
  • I tried that now, and it certainly doesn't explain why it doesn't work... I edited /etc/dhcpcd.conf instead (reverted interfaces to what it was) and no go.. every time I reboot my IP is 169.254.141.114 – Rx7man Mar 04 '16 at 05:00
  • 1
    It does explain, but I guess this requires more understanding of Linux. If you want help paste the current contents of the files you changed into your question i.e. /etc/network/interfaces and others. 169.254.141.114 is a link-local address so for some reason it is not getting an IP address. – Milliways Mar 04 '16 at 05:10
  • /etc/dhcpcd.conf starts with the lines interface eth0 static ip_address= 192.168.1.250/16 – Rx7man Mar 04 '16 at 05:23
  • The rest of both files are as issued with the latest Raspbian-Jessie – Rx7man Mar 04 '16 at 05:23
  • GNU nano 2.2.6 File: /etc/network/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/in$

    auto lo iface lo inet loopback

    auto eth0 allow-hotplug eth0 iface eth- inet manual

    allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

    allow-hotplug wlan1 iface wlan1 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

    – Rx7man Mar 04 '16 at 05:28
  • wow... formatting here really sucks! – Rx7man Mar 04 '16 at 05:28
  • Are you problem solved? Could you update your question with new details?, can specify which network interface are you trying to connect? – Elber CM May 30 '17 at 21:51

2 Answers2

1

English is not my native language so please be patient.

Maybe is a typo error in your interfaces file, change the - for 0

auto eth0
allow-hotplug eth0
iface eth- inet manual ---> iface eth0 inet manual

I would advice to try first with dhcp, if you have a screen or you can check the I.P. from your router that the raspberry is leasing, then you can come back to the interfaces file and choose manual or even static set-up.

Elber CM
  • 286
  • 2
  • 13
1

Use:

auto eth0
iface eth0 inet static
address 192.168.1.250
subnet 255.255.0.0

Note the static instead of manual.

allo
  • 330
  • 3
  • 13