foxtarquin
Posts: 3
Joined: Tue Jul 02, 2019 10:19 am

Static IP on Raspbian Buster doesn't work

Tue Jul 02, 2019 10:23 am

Hi,

I configure on the new Raspbian Buster (with nothing install just the ip) a static IP but I have no traffic no connexion. I switch with the DHCP ip and everything works.

I do exalté the same procedure on Raspbian stretch (April) and everything works good.

Do you have any idea ?

Thanks for your help.

Fox

pcmanbob
Posts: 9462
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Static IP on Raspbian Buster doesn't work

Tue Jul 02, 2019 11:38 am

Hi.

My pi's 3B, 3B+ ,4B all work happily with raspbian buster lite and a static IP address.

Remember any static IP you set on your pi should be outside of the router DHCP address range,

You might also power cycle your router just in case it has become locked up in some way.

you could also post your dhcpcd.config file so we can see what settings you have entered.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

foxtarquin
Posts: 3
Joined: Tue Jul 02, 2019 10:19 am

Re: Static IP on Raspbian Buster doesn't work

Wed Jul 03, 2019 6:55 am

Hello

My use is a little different. I connect directly to a machine in a 10.0.0.0.X network

Code: Select all

# 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
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::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

interface eth0
inform 10.0.0.2/24
I did more tests I took a blank image of raspbian buster by putting only the static ip address and it doesn't talk to the machine.

by taking a blank image of raspbian stretch with the same procedure it works without any problems

Ernst
Posts: 1334
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Static IP on Raspbian Buster doesn't work

Wed Jul 03, 2019 7:41 am

foxtarquin wrote:
Wed Jul 03, 2019 6:55 am

Code: Select all

# Example static IP configuration:
#interface eth0
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
Above is the example

This is what you configured:
foxtarquin wrote:
Wed Jul 03, 2019 6:55 am

Code: Select all

interface eth0
inform 10.0.0.2/24
Do you notice the difference ?
inform
Behaves like request as above, but sends a DHCP INFORM instead of DISCOVER/REQUEST. This does not get a lease as such, just notifies the DHCP server of the address in use. You should also include the optional cidr network number in case the address is not already configured on the interface. dhcpcd remains running and pretends it has an infinite lease. dhcpcd will not de-configure the interface when it exits. If dhcpcd fails to contact a DHCP server then it returns a failure instead of falling back on IPv4LL.
The road to insanity is paved with static ip addresses

foxtarquin
Posts: 3
Joined: Tue Jul 02, 2019 10:19 am

Re: Static IP on Raspbian Buster doesn't work

Wed Jul 03, 2019 8:08 pm

Hi

Thank you for your answer Ernst

I understand the difference when reading the manual but I don't understand why the same setting doesn't work anymore between stretch and buster (mandatory for a PI4).

what would be a good setting for you for my situation.

Thank you for your help.

pcmanbob
Posts: 9462
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Static IP on Raspbian Buster doesn't work

Wed Jul 03, 2019 8:46 pm

The same dhcpcd.config settings have been used in Jessie , stretch and now buster so I don't understand what you think has changed.

So using the example from dhcpcd.config

Code: Select all

# Example static IP configuration:
interface eth0
static ip_address=10.0.0.2/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
you will need to add your own static routers and dns server settings and uncomment them.

As far as I am aware " inform " has never been used to set static IP address.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Andyroo

Re: Static IP on Raspbian Buster doesn't work

Wed Jul 03, 2019 9:19 pm

Fluke in the the DHCP server gave out 100 the first time the Pi booted and then avoided reusing the lease?
If the Pi was on it would be sending inform packets out to keep the lease active and i wonder if it’s possible the DHCP server allocated this?

Inform should not get an address:

The RFC 2131 states:
3.4 Obtaining parameters with externally configured network address

If a client has obtained a network address through some other means (e.g., manual configuration), it may use a DHCPINFORM request message to obtain other local configuration parameters. Servers receiving a DHCPINFORM message construct a DHCPACK message with any local configuration parameters appropriate for the client without:
allocating a new address, checking for an existing binding, filling in 'yiaddr' or including lease time parameters. The servers SHOULD unicast the DHCPACK reply to the address given in the 'ciaddr' field of the DHCPINFORM message.

The server SHOULD check the network address in a DHCPINFORM message for consistency, but MUST NOT check for an existing lease. The server forms a DHCPACK message containing the configuration parameters for the requesting client and sends the DHCPACK message directly to the client.

Return to “Troubleshooting”