Page 1 of 1

Wifi DHCP giving a weird IP in raspberry pi 2

Posted: Wed Aug 17, 2016 6:57 am
by alexserver
Hello there, I've been looking for a successful Wireless configuration with /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf files that work for my raspberry pi 2 and this is the only I found:

https://kerneldriver.wordpress.com/2012 ... pberry-pi/

I'm able to connect to my router, unfortunately, when I do, I get this strange IP: 169.254.232.164, and I don't know why.

This are my fles

/etc/network/interfaces

Code: Select all

# 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
auto wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
/etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

network={
ssid="myssid"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="mypass"
}
how the heck did this end with a strange ip ? my router is having dhcp for 192.168.1.100 to .199

Re: Wifi DHCP giving a weird IP in raspberry pi 2

Posted: Wed Aug 17, 2016 7:07 am
by PiGraham
169.254.x.x addresses are automatic private IP addressing that has long been common on Windows. An adaptor set to use DHCP that fails to contact a DHCP server (i.e. your router) allocates an address from this private network IP range.

I didn't know Raspbian did that but try looking up "automatic private IP addressing"

Re: Wifi DHCP giving a weird IP in raspberry pi 2

Posted: Wed Aug 17, 2016 7:10 am
by RaTTuS
that is a 4 year old blog
put things back ...
look at
viewtopic.php?f=66&t=140252

Re: Wifi DHCP giving a weird IP in raspberry pi 2

Posted: Wed Aug 17, 2016 7:35 am
by alexserver
Rattus I know the blog is old, but that's the only one that got me an IP.
Internet is full of outdated crappy tutorials.

I followed the official tutorial and failed.
https://www.raspberrypi.org/documentati ... ess-cli.md

could you help me to set a successful interfaces and wpa_supplicant files that work with the dhcpcd.conf you suggested ?