On 13/10/18 17:07, Terry Coles wrote:
Forward to the list this time instead of to Peter! Doh!
BTW, in the example that I posted below you also have to change the IP
Addresses to suit your setup of course.
On Saturday, 13 October 2018 16:49:09 BST Terry Coles wrote:
On Saturday, 13 October 2018 16:33:03 BST PeterMerchant via dorset wrote:
This appears to be the most recent posting that I could find:
https://lb.raspberrypi.org/forums/viewtopic.php?t=205276
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
2. This is the second time that I have seen that the interface name is
redefined into something containing the MAC address rather than eth0 etc
that we are used to.
3 I have re-read this one and it looks like in the last section I can
disable DHCP and revert to the mode of operation that I am used to. It's
two years old though.
https://raspberrypi.stackexchange.com/questions/37920/how-do-i-set-up-netw
or king-wifi-static-ip-address
I'll give it a whirl, but it does mean that I have to get it working in
order to ssh into it and change the files.
I'm slightly confused. Why do you want to revert to the old way to set a
static IP addressI That way you'll have to do it every time Raspbian is
updated. The instructions in the link that I highlighted above worked fine
for me.
Here is the code that you need to put into dhcpd.conf:
interface eth0 # Change this to whatever your Ethernet portname
is
static ip_address=192.168.0.103/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 1.1.1.1 1.0.0.1
interface wlan0 # Change this to whatever your WiFi portname is
static ip_address=192.168.0.103/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 1.1.1.1 1.0.0.1
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
and when I connect to the Pi [on address 21]
pi@raspberrypi:~ $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:b2:f7:c8 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> 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<link>
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
I'll have another look at your link to see if there is anything else I
should set:
Meanwhile:
pi@raspberrypi:/etc $ cat dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per
RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# 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
# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1
# fallback to static profile on eth0
#interface eth0
#fallback static_eth0
========= =========== ========
and
pi@raspberrypi:/etc/wpa_supplicant $ sudo cat wpa_supplicant.conf
# /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
ssid="bmth-wireless"
psk="*********" # changed to * to hide key
# proto=RSN
key_mgmt=WPA-PSK
# pairwise=TKIP
# auth_alg=OPEN
}
Peter
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