JWatts
Posts: 5
Joined: Sat Oct 17, 2015 7:01 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Oct 24, 2015 10:56 am

I did fresh install of Jessie, added

Code: Select all

static ip_address=192.168.0.5/24
static routers=192.168.0.1
static domain_name_servers=8.8.8.8 8.8.4.4
to /etc/dhcpcd.conf and I have a network connection with a static IP.
Thanks!

Heater
Posts: 13062
Joined: Tue Jul 17, 2012 3:02 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Oct 24, 2015 12:12 pm

Let me get this straight,

Back in the day if we wanted static IP addresses we put an entry in the interfaces file that said "static". If we wanted dynamic IP addresses we put an entry in the interfaces file that said "dynamic" and we set up dhcp to do that. Life was good.

Now if I want a static IP address I have to label the entry as "manual" and let dhcp handle it, so it's not "manual" at all now is it? Then I have to tell dhcp that this interface is "static", which is at least contradictory.

Is it just me or is this all barking mad? Who on earthe came up with this scheme?

User avatar
DougieLawson
Posts: 35780
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Oct 24, 2015 12:40 pm

Heater wrote:Is it just me or is this all barking mad? Who on earth came up with this scheme?
It's 100% bonkers. The folks at the RPF need to be stood up against a wall for coming up with this mess.

It does work, but it's everything but elegant. It's like a mish-mash of stuff from Debian stirred up with stuff from Arch.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Heater
Posts: 13062
Joined: Tue Jul 17, 2012 3:02 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Oct 24, 2015 1:29 pm

I can't fathom why Raspian Jessie needs to do anything different than Debian Jessie.

It's just an unnecessary thing to have to remember and deal with when moving from one to another.

How can we repair it?

User avatar
DougieLawson
Posts: 35780
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Oct 24, 2015 1:45 pm

Heater wrote:How can we repair it?
If you build a SDCard and boot it to the GUI does it work? If you plug in a WiFi dongle does it work?

The answer is, obviously, "Yes". "Can it connect to the internet?", again "Yes.", does WiFi work "Yes, as long as my SSID isn't hidden and I get the password right".

So when you tell the RPF folks "It's broken", they'll reply "No it isn't it works for us with the GUI in all of our tests."

The problem that needs fixing is that the the folks who built this crud forgot that not all of their 5.6 million users run the GUI. Some of use run our raspberries as servers (and we need a fixed IP addr, one of mine is running a 6in4 IPv6 tunnel which won't work without a fixed LAN IP and a known WAN IP). This /etc/network/interfaces and /etc/dhcpcd.conf stuff doesn't make doing that stuff easy.

I've not fathomed how you get the "out of the ordinary" cases across to the RPF so they can fix this mess.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

nick268
Posts: 3
Joined: Sun Jun 28, 2015 11:52 am

Re: /etc/network/interfaces has changed

Fri Oct 30, 2015 5:22 pm

Higgs wrote:Yoly Moley.........

Edit:
Having discovered these changes in /etc/network/interfaces it has taken me only a few more minutes of trial-and-error to set a static IP for my wireless by ADDING THE CHANGES IN /etc/dhcpcd.conf rather than hacking away in /etc/network/interfaces and just breaking things without knowing why......
And it now has the proper gateway on bootup.
what changes did you actually make in /etc/dhcpcd.conf? I have read the posts by others above and I have no clearer understanding of what's needed!

nick268
Posts: 3
Joined: Sun Jun 28, 2015 11:52 am

Re: /etc/network/interfaces has changed

Fri Oct 30, 2015 5:31 pm

nick268 wrote:
Higgs wrote:Yoly Moley.........

Edit:
Having discovered these changes in /etc/network/interfaces it has taken me only a few more minutes of trial-and-error to set a static IP for my wireless by ADDING THE CHANGES IN /etc/dhcpcd.conf rather than hacking away in /etc/network/interfaces and just breaking things without knowing why......
And it now has the proper gateway on bootup.
what changes did you actually make in /etc/dhcpcd.conf? I have read the posts by others above and I have no clearer understanding of what's needed!
having said that the various posts under make it clearer. Its now cloudy clear rather than mud clear!

renoir
Posts: 8
Joined: Thu Dec 03, 2015 7:18 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Dec 12, 2015 11:47 am

I'm not sure if this is related but someone might know what's wrong here.

I set the static ip for wlan1 in /etc/network/interfaces, as you would - every doc out there says to do it this way.

I then did `/etc/init.d/networking restart` then `ifconfig` and see that wlan1 is assigned the 192.168.X.X IP that I want.

Now I `sudo reboot`, then `ifconfig` and still ok. So far so good. Now for the weird part.

I reboot once more, and now ifconfig says wlan1 has some 169.254.X.X address. Ok shit, now I restart `/etc/init.d/networking restart` once more and then reboot. After an `ifconfig` it is once more assigned the 192.168.X.X address.

TL;DR So every time I reboot without restarting the network first, wlan1 won't get the static IP I set in /etc/network/interfaces. But if I restart the network before I reboot, it's given the static IP.

My memory is a bit cloudy but there's another strange behavior: I then found this thread and tried using the solutions here and set it in /etc/dhcpcd.conf as RPF intended us to (but didn't say), I can see it is given the right IP when I `ifconfig` after a reboot, BUT startup services couldn't bind to it, but once logged in if I restart those services they can then bind to the IP.

------------------------------

Update: the latter strange behavior is fixed by reordering the services. The first strange behavior above, in bold, I don't know how to fix - one should just set the static IP in /etc/dhcpcd.conf as intended (even though it's annoying).

The fact that the old method works after `/etc/init.d/networking restart` and (only) after the first reboot is adding insult to injury. The injury being this is undocumented and is straying away from Debian upstream.

pjcvdpol
Posts: 2
Joined: Fri Dec 11, 2015 3:58 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Dec 12, 2015 2:55 pm

JWatts wrote:I did fresh install of Jessie, added

Code: Select all

static ip_address=192.168.0.5/24
static routers=192.168.0.1
static domain_name_servers=8.8.8.8 8.8.4.4
to /etc/dhcpcd.conf and I have a network connection with a static IP.
Thanks!
This works, confirmed. Who are the morons that made this idiotic solution necessary? I have been using Linux since 1997, but have never seen anything as idiotic as this. Fire the fools.

ekantons
Posts: 1
Joined: Tue Dec 29, 2015 6:03 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Tue Dec 29, 2015 6:14 pm

I implemented paulv's suggested edits to /etc/wpa_supplicant/wpa_suopplicant.conf, but I was not able to get my WiFi to connect until I removed the quotation marks from the line with psk=
I left the quotation marks on the line with ssid="..."
I also left commented all of the lines that paulv commented with leading #

LesGirauds
Posts: 18
Joined: Tue Aug 13, 2013 2:52 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Fri Jan 01, 2016 3:44 pm

Many many thanks to the people contributing to this thread (paulv especially, & Dougie)

I'd been ripping out what's left of my hair trying to get to the bottom of this '2 IP address' problem. I blamed my router to begin with because, as far as I knew, I was doing things correctly adding my static address to the interfaces file.

Now my Pi is working properly again, I'm kind of hoping the Raspbian people leave things as the are... or should I be prepared for a future update putting things back to 'as they were'?!?! :lol:

Heater
Posts: 13062
Joined: Tue Jul 17, 2012 3:02 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Jan 02, 2016 2:42 pm

DougieLawson,

I suspect Raspbian won't be going back wrt interface configuration. Having confused everybody once it might not be a good idea to confuse them again.

My question was how can one undo the damage on ones Raspbian installation and get things back to the "Debian way".

User avatar
rpdom
Posts: 14979
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sat Jan 02, 2016 2:55 pm

cyttorak wrote:what's mean "/24" in "static ip_address=192.168.100.21/24"?
The address is made up of four eight-bit values (0-255). The /24 defines the "netmask" which says which of those bits to use as the network number and which to ignore. /24 means the first 24 bits of the netmask are all 1 and the last 8 are 0, giving 255.255.255.0 for the netmask. Match that mask with the IP address and you get the network number of 192.168.100.0

It's really just shorthand for the old netmask parameter.

