The Netbook Hotspot
Incomplete steps for creating a hotspot from a netbook running Ubuntu 12.04.
DanRasmussen has been wanting to do this for months, finally inched forward at most recent PTP PlayDay with thanks to KeeganQuinn and TedBrunner. Following these steps, you wind up broadcasting an SSID that nothing can connect to (because your hotspot does not yet have a DCHP server, and probably other reasons I don't know about yet)
What's Needed
Computer (DanRasmussen using Ubuntu 12.04, hopefully this guide works on Debian and older versions of Ubuntu)
- Network connection (perhaps provided by a Android device's mobile hotspot, Clearwire USB, etc.)
- Interface to acquire network connection from
- Wireless interface to share network connection to
- Device must be capable of doing this. Many aren't. Do your research.
- If you just want to share your connection over ethernet, it's easier than this, and you're reading the wrong document.
Do This
Install the package hostapd
Configure hostapd ( /etc/hostapd/hostapd.conf - change to your liking) :
# /etc/hostapd/hostapd.conf # 2012-07-14 Dan Rasmussen ( dan.rasmussen@gmail.com ) # for more information, see https://personaltelco.net/wiki/NetbookHotspot driver=nl80211 # interface below is the connection being shared, as reported by `ifconfig` in the console interface=wlan1 # ssid is the publicly visible network name. # use something besides www.personaltelco.net if you're testing this in eg a cafe or bar - # don't want people thinking we have broken nodes out there... ssid=NodeDanTest # Once you get the hotspot working, use "www.personaltelco.net" as your SSID. This # 1. advertises that others are welcome to connect to your hotspot # 2. advances the concept of network sharing #ssid=www.personaltelco.net # Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g, # Default: IEEE 802.11b hw_mode=g # might want to change channel so it doesn't conflict with channels in your area channel=9
run $ sudo hostapd -dd /etc/hostapd/hostapd.conf
- -dd shows lots of debugging info, which will be helpful in figuring this out
useful Linux commands: dmesg , lsmod , iwconfig , ifconfig , history, iw list
Following lines are guesswork. They don't lead to anything useful. Uncharted territory. Your suggestions are welcome!
- Install dnsmasq-base
Configure dns-masq-base. Lines that appear important (will require tweaking):
interface=wlan1 dhcp-range=wlan1,192.168.100.100,192.168.100.199,4h dhcp-host
That's it for now.
To Do
Research dnsmasq: https://help.ubuntu.com/community/Dnsmasq
- Note that the package "dnsmasq" interferes with Network Manager which can use "dnsmasq-base" to provide DHCP services when sharing an internet connection. Therefore, if you use network manager (fine in simple set-ups only), then install dnsmasq-base, but not dnsmasq. If you have a more complicated set-up, uninstall network manager, use dnsmasq, or similar software (bind9, dhcpd, etc), and configure things by hand.
More resources: http://wiki.debian.org/HowTo/dnsmasq , http://thekelleys.org.uk/dnsmasq/docs/FAQ
Figure out what, if anything, NetworkAddressAllocations has to do with this
Currently I'm set up as NodeDanTest. Keegan helped me find an address range (See the Subnets table where I'm "NodeDanTest" with a "Network (CIDR)" of 10.11.5.192/26. Look at the table in the Guidelines section. It lists Addresses = 62, CIDR bitmask = /26, Dotted-quad netmask = 255.255.255.192, and the PTP-related Notes column suggests, "for very busy nodes." The 62 addresses means 61 clients can be connected to my hotspot, because my hotspot will be one of those addresses.
Install the package "sipcalc", then plug in your address, eg $ sipcalc 10.11.5.192/26 to get back a lot of useful information! (add mention of sipcalc to NetworkAddressAllocations - it's a great resource)
- Further hints from Keegan that need implemented in this guide:
- The AP interface should be configured with an address from that range
- The DHCP server should be handing out other addresses in that range
- Gateway and DNS should be set to the address of the AP interface
Figure out how to apply PTP / custom SplashPage
- Some way to apply a download quota? In case upstream connection is e.g. a 4G connection with a 2 GB/month download cap. Might want to allow only (2 GB / # days in month node will be active) downloading per day node is deployed...
- Find places and events at which to deploy.