Re: Jessie & Fixed IP Address

2016-09-09 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Sep 09, 2016 at 02:10:53PM -0500, Tim McDonough wrote:
> On 9/9/2016 4:26 AM, Cindy-Sue Causey wrote:
> >You know what, though, I did have two entries in there the other day.
> >And I found that tip because I was getting the "RTNETLINK answers:
> >File exists" error that led to that tip (k/t Raspberry Pi @
> >StackExchange). My firsthand experience is that tip leans towards
> >being true because I eliminated ALL my homespun entries and am now no
> >longer receiving *that* particular error message. *grin*
> 
> You typically (most networks) would have only one gateway specified.
> It's the IP address of the router used by your network to access the
> Internet.
> 
> I imagine there are more elaborate schemes with multiple gateways
> and could not offer advice on that, I have no experience.

You can define different gateways depending on target hosts/networks.
The default gateway "takes the rest".

Example:

  ip route add to 192.168.99/24 via 192.168.42.12

sets up host 192.168.42.12 as gateway to the subnet 192.168.99.xxx

regards
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlfTHrsACgkQBcgs9XrR2kbGbgCaAxwUHaUbxd45A/uRHlY/fjXU
3G8An1A7UWJS/kHfnjblNycPBPBMCTHH
=3Ya9
-END PGP SIGNATURE-



Re: Jessie & Fixed IP Address

2016-09-09 Thread Tim McDonough

On 9/9/2016 4:26 AM, Cindy-Sue Causey wrote:

You know what, though, I did have two entries in there the other day.
And I found that tip because I was getting the "RTNETLINK answers:
File exists" error that led to that tip (k/t Raspberry Pi @
StackExchange). My firsthand experience is that tip leans towards
being true because I eliminated ALL my homespun entries and am now no
longer receiving *that* particular error message. *grin*


You typically (most networks) would have only one gateway specified. 
It's the IP address of the router used by your network to access the 
Internet.


I imagine there are more elaborate schemes with multiple gateways and 
could not offer advice on that, I have no experience.


Tim



Re: Jessie & Fixed IP Address

2016-09-09 Thread Cindy-Sue Causey
On 9/8/16, Greg Wooledge  wrote:
> On Thu, Sep 08, 2016 at 06:08:04PM +0100, David wrote:
>> I am working with a Raspberry PI running Jessie and I'm not happy about
>> the solutions I found to change it from DHCP to a fixed IP address.
>>
>> Can I go back to the old method of editing /etc/network/interfaces
>
> If it's Debian Jessie, then yes, you can edit /etc/network/interfaces.
> Change the line that says something like "iface eth0 inet dhcp" to
> "iface eth0 inet static", and add indented lines below that for the
> address, netmask and gateway.  Then configure your /etc/resolv.conf
> file to point to some valid nameservers.
>
> If it's Raspbian Jessie, which is not the same as Debian Jessie, then
> all bets are off.


This is too cool. The whole deal with my... battling Wi-Fi and
Bluetooth right now just paid off again. Yesterday I learned something
appropriate for this that.. *DISCLAIMER*... may or may not be true.

What I read out on the Net said that, if you have two or more similar
entries in /etc/network/interfaces, you only declare "gateway" _one
time_ or you run into problems.** Rightly or wrongly, I currently
presume that declaration would be made in the first (top) block
(module) of declarations.

Additionally I'm not experienced enough at this to know if there are
instances where that declaration would be a different [number]. If
that situation exists, I could see that being an instance where you
WOULD make two declarations because they don't clash and would be
necessary declarations.

My purpose in jumping in here is to help prevent someone from hitting
unnecessary hair pulling roadblocks in the event anyone goes playing
around with these settings while they're being discussed. And again,
that may or may *not* be true, but it does sound reasonable enough to
share out loud.. :)

You know what, though, I did have two entries in there the other day.
And I found that tip because I was getting the "RTNETLINK answers:
File exists" error that led to that tip (k/t Raspberry Pi @
StackExchange). My firsthand experience is that tip leans towards
being true because I eliminated ALL my homespun entries and am now no
longer receiving *that* particular error message. *grin*

Cindy

-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *



Re: Jessie & Fixed IP Address

2016-09-09 Thread Joe
On Fri, 09 Sep 2016 09:12:14 +0100
David  wrote:


> 
> Firstly an apology, I did not realise there was a Debian Jessie and a
> Raspbian Jessie.
> 
> I'm working with Raspbian Jessie.
> 

