3

So wlan0 is connecting fine to my router, but I'm not getting an IP.

/etc/network/interfaces has the line:

iface wlan0 inet manual

Changing manual to dhcp doesn't seem to help, I get lots of messages of the form:

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5

And eventually it fails. Perhaps it's looking in the wrong place? I'm fine to either configure a static IP or get DHCP working.

As requested, ifconfig wlan0:

wlan0     Link encap:Ethernet  HWaddr a0:f3:c1:0f:18:50
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:75 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:4416 (4.3 KiB)

wpa_gui:

enter image description here

  • Check the second line of output from ifconfig wlan0. – goldilocks Mar 6 '13 at 19:53
  • @goldilocks I've added the whole thing – Tom Medley Mar 6 '13 at 20:15
  • TX bytes with no RX bytes very strongly implies you don't have any kind of connection. Why do you believe that you do? – goldilocks Mar 6 '13 at 20:27
  • @gold The raspbian utility told me everything was ok... – Tom Medley Mar 6 '13 at 20:29
2

Setting /etc/network/configuration to:

iface wlan0 inet manual
address 192.168.1.66
netmask 255.255.255.0
gateway 192.168.1.254

Set a static IP, which worked.

  • I am having the same problem. Still, how should I configure wlan0 to get a dynamic address via DHCP? – vbocan Dec 6 '13 at 6:15
1

Setting a static IP Address

Assuming you want to assign a manual IP Address, edit the interfaces configuration file, restart the interface, and check your IP address.

1. Open interface config file with nano

sudo nano /etc/network/interfaces

2. Specify static IP address

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.1.127
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4

auto wlan0
iface wlan0 inet static
    address 192.168.1.128
    netmask 255.255.255.0

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

3. Restart the wlan0 interface

sudo ifdown wlan0
sudo ifup wlan0

4. Verify that the manual IP Address is assigned

Type the following in the terminal:

ifconfig

Expected Result

eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          inet addr:192.168.1.127  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2464 errors:0 dropped:10 overruns:0 frame:0
          TX packets:1184 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:316409 (308.9 KiB)  TX bytes:177184 (173.0 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:75 errors:0 dropped:0 overruns:0 frame:0
          TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7394 (7.2 KiB)  TX bytes:7394 (7.2 KiB)

wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX  
          inet addr:192.168.1.128  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:510 errors:0 dropped:10 overruns:0 frame:0
          TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:164607 (160.7 KiB)  TX bytes:11984 (11.7 KiB)

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.