fmartingr
Posts: 1
Joined: Sun Jan 03, 2016 5:29 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Sun Jan 03, 2016 5:55 pm

Finally!

The only solution for me was adding this to the /etc/dhcpcd.conf:

Code: Select all

interface eth0
inform 192.168.1.101
static routers=192.168.1.1
Tried lots of stuff but this is the only one that worked for me.

Nemo1966
Posts: 62
Joined: Fri Jan 01, 2016 8:02 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Tue Jan 05, 2016 10:13 am

This is what happens when script kiddies are let loose on a dev project. No wonder a lot of people think Linux is a black art that involves sacrificing chickens. :o

Milliways
Posts: 431
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Wed Jan 06, 2016 3:17 am

To all those complaining about the Networking changes (and I agree it was poorly done by the Foundation). You have 2 options:-

1. Adapt to the new method. It actually works better and has some advantages. Or
2. Disable `dhcpcd` and all the old methods will work. (You won't have the WiFi support in GUI).

In conclusion most of those who are trying to set static addresses don't need to (I know there are some valid uses, but if you need this you probably know how). Use zero-conf, which works by default in the new networking setup.

Heater
Posts: 13062
Joined: Tue Jul 17, 2012 3:02 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Wed Jan 06, 2016 6:30 am

It's annoying because it's different to every other Debian running computer I have. I fiddly detail to remember.

You might have to elaborate on what zero-conf has to do with it. As far as I know no one uses that for anything.

Milliways
Posts: 431
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Wed Jan 06, 2016 7:37 am

Heater wrote:You might have to elaborate on what zero-conf has to do with it. As far as I know no one uses that for anything.
I don't care what IP my Pi has. I can plug into almost any network and connect. You would be surprised but many of the services on your computer are probably using zero-conf e.g. to find printers.

You can easily connect from Linux and OS X with ssh [email protected] (the default hostname is raspberrypi) This should work with popular GUI ssh programs. This is sometimes problematic with some versions of Windows and networks which use .local in a non-standard way. (See https://en.wikipedia.org/wiki/.local)

If you have multiple Pi you need to make sure each Pi has a unique hostname.

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Mon Jan 25, 2016 8:10 pm

I now understand why I lost two hours of my life yesterday morning and about an hour this evening.

Please can someone at Pi HQ add a page to the list here: https://www.raspberrypi.org/documentati ... iguration/ so that no one else has to go through this pain.

xxx

wolf.z
Posts: 92
Joined: Thu Dec 24, 2015 8:34 pm

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Mon Jan 25, 2016 8:35 pm

well, let me first state, I also spent hours of lifetime struggling with configuring static IP adresses. All three methods, either network or dhcpcd or whatever failed, unless using this strange "inform" term. However, the more important thing is, I do not like people steadily stating, a static IP configuration is not necessary any more. Believe me, a computer like the Raspberry is the most suitable one for living in a non-managed, stand-alone, minimalistic kind of networking without either router, DHCP or even DNS, a kind of networking, utmost best done with static IP... able to succeed when connected to other networks.
Further, when it comes to a fall-back, when all the network resources fade, static IP config is a solution.....

NewbEE
Posts: 8
Joined: Sun Jan 31, 2016 12:38 am

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Tue Feb 02, 2016 2:36 am

I can't send to get an answer on the thread I started, so hopefully y'all can help me, since you've figured out the problem. I am trying to tether my Samsung S4. The pi recognizes the USB connection without me changing any files, but no internet. When I change the etc/network/interfaces file, it no longer connects. Can someone help me get this thing working? I would greatly appreciate it.

DirkS
Posts: 9898
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: /etc/network/interfaces changed,weird 2 LAN IPs instead

Tue Feb 02, 2016 7:45 am

NewbEE wrote:I can't send to get an answer on the thread I started, so hopefully y'all can help me, since you've figured out the problem. I am trying to tether my Samsung S4. The pi recognizes the USB connection without me changing any files, but no internet. When I change the etc/network/interfaces file, it no longer connects. Can someone help me get this thing working? I would greatly appreciate it.
To anybody who wants to respond: please use this topic: viewtopic.php?f=28&t=134608

Return to “General discussion”