0

I already know how to enable SSH : you have to drop a "ssh" file on the boot partition on the MicroSD card.

What I don't know, is how to get an IP for my raspberry. In /etc/network/interfaces, the default raspbian settings is all on "manual" :

# 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:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Do I have to plug a screen and a keyboard only to change "manual" to "dhcp" on the "iface eth0" line ?

Would NOOBS help for this ?

  • 1
    By default the pi can be reached with the hostname raspberrypi.local this does require that bonjour is running (on a PC itunes will provide this). Another option is to check your router for connected devices and the cooresponding IP address. IIRC manual here has the oposite meaning as you would expect. This thread raspberrypi.org/forums/viewtopic.php?t=110606 discusses manual vs dhcp. – Steve Robillard Jul 7 '17 at 9:18
  • My problem is my Pi is not getting any valid IP address until I change "manual" to "dhcp" in /etc/network/interfaces. – Tristan Jul 7 '17 at 11:08
1

You "get" an IP address from your router (or other network element) providing your DHCP server.

Without knowing details of your network, it is difficult to be more specific.

If you are connected to the Pi ifconfig will show the address.

In most cases you do not need to know the IP address. raspberrypi.local can be used in lieu of IP in most cases (certain uncommon Windows networks excepted).

  • My problem is my Pi is not getting any valid IP address until I change "manual" to "dhcp" in /etc/network/interfaces. – Tristan Jul 7 '17 at 11:08
  • 1
    Unless you have modified something Raspbian will get an IP by default. See How do I set up networking/WiFi/Static IP – Milliways Jul 7 '17 at 11:12
  • 1
    Likewise, I've never seen a raspberry pi fail to get an IP via DHCP (assuming the link is up) Is this Wifi or LAN? – SgtWilko Jul 7 '17 at 11:43
  • This is hard to decode information for a noob like me : are u saying DHCP is used wether u put "manual" or "dhcp" in /etc/network/interfaces ? – Tristan Jul 7 '17 at 12:40
  • The manual just indicates that network setting, whether by DHCP or another mechanism, is performed by an external procedure. If you put dhcp into /etc/network/interfaces this disables the default Network Manager dhcpcd. The default is far more robust than the older Debian networking. (Just for the record there are a number of other Network Managers which work well, just the Foundation has integrated dhcpcd.) /etc/network/interfaces is an anachronism, and is unnecessary; if you delete it the Pi will work, although you need to include the wireless hook, omitted by Raspbian. – Milliways Jul 7 '17 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.