Debian is the root of many other distributions such as Knoppix and
Ubuntu, and many less famous.

Raspbian is one that rings bells because it is based on the ARM, which
probably no full-sized computer is these days (the Acorn Archimedes
series used it almost thirty years ago). The range of Debian packages
ported to the ARM RISC architecture is significantly smaller than those
for i386 and amd64, so some things have to be done differently. The
limitations of the system-on-chip which composes almost all of the Pi
hardware imposes further limitations, compared to general-purpose
desktop hardware or even laptop hardware. The relatively small storage
space available again imposes restrictions.

So Raspbian may well be quite different to a stock amd64 Jessie,
utilising many of the tricks of older days of computing to make the
best of limited hardware.

-- 
Joe



Re: Jessie & Fixed IP Address

2016-09-09 Thread David
On Thu, 2016-09-08 at 12:42 -0500, Tim McDonough wrote:
> On 9/8/2016 12:08 PM, David wrote:
> > 
> > I am working with a Raspberry PI running Jessie and I'm not happy
> > about
> > the solutions I found to change it from DHCP to a fixed IP address.
> > 
> > Editing the file /etc/dhcpcd.conf does not seem to work correctly.
> > 
> > Can I go back to the old method of editing /etc/network/interfaces
> > 
> > Or is there a better way of setting a fixed IP on Jessie?
> 
> Raspbian Jessie (not Debian Jessie) uses systemd by default. I found
> the 
> following instructions worked well on my R-Pi 3 board:
> 
>  rry-pi/>
> 
> I too found it really confusing that many of the files we formerly
> used 
> to configure networking are still present but have no effect. I do
> not 
> know what all is involved in re-configuring to not use this newer
> method.
> 
> Tim
> 
Thank you for the replies.

Firstly an apology, I did not realise there was a Debian Jessie and a
Raspbian Jessie.

I'm working with Raspbian Jessie.

Having seen Tim's email I did some further searching and found some
suggestions which are to remove the daemon dhcpcd and edit the
/etc/network/interfaces file.

David.



Re: Jessie & Fixed IP Address

2016-09-08 Thread Brian
On Thu 08 Sep 2016 at 18:08:04 +0100, David wrote:

> I am working with a Raspberry PI running Jessie and I'm not happy about
> the solutions I found to change it from DHCP to a fixed IP address.

That's a shame.
 
> Editing the file /etc/dhcpcd.conf does not seem to work correctly.

Nobody in their right mind would be editing /etc/dhcpcd.conf to get a
fixed IP address.

> Can I go back to the old method of editing /etc/network/interfaces

You can go back to whatever works for you.

> Or is there a better way of setting a fixed IP on Jessie?

Better? That's a matter of opinion. A suitable /e/n/i is good enough.
You have advice on this.

But you could use connman if it keeps your Raspberry PI happy. That
might be a step too far, though.



Re: Jessie & Fixed IP Address

2016-09-08 Thread Tim McDonough

On 9/8/2016 12:08 PM, David wrote:

I am working with a Raspberry PI running Jessie and I'm not happy about
the solutions I found to change it from DHCP to a fixed IP address.

Editing the file /etc/dhcpcd.conf does not seem to work correctly.

Can I go back to the old method of editing /etc/network/interfaces

Or is there a better way of setting a fixed IP on Jessie?


Raspbian Jessie (not Debian Jessie) uses systemd by default. I found the 
following instructions worked well on my R-Pi 3 board:




I too found it really confusing that many of the files we formerly used 
to configure networking are still present but have no effect. I do not 
know what all is involved in re-configuring to not use this newer method.


Tim



Re: Jessie & Fixed IP Address

2016-09-08 Thread Greg Wooledge
On Thu, Sep 08, 2016 at 06:08:04PM +0100, David wrote:
> I am working with a Raspberry PI running Jessie and I'm not happy about
> the solutions I found to change it from DHCP to a fixed IP address.
> 
> Can I go back to the old method of editing /etc/network/interfaces

If it's Debian Jessie, then yes, you can edit /etc/network/interfaces.
Change the line that says something like "iface eth0 inet dhcp" to
"iface eth0 inet static", and add indented lines below that for the
address, netmask and gateway.  Then configure your /etc/resolv.conf
file to point to some valid nameservers.

If it's Raspbian Jessie, which is not the same as Debian Jessie, then
all bets are off.