Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread PeterMerchant via dorset



Cheers,
Peter

Terry said

If you do a clean install, at least you will know that there is nothing
hanging around that is upsetting things.


I have downloaded the new version of Raspian Stretch lite, and 
configured it, and it works straight in on my desired wireless lan IP.


The only extra change that I made, and I doubt it had any effect, was to 
comment out the command to generate stable IPv6 addresses.


Thanks to all for your help.

Peter



--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread Ralph Corderoy
Hi Peter,

> > Does your router know your LAN is 192.168.1.0/27, and not /24?
>
> I wanted to restrict the number of DHCP addresses available, and at
> the same time have a range for fixed addresses.
>
> Here is my documentation:
>
> Network  192.168.1.0/27
> Subnet mask  255.255.255.224
> Gateway  192.168.1.1
> Broadcast192.168.1.31
...
> 192.168.1.16-30 DHCP

OK.  Just seems odd to have a /27 and ensure everything is configured to
that so 192.168.1.31 is recognised as a broadcast, not host, address
instead of the more normal 192.168.1.255.  192.168.1.0/24 would still
allow restricting the DHCP server to a subset of the /8 hosts, and
192.168.{2,3...}.0/24 is available if you need other networks instead of
192.168.1.{32,64...}/27.

Cheers, Ralph.

--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread PeterMerchant via dorset

On 14/10/18 10:04, Terry Coles wrote:

On Sunday, 14 October 2018 09:53:31 BST PeterMerchant via dorset wrote:

On 14/10/18 08:06, Terry Coles wrote:

Did you reset the Router and then reboot the Pi?

I reset the router overnight and this morning the R-Pi connected on IP
.21 but I couldn't ssh into it, though replied ok to a ping. But Not .8.

Is this the latest version of of Stretch?  Was it a clean install or an
upgrade?   Stretch was updated on the 9th, so there may be something in it
that will help you.


Thanks Terry, I'll get a clean install of this. Just looking for Release 
notes, but can't find them. Maybe it's in the package.


Cheers,
Peter

If you do a clean install, at least you will know that there is nothing
hanging around that is upsetting things.

If that doesn't work, then I can only suggest that your router is to blame in
some way.

Interesting thought.  P.



--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread PeterMerchant via dorset

On 14/10/18 11:08, Ralph Corderoy wrote:

It's not setting your eth0's .9 either.

Ethernet is not connected.

Does your router know your LAN is 192.168.1.0/27, and not /24?  Why did
you choose that?  Do you have networks and hosts that would fall inside
192.168.1.0/24 but are outside 192.168.1.0/27, e.g. host
192.168.1.33/27?

Unless Raspbian has deviated from Debian Stretch in this area, you may
do better looking at Debian's documentation and Debian users solving the
problem.



Also, dhcpd and other programs often log their decisions, and
have a `debug' method to increase that logging.  Turning that on may
explain more.
Can't find that on my stupid Talktalk router. I'll have a look around 
and see if it is in R-Pi.



 I wanted to restrict the number of DHCP addresses available, and at 
the same time have a range for fixed addresses.

 192.168.1.1-31 is the total range,  thus  255.255.255.224 for Subnet mask:

Here is my documentation:

Network 192.168.1.0

Subnet 255.255.255.224

Gateway 192.168.1.1

Broadcast 192.168.1.31


192.168.1.1 Talktalk Router admin/ pw*

ESSID Ashmeads-downstairs

192.168.1.2 Upstairs repeater 3Com router admin/pw1 [Note, otherwise 
not configured]


ESSID: bmth-wireless

192.168.1.3-9 unassigned

192.168.1.10 Downstairs XP PC    -- Needs correcting - Now also Kubuntu!

192.168.1.11 Upstairs Linux PC

192.168.1.12 Brother Printer admin/ pw*2

192.168.1.13 unassigned.

192.168.1.14 Envoy Solar Power controller admin/admin


192.168.1.16-30 DHCP


Peter


--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread Ralph Corderoy
Hi Peter,

> interface eth0
> static ip_address=192.168.1.9/27
> static routers=192.168.1.1
> static domain_name_servers=192.168.1.1 8.8.8.8
>
> interface wlan0
> static address=192.168.1.8/27
> static routers=192.168.1.1
> static domain_name_servers=192.168.1.1
...
> pi@raspberrypi:~ $ ifconfig
> eth0: flags=4099  mtu 1500
>      ether b8:27:eb:b2:f7:c8  txqueuelen 1000  (Ethernet)
...
> wlan0: flags=4163  mtu 1500
>      inet 192.168.1.21  netmask 255.255.255.224  broadcast 192.168.1.31
>      inet6 fe80::2c9:aeca:54e4:fa59  prefixlen 64  scopeid 0x20
>      ether 00:0c:43:00:cc:2d  txqueuelen 1000  (Ethernet)
...
> So it is not setting my static .8

It's not setting your eth0's .9 either.

Does your router know your LAN is 192.168.1.0/27, and not /24?  Why did
you choose that?  Do you have networks and hosts that would fall inside
192.168.1.0/24 but are outside 192.168.1.0/27, e.g. host
192.168.1.33/27?

Unless Raspbian has deviated from Debian Stretch in this area, you may
do better looking at Debian's documentation and Debian users solving the
problem.  Also, dhcpd and other programs often log their decisions, and
have a `debug' method to increase that logging.  Turning that on may
explain more.

Cheers, Ralph.

--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread Terry Coles
On Sunday, 14 October 2018 10:04:38 BST Terry Coles wrote:
> If that doesn't work, then I can only suggest that your router is to blame
> in some way.

Come to think of it; I assume that your Router is set up to serve up addresses 
in a DHCP Range outside the ,8 that you want?  If this has worked before, I 
would imagine that it must be.

-- 



Terry Coles



--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread Terry Coles
On Sunday, 14 October 2018 09:53:31 BST PeterMerchant via dorset wrote:
> On 14/10/18 08:06, Terry Coles wrote:
> > Did you reset the Router and then reboot the Pi?
> 
> I reset the router overnight and this morning the R-Pi connected on IP
> .21 but I couldn't ssh into it, though replied ok to a ping. But Not .8.

Is this the latest version of of Stretch?  Was it a clean install or an 
upgrade?   Stretch was updated on the 9th, so there may be something in it 
that will help you.

If you do a clean install, at least you will know that there is nothing 
hanging around that is upsetting things.

If that doesn't work, then I can only suggest that your router is to blame in 
some way.

-- 



Terry Coles



--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread PeterMerchant via dorset

On 14/10/18 08:06, Terry Coles wrote:

On Saturday, 13 October 2018 21:37:41 BST PeterMerchant via dorset wrote:

wlan0: flags=4163  mtu 1500
  inet 192.168.1.21  netmask 255.255.255.224  broadcast 192.168.1.31
  inet6 fe80::2c9:aeca:54e4:fa59  prefixlen 64  scopeid 0x20
  ether 00:0c:43:00:cc:2d  txqueuelen 1000  (Ethernet)
  RX packets 246  bytes 29738 (29.0 KiB)
  RX errors 0  dropped 0  overruns 0  frame 0
  TX packets 119  bytes 17189 (16.7 KiB)
  TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

So it is not setting my static .8

Did you reset the Router and then reboot the Pi?

I reset the router overnight and this morning the R-Pi connected on IP 
.21 but I couldn't ssh into it, though replied ok to a ping. But Not .8.


Peter



--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread PeterMerchant via dorset

On 14/10/18 08:01, Terry Coles wrote:

On Saturday, 13 October 2018 21:37:41 BST PeterMerchant via dorset wrote:

and this is what I have:
# Example static IP configuration:
interface eth0
static ip_address=192.168.1.9/27
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 8.8.8.8

interface wlan0
static address=192.168.1.8/27
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

So it is not setting my static .

..

Have you still got any old files hanging around; eg interfaces?


No. Interfaces file was deleted and I let the system create a new one.
Peter



--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread Terry Coles
On Saturday, 13 October 2018 21:37:41 BST PeterMerchant via dorset wrote:
> wlan0: flags=4163  mtu 1500
>  inet 192.168.1.21  netmask 255.255.255.224  broadcast 192.168.1.31
>  inet6 fe80::2c9:aeca:54e4:fa59  prefixlen 64  scopeid 0x20
>  ether 00:0c:43:00:cc:2d  txqueuelen 1000  (Ethernet)
>  RX packets 246  bytes 29738 (29.0 KiB)
>  RX errors 0  dropped 0  overruns 0  frame 0
>  TX packets 119  bytes 17189 (16.7 KiB)
>  TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> So it is not setting my static .8

Did you reset the Router and then reboot the Pi?

-- 



Terry Coles



--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Re: [Dorset] DHCPCD.conf configuration for static addresses in a Raspberry Pi

2018-10-14 Thread Terry Coles
On Saturday, 13 October 2018 21:37:41 BST PeterMerchant via dorset wrote:
> and this is what I have:
> # Example static IP configuration:
> interface eth0
> static ip_address=192.168.1.9/27
> static routers=192.168.1.1
> static domain_name_servers=192.168.1.1 8.8.8.8
> 
> interface wlan0
> static address=192.168.1.8/27
> static routers=192.168.1.1
> static domain_name_servers=192.168.1.1
> 
> So it is not setting my static .

..

Have you still got any old files hanging around; eg interfaces?

-- 



Terry Coles



--
Next meeting at *new* venue:  Bournemouth, Tuesday, 2018-11-06 20:00
Check if you're replying to the list or the author
Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk/
New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk