From owner-freebsd-questions@freebsd.org Thu Mar 16 16:36:01 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B485BD0FB92 for ; Thu, 16 Mar 2017 16:36:01 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B56D1712 for ; Thu, 16 Mar 2017 16:36:01 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by mail-it0-x233.google.com with SMTP id w124so5150111itb.0 for ; Thu, 16 Mar 2017 09:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-transfer-encoding; bh=IEt2N0lqxNp8Gd5e8jIqqAvWh7+oEh/cEswjUfC3nA4=; b=qWNV8VDj/kkk203wNMdlVC6nhJ/WDv5IuA9rj3oRxKfHhJkfhKuxpN9pc9OaL9hqVP 0YoXySO+HVZdk92NOwRoh6Xj41cdD3Ke3kwZ/k3yWwkCd7Aq5StdqySkg02XrT2b0pdy NfOtdK3pjO5uWlGXiT2UzEFU0lYjGVBICxySzsVH4/LoXKrPqYhKF22XERGmMofAPArh R+7NcBUSX9dd6X+yUyyA2gyRkDGSb7anXY3PNQCwuOcdGmK2cjwFM2j2b5MWgmOn18qp 6N+vzH6suSzMr7a02uQyMy+z38Yk4BdiXxPc2wyCIKae2YRWPfuibqcWRCK1CDKcliCQ sfuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-transfer-encoding; bh=IEt2N0lqxNp8Gd5e8jIqqAvWh7+oEh/cEswjUfC3nA4=; b=rvtDHsQxc/BPVTJ7/pG/dvGAkzI+IUvYQsanpX5B+UwI7iUFeKNK3GTkp+r/sv7S+0 Lb1P2XbwdmWL34KPLVKlAY2r1E+CPCeRzj+BguIlIQmuJ8wpM7uZ7ZPlkatFsjtQcAw0 uixaDpAnymOnYtmbh4b5n4NxgFxdNiMrtsEgjhc34X0MIzc/Ttpz4dbvUNAN/KjQYAnk fiBmPyklJ4kVwOVx2F640+KOf2XvbuKphu11+WzLeCFTBII6tMTOEnZNqDOWxD/QHPKi 6il+Dlv99C5YkOwlQFvq4HQa1FSFXWVBYAMXR1Ej36sjHbuf92pyXAeLlHbM6BfKSkaH ajlA== X-Gm-Message-State: AFeK/H128Z6aBn9TKUDFM4n5rkstlG2wHLUufszQK8KfHCU0z+zX19Yffmo8yOQgsImnKQ== X-Received: by 10.36.79.15 with SMTP id c15mr27632788itb.98.1489682160735; Thu, 16 Mar 2017 09:36:00 -0700 (PDT) Received: from [10.0.10.3] (cpe-74-141-88-74.neo.res.rr.com. [74.141.88.74]) by smtp.googlemail.com with ESMTPSA id l188sm3156554ioa.35.2017.03.16.09.35.59 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Mar 2017 09:36:00 -0700 (PDT) Message-ID: <58CABF15.3070800@gmail.com> Date: Thu, 16 Mar 2017 12:36:37 -0400 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: WIFI as access point References: <58C08444.8060600@gmail.com> <58C17FEB.1020905@FreeBSD.org> <58C96961.9010804@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 16:36:01 -0000 >> >> Hello List; >> >> I have this wifi card >> http://www.dlink.com/al/sq/products/dwa-556-xtreme-n-pci-express-desktop-adapter >> >> I recovered it from a decommissioned win7 box. On win7 this wifi card >> could only be used to connect to a router access point. >> > This card is fully support by ath driver as "AR5418 Wireless Network > Adapter". Complete examples with various AP setup described in > manual page for the ath driver. > Thank you to all who replied. This is for the archives. I have successfully gotten this wifi card to work in "access point" mode. I am posting the solution for others who may have the same problem. /root >cat /etc/rc.conf Snip gateway_enable="YES" ifconfig_em0="DHCP" ifconfig_vge0="inet 10.0.10.2" # Wifi in hostapt mode wlans_ath0="wlan0" create_args_wlan0="wlanmode hostap" ifconfig_wlan0="inet 10.200.200.1 netmask 255.255.255.0 ssid FBSD_AP mode 11ng channel 2" hostapd_enable="YES" The IP address you assign here is not just something you guess at. It has to be the end point ip address defined in dhcp. Using "mode 11ng channel 2" stopped the "ath0: stuck beacon; resetting (bmiss count 4)" message. It also gaves a connection speed of 150 Mbps dhcpd_enable="YES" dhcpd_conf="/usr/local/etc/dhcpd.conf" dhcpd_ifaces="vge0 wlan0" dhcpd_flags="-q" The host dhcp server must be told to service both the wired LAN (vge0) and the wifi LAN (wlan0) interfaces. /root >cat /usr/local/etc/dhcpd.conf # This is the WIFI subnet declaration. # Max of 14 pc on WIFI network 10.200.200.1 - 10.200.200.14 # 10.200.200.1 wifi card ip address subnet 10.200.200.0 netmask 255.255.255.240 { range 10.200.200.2 10.200.200.14; option routers 10.200.200.1;} /root >cat /etc/hostapd.conf # Note1 There can not be any white space after wlan0 interface=wlan0 debug=2 ctrl_interface=/var/run/hostapd ctrl_interface_group=wheel ssid=FBSD_AP wpa=2 wpa_passphrase=test # Note2 "WPA-PSK" & "TKIP CCMP" are upper case letters wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP CCMP Your Firewall has to be configured to perform NAT on the IP address block you defined in dhcp. Rebooting the system synced things together better than just restarting the network using /etc/rc.d/netif/restart. Rebooting made problems I was having just vanish. If you try to have another PC do a wifi connect at this point, it will get a connection with your Freebsd wifi access point, but no internet access. I was stuck at this point for a long time. I finally added a firewall rule to log all traffic on the wlan0 interface. That's when I saw the igmp multcast packets going to ip address 224.0.0.22. This behavior is not documented any where. Adding the following rule to my IPF firewall got my wifi network access point accepting client wifi connections and providing public internet access with 150Mbps connection speed. IPF firewall rule # Allow out access for WIFI check for public internet access. pass out quick on em0 proto igmp from any to 224.0.0.22 keep state You can use this command to see the wifi access point connections. ifconfig wlan0 list sta