MBA can't connect to Hotspot I've a weird problem with my MBA (2011 model) since the upgrade to Mavericks. There is a certain set of hotspots to which I can't connect anymore. I'm not sure which ones specifically, but there are several. Works well on the phone and tablet (both Androids).

I've got the feeling that it has something to do with the IP configs I receive - has anybody seen similar behavior and found a solution?

I've now found some more info on it, and it seems that the route is somehow mangled:

On the non working connection my routing table is:

Shu:~ blitz$ netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
169.254            link#4             UCS             0        0     en0
#somehow, the next line is duplicated
192.168.182        link#4             UC              0        0     en0
192.168.182        link#4             UCSI            2        0     en0
192.168.182.1      20:4e:7f:8b:36:81  UHLWIir         1      208     en0    992
192.168.182.240    127.0.0.1          UHS             0        0     lo0
192.168.182.255    ff:ff:ff:ff:ff:ff  UHLWbI          0        1     en0


On a working connection, the table is this one:

shu:~ blitz$ netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.1.1        UGSc           33        5     en0
169.254            link#4             UCS             0        0     en0
192.168.1          link#4             UCS             2        0     en0
192.168.1.1        84:7a:88:66:c5:79  UHLWIir        34       66     en0   1170
192.168.1.150      127.0.0.1          UHS             1       25     lo0
192.168.1.255      ff:ff:ff:ff:ff:ff  UHLWbI          0       16     en0


Any clue where the duplicated line got there and how i can get rid of it? And matter of fact, what does it even do? 

[EDIT]
Some Debug infos: the BOOTP response as printed from dhclient 

  IME: 2014-02-20 19:38:48.818
  IP: 192.168.182.1 (20:4e:7f:8b:36:81) &gt; 192.168.182.245 (10:40:f3:81:df:32)
  OP: 2 (BOOTPREPLY)
  HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
 XID: c9ab89bc
SECS: 0
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 192.168.182.245
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 10:40:f3:81:df:32:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   192.168.182.1
OPTION:   6 (  8) DNS server                192.168.182.1,83.169.184.225
OPTION:  15 ( 19) Domainname                frederix-hotspot.de
OPTION:  51 (  4) IP address leasetime      600 (10m)
OPTION:  26 (  2) Interface MTU             1500
OPTION:  54 (  4) Server identifier         192.168.182.1


The leases file, compared between working and non-working is - with the same access point:

10c10
&lt;   &lt;date&gt;2014-02-23T16:23:13Z&lt;/date&gt;
---
&gt;   &lt;date&gt;2014-02-23T16:17:40Z&lt;/date&gt;
13c13
&lt;   AgEGACHWzY0AAAAAAAAAAMCotokAAAAAAAAAABBA84HfMgAAAAAAAAAAAAAAAAAAAAAA
---
&gt;   AgEGAMmrigAAAAAAAAAAAMCotokAAAAAAAAAABBA84HfMgAAAAAAAAAAAAAAAAAAAAAA


However, some more observations I've made:
- the error only comes up in very specfic envrionments
- It only happens after I've used the mac for a certain amount of time, usually after a work day (time is probably the wrong thing, but maybe programs I've used for work)
- A reboot fixes things - so it strongly points to my machine being the culprit here!
Has anybody seen similar behavior and found a solution?

Nope, never seen this before, but I've noticed that the default route is missing in the routing table of the non-working connection. 

The default route is needed so that packets for destinations not listed in the routing table can be properly routed and delivered.

You can fix it by adding the route like this:

sudo route add default &lt;IP address of router&gt;


In your case:

sudo route add default 192.168.182.1


This treats the symptoms, not the disease. To find out what's wrong download dhcpdump from http://www.mavetju.org/unix/general.php, compile it in Terminal:

cd ~/Downloads/
tar xzf dhcpdump-1.8.tar.gz
cd dhcpdump-1.8
make


and run it:

sudo ./dhcpdump -i en0


You'll get an output similar to this:

  TIME: 2014-02-18 10:04:03.832
    IP: 0.0.0.0 (e0:f8:49:27:4e:22) &gt; 255.255.255.255 (ff:ff:ff:ff:ff:ff)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
(...)
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  55 (  9) Parameter Request List      
    1 (Subnet mask) 3 (Routers) 6 (DNS server) 15 (Domainname) 
    119 (Domain Search) 95 (LDAP) 252 (MSFT - WinSock Proxy Auto Detect) 
    44 (NetBIOS name server) 46 (NetBIOS node type)

OPTION:  57 (  2) Maximum DHCP message size 1500
OPTION:  61 (  7) Client-identifier         01:e0:f8:49:27:4e:22
OPTION:  50 (  4) Request IP address        10.0.0.31
OPTION:  51 (  4) IP address leasetime      7776000 (12w6d)
OPTION:  12 (  8) Host name                 avallone
---------------------------------------------------------------------------

  TIME: 2014-02-18 10:04:03.934
    IP: 10.0.0.1 (c4:3d:c7:a6:a3:98) &gt; 10.0.0.31 (e0:f8:49:27:4e:22)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
(...)
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         10.0.0.1
OPTION:  51 (  4) IP address leasetime      86400 (24h)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   10.0.0.1
OPTION:   6 (  4) DNS server                10.0.0.1


The important part for us is option 3 in the BOOTREPLY packet:

OPTION:   3 (  4) Routers                   10.0.0.1


Is it missing in the answer your Mac gets, or are there other options like static routes (option 33) that might confuse the BSD network stack?

(You could also use sudo tcpdump -i en0 -s 1500 -XX port bootps or port bootpc to analyze the DHCP packets but dhcpdump offers a much more readable output.)

Which is the value of RouterIPAddress in/private/var/db/dhcpclient/leases/&lt;interface&gt;,&lt;count&gt;-&lt;MAC address&gt; when the connection is not working? As an example, this is my DHCP lease file:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;IPAddress&lt;/key&gt;
    &lt;string&gt;10.0.0.31&lt;/string&gt;
    &lt;key&gt;LeaseLength&lt;/key&gt;
    &lt;integer&gt;86400&lt;/integer&gt;
    &lt;key&gt;LeaseStartDate&lt;/key&gt;
    &lt;date&gt;2014-02-21T07:04:53Z&lt;/date&gt;
    &lt;key&gt;PacketData&lt;/key&gt;
    &lt;data&gt;
    (...)
    &lt;/data&gt;
    &lt;key&gt;RouterHardwareAddress&lt;/key&gt;
    &lt;data&gt;
    (...)
    &lt;/data&gt;
    &lt;key&gt;RouterIPAddress&lt;/key&gt;
    &lt;string&gt;10.0.0.1&lt;/string&gt;
    &lt;key&gt;SSID&lt;/key&gt;
    &lt;string&gt;hotspot&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;


Any clue where the duplicated line got there and how i can get rid of it? And matter of fact, what does it even do?

It looks like your Mac can't properly process the DHCP reply from the router. You can delete the duplicated line with:

sudo route delete -ifscope en0 -net 192.168.182 -link 'link#4'


Since the duplicated routes have the same destination and gateway I don't think they will hinder network functionality, as you can see, only one of them is being used, the one with Refs greater than 0:

192.168.182        link#4             UC              0        0     en0
192.168.182        link#4             UCSI            2        0     en0