gommaloano
Posts: 9
Joined: Wed Feb 17, 2016 9:20 am

A big problem with DHCP and static IP ...

Fri Feb 19, 2016 11:01 am

I think I read online that they are not alone in having this problem

In practice, the raspberry with raspbian takes the ip from dhcp and ignores the file /etc/network/interfaces

Here is how I write in the file:
iface eth0 inet static
address 192.168.17.150
netmask 255.255.255.0
network 192.168.17.0
broadcast 192.168.17.255
gateway 192.168.17.1

Has anyone solved?

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: A big problem with DHCP and static IP ...

Fri Feb 19, 2016 11:03 am

by reading
see

Code: Select all

 cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
...
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
karrika
Posts: 1124
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: A big problem with DHCP and static IP ...

Fri Feb 19, 2016 11:07 am

In Jessie the file to edit is /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.1.2/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8

Return to “Advanced users”