0

I have tested with the last couple of Raspbian builds (the latest is with "October 2018") and I'm not able to get any ipv4 addresses using WiFi. I have no problem getting an ipv4 address on the wired connection (either using DHCP or a static address).

This is the output of ifconfig for wlan0 using default setup:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::4a56:5f11:f923:5eee  prefixlen 64  scopeid 0x20<link>
        inet6 fc00::47ec:3d45:fbd:e198  prefixlen 64  scopeid 0x0<global>
        ether b8:27:eb:f4:1b:8d  txqueuelen 1000  (Ethernet)
        RX packets 22  bytes 3168 (3.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32  bytes 5418 (5.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Then I tried to disable ipv6 as suggested here Force IPv4 address, by adding:

net.ipv6.conf.all.disable_ipv6=1

to

/etc/sysctl.conf

But, then I get no IP address at all:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether b8:27:eb:f4:1b:8d  txqueuelen 1000  (Ethernet)
        RX packets 9  bytes 824 (824.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11  bytes 1126 (1.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

This is the output of ifconfig for the wired connection:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.12  netmask 255.255.255.0  broadcast 192.168.1.255
        ether b8:27:eb:a1:4e:d8  txqueuelen 1000  (Ethernet)
        RX packets 91  bytes 8185 (7.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 72  bytes 10103 (9.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

How can I get a ipv4 address for the WiFi connection?

  • Have you checked the settings on your AP/router? Have you reset the AP/router (by switching it off/on)? – Dirk Nov 13 '18 at 12:03
  • I have other devices like a Windows PC, iPhones etc. which is getting ipv4 addresses with no problem. – OlavT Nov 13 '18 at 14:36
  • OTOH I (and many others with me) have no problems getting IPv4 and IPv6 addresses on Rapbian Stretch. This would suggest that the problem is either a change you made or there's a problem inside your LAN. – Dirk Nov 13 '18 at 15:01
  • 1
    You have to associate with a wireless access point (and probably authenticate yourself to it) before you will receive an IP address by DHCP. If you are using a desktop, you can configure this using the graphical desktop. If you are on the command line instead, you can follow these instructions raspberrypi.org/documentation/configuration/wireless/… – Rob Bricheno Nov 13 '18 at 15:30
  • I have added the Raspberry PI to the wireless network. I can connect to the Raspberry PI from another computer over WiFi using ssh and the ipv6 address. – OlavT Nov 13 '18 at 17:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.