♦ Password
♦ Mailsetup
♦ Info
♦ Workstations
  ♣ Linux
  ♣ MacOS
♦ E-Mail
♦ Chat
♦ Files
♦ Backups
♦ Printers
♦ Network
♦ Statistics
♦ Downloads
♦ Links
♦ Newsletter
♦ Submit
♦ Search
♦ Linux

  WLAN at starbucks
Experiences Posted by Mathias Weyland on Thursday August 25, @08:38PM
from the coffee-at-work dept. dept.
Some time ago I noticed that it was possible to have free wireless Internet at Starbucks. As a heavy coffee consumer and Internet-addicted twerp, I decided to check it out instantly. But it turned out to be not that easy... This article describes what to do to gain permanent Internet access with Linux at Starbucks Coffeehouse.

I set up VPN using the open sourced implementation of the cisco vpn client as described in this fantastic readme (note that debian sarge comes with a vpnc package so it's not needed to compile from source anymore).

I ran a dhcp client, I ran vpnc-connect and YES! I had Internet, coffee and the wonderful Starbucks ambiance all at the same time. But wait... after two minutes there was no Internet anymore.

Now what happened? I realized that the dhcp lease time was 90 seconds (1.5 minutes). This means that my dhcp client had to renew the lease all 1.5 minutes. The router at starbucks drops everything coming from an IP without valid dhcp lease.

I had a glance at my routing table and realized that something went wrong there. This is the output of dhclient (from Starbucks at Stauffacher in Zurich):

DHCPREQUEST on ath0 to port 67 DHCPACK from
bound to -- renewal in 90 seconds.

I took a butcher's at RFC 2131 to understand how dhcp works. I read that the dhcp client first tries to connect the dhcp server several times with unicast and then sends out an udp broadcast to ask for a new lease. The server sends the following server-identifier: And guess what? The netmask of the local interface is! vpnc adds a default route through the tunnel-device. This means that the request is being routed to the ETH instead of the local network. And it looks like exactly the same happens with broadcasts.

I hacked the following line into my vpnc-connect script (at the bottom of the file just before the routing cache is being flushed):

ip route add via $(cat "$defr")

It routes broadcasts to the local net. That one worked quite well (stable connection for more than one hour), but it was not 100% reliable. I added one more route to route the unicast requests:

ip route add via dev ath0

The downside of the route is that it requires some voodoo to place it into the vpnc-connect script. (but it's perfectly possible, see (*))

As far as I can see the vpn runs stable now and the unicast requests reach the server:

Aug 25 20:08:49 ina dhclient: DHCPACK from
Aug 25 20:08:49 ina dhclient: bound to -- renewal in 90 seconds.

I hope this helps some students and staff members to cash in on the marvellous synthesis of coffee and Internet.

(*): It should be possible to hack something like ip route add $(tac /var/lib/dhcp/dhclient.leases |grep -am1 dhcp-server-identifier| awk '{print $3}'|sed -e 's/;//') via $(cat "$defr") into the vpn-connect script, I didn't test it though. (awk-only solutions are welcome)

<  |  >


  Related Links
  • Articles on Experiences
  • Also by Mathias Weyland
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    © 2003 ISG, Departement Physik, ETH Zürich, <>