Wi-Fi access point with WPA based on EEE 701

    I decided to find a wireless router with the ability to install additional software. I immediately remembered about the ASUS WL-500gP and the like. But since 3k is not superfluous, and there was an itch in one place, I undertook to configure everything on the basis of the ASUS EEE 701 netbook (I left it without a display, so it’s not a problem to use it as a router).
    I began by soldering an external antenna, instead of one of the internal ones in EEE.

    I chose FreeBSD 8.1 because in terms of hardware support, the installation of additional drivers was not required, unlike previous versions of the freak.

    All network interfaces were identified and worked immediately after installation: re0 - Ethernet 10/100 Mbit ath0 - Wireless Ethernet

    re0: flags=8843 metric 0 mtu 1500
    options=2018
    ether 00:00:00:00:00:00
    status: no carrier
    ath0: flags=8843 metric 0 mtu 2290
    ether 00:00:00:00:00:00
    status: no carrier




    Core


    To start, we rebuild the kernel, adding to it: to bring the Wireless NIC cards section to the following form:

    device wlan_acl



    device wlan # 802.11 support
    options IEEE80211_DEBUG # enable debug msgs
    options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
    options IEEE80211_SUPPORT_MESH # enable 802.11s D3.0 support
    device wlan_wep # 802.11 WEP support
    device wlan_ccmp # 802.11 CCMP support
    device wlan_tkip # 802.11 TKIP support
    device wlan_amrr # AMRR transmit rate control algorithm
    device wlan_acl
    device an # Aironet 4500/4800 802.11 wireless NICs.
    device ath # Atheros pci/cardbus NIC's
    device ath_hal # pci/cardbus chip support
    options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors
    device ath_rate_sample # SampleRate tx rate control for ath
    device ral # Ralink Technology RT2500 wireless NICs.
    device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
    #device wl # Older non 802.11 Wavelan wireless NIC.


    rc.conf


    To configure the ath0 wireless interface as an access point, add the following to rc.conf: Thus, we get the work of a wired and wireless connection on the same subnet.

    ifconfig_re0="up"
    # создаем виртуальный беспроводной интерфейс для ath0
    wlans_ath0="wlan0"
    # выбираем режим работы виртуального интерфейса
    create_args_wlan0="wlanmode hostap"
    ifconfig_wlan0="mode 11g ssid TEST mediaopt hostap up"
    cloned_interfaces="bridge0"
    ifconfig_bridge0="inet 172.16.1.1 netmask 255.255.255.0 addm re0 addm wlan0 up"




    hostapd


    Since I use WPA, I need an authenticator.
    We create the file /etc/hostapd.conf and add to it: This is the minimum I need for the access point to work with WPA. The rest is available in man hostapd and man hostapd.conf . Do not forget to add hostapd_enable = "YES" to rc.conf.

    # беспроводной интерфейс
    interface=wlan0

    logger_syslog=-1
    logger_syslog_level=2
    logger_stdout=-1
    logger_stdout_level=2
    # Режим отладки: от 0 до 4
    debug=0

    dump_file=/tmp/hostapd.dump
    # не забываем создать директорию для сокетов
    ctrl_interface=/var/run/hostapd
    ctrl_interface_group=wheel
    # указываем такое же название, как и в rc.conf
    ssid=TEST

    # 1 - WPA1; 2 - WPA2; 3 - WPA1+WPA2
    wpa=3
    # ключ WPA (не менее 8 символов)
    wpa_passphrase=12345678
    # алгоритм управления
    wpa_key_mgmt=WPA-PSK
    # указываем алгоритмы шифрования
    wpa_pairwise=TKIP CCMP





    Completion


    We reboot and see that the interface works in AP mode:

    re0: flags=8943 metric 0 mtu 1500
    options=3898
    ether 00:00:00:00:00:00
    media: Ethernet autoselect (1000baseT )
    status: active


    ath0: flags=8843 metric 0 mtu 2290
    ether 00:00:00:00:00:00
    media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
    status: running


    wlan0: flags=8943 metric 0 mtu 1500
    ether 00:00:00:00:00:00
    media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
    status: running
    ssid TEST channel 7 (2442 MHz 11g) bssid 00:00:00:00:00:00
    regdomain 32924 country CN indoor ecm authmode WPA1+WPA2/802.11i
    privacy MIXED deftxkey 3 TKIP 2:128-bit TKIP 3:128-bit txpower 20
    scanvalid 60 protmode CTS wme dtimperiod 1 -dfs


    bridge0: flags=8843 metric 0 mtu 1500
    ether 00:00:00:00:00:00
    inet 172.16.1.1 netmask 0xffffff00 broadcast 172.16.1.255
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    member: wlan0 flags=143
    ifmaxaddr 0 port 9 priority 128 path cost 370370
    member: re0 flags=143
    ifmaxaddr 0 port 1 priority 128 path cost 55


    Conclusion


    Cons:

    - the price of a netbook is much higher than the price of a regular router
    - in contrast to the ASUS WL-500g wireless router mentioned above, EEE 701 has only 1 LAN port, which makes it available only via Wi-Fi, as a provider cord is plugged into this port.
    To connect machines to it via LAN, I need a rather rare USB-LAN device, which I have. But the problem is that the USB ports on the netbook work in full speed mode (I don’t know how to translate to high speed yet), and it makes no sense to use a wired connection at a speed of 12 Mbps :)

    Pluses:

    - definitely - this is more powerful hardware
    - the ability to install additional software (OpenVPN, rttorrent, apache) and other delights of FreeBSD
    - autonomous operation from the battery for at least 1 hour (in case of a power outage)

    Also popular now: