|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
OpenBSD Router & Wireless AP setup
I use OpenBSD-5.6 as a router and a desktop. Recently, I acquired TP-Link ATHEROS USB2.0 WLAN device and configured it as a wireless AP as mentioned in HOSTNAME.IF(5)
I wish to connect my cellphones and tablet to AP. I have two vether devices, one for routing and other for qemu tap network. I added athn0 to bridge interface but it does not work. Ifconfig - Code:
$ ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768 priority: 0 groups: lo inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet 127.0.0.1 netmask 0xff000000 re0: flags=28b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST,NOINET6> mtu 1500 lladdr 94:de:80:6c:e5:e1 priority: 0 groups: egress media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause) status: active inet 10.20.30.103 netmask 0xffffff00 broadcast 10.20.30.255 re1: flags=28b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST,NOINET6> mtu 1500 lladdr 94:de:80:6c:e5:e3 priority: 0 media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause) status: active enc0: flags=20000<NOINET6> priority: 0 groups: enc status: active athn0: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,NOINET6> mtu 1500 lladdr e8:de:27:20:1d:24 priority: 4 groups: wlan media: IEEE802.11 autoselect mode 11b hostap status: active ieee80211: nwid OpenBSD chan 2 bssid e8:de:27:20:1d:24 wpakey <not displayed> wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip vether0: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,NOINET6> mtu 1500 lladdr fe:e1:ba:d0:4c:c6 priority: 0 groups: vether media: Ethernet autoselect status: active inet 172.16.0.1 netmask 0xffffff00 broadcast 172.16.0.255 vether1: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,NOINET6> mtu 1500 lladdr fe:e1:ba:d1:04:6b priority: 0 groups: vether media: Ethernet autoselect status: active inet 10.0.2.0 netmask 0xff000000 broadcast 10.255.255.255 tun0: flags=29903<UP,BROADCAST,PROMISC,SIMPLEX,LINK0,MULTICAST,NOINET6> mtu 1500 lladdr fe:e1:ba:d3:4d:1e priority: 0 groups: tun status: no carrier bridge0: flags=20041<UP,RUNNING,NOINET6> groups: bridge priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp vether0 flags=3<LEARNING,DISCOVER> port 6 ifpriority 0 ifcost 0 vether1 flags=3<LEARNING,DISCOVER> port 7 ifpriority 0 ifcost 0 re1 flags=7<LEARNING,DISCOVER,BLOCKNONIP> port 2 ifpriority 0 ifcost 0 tun0 flags=7<LEARNING,DISCOVER,BLOCKNONIP> port 9 ifpriority 0 ifcost 0 athn0 flags=7<LEARNING,DISCOVER,BLOCKNONIP> port 5 ifpriority 0 ifcost 0 pflog0: flags=20141<UP,RUNNING,PROMISC,NOINET6> mtu 33144 priority: 0 groups: pflog Code:
$ cat /etc/hostname.athn0 up media autoselect mediaopt hostap mode 11b chan 6 nwid OpenBSD wpakey XXXXXXXXXX $ cat /etc/hostname.re0 dhcp -inet6 $ cat /etc/hostname.re1 up -inet6 $ cat /etc/hostname.vether0 inet 172.16.0.1 255.255.255.0 172.16.0.255 -inet6 $ cat /etc/hostname.tun0 link0 up $ cat /etc/hostname.vether1 inet 10.0.2.0 255.0.0.0 NONE $ cat /etc/hostname.bridge0 add vether0 add vether1 add re1 blocknonip re1 add tun0 blocknonip tun0 add athn0 blocknonip athn0 up -inet6 Code:
# cat /etc/pf.conf # $OpenBSD: pf.conf,v 1.53 2014/01/25 10:28:36 dtucker Exp $ # set limit states 100000 ext_if="re0" wi_if="athn0" int_if="vether0 re1 vether1 tun0 athn0" .......... set block-policy return set loginterface egress set skip on lo match in all scrub (no-df random-id max-mss 1440) match out on egress inet from !(egress:network) to any nat-to (egress:0) ...... Code:
$ netstat -rnf inet Routing tables Internet: Destination Gateway Flags Refs Use Mtu Prio Iface default 10.20.30.1 UGS 5 14559 - 8 re0 10/8 link#7 UC 0 0 - 4 vether1 10.0.2.0 fe:e1:ba:d1:f1:81 UHLl 0 0 - 1 lo0 10.20.30/24 link#1 UC 1 0 - 4 re0 10.20.30.1 c0:4a:00:4a:96:7d UHLc 2 1 - 4 re0 10.20.30.103 94:de:80:6c:e5:e1 UHLl 0 0 - 1 lo0 127/8 127.0.0.1 UGRS 0 0 32768 8 lo0 127.0.0.1 127.0.0.1 UH 9 76238 32768 4 lo0 172.16.0/24 link#6 UC 0 0 - 4 vether0 172.16.0.1 fe:e1:ba:d0:f4:4a UHLl 2 2853 - 1 lo0 224/4 link#1 UCS 0 0 - 8 re0 I see channel mismatch errors with netstat on athn0 - Code:
$ netstat -W athn0 ieee80211 on athn0: ...... 0 input packets with invalid channel 7932 input packets with mismatched channel Thanks! Last edited by chigurh; 19th February 2015 at 07:33 AM. |
|
|||
I'll be interested to see if this can be solved by someone. I was never able to get my WiFi AP to work in a similar vether/bridge configuration. I had to remove the wireless interface from the bridge and assign it an IP. Then everything worked fine.
Try that to start with, to eliminate some of the complexity from your configuration. |
|
|||
Quote:
Code:
$ ifconfig ............. athn0: flags=28843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NOINET6> mtu 1500 lladdr e8:de:27:20:1d:24 priority: 4 groups: wlan media: IEEE802.11 autoselect hostap (autoselect mode 11b hostap) status: active ieee80211: nwid OpenBSD chan 2 bssid e8:de:27:20:1d:24 wpakey <not displayed> wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip inet 172.16.0.200 netmask 0xffff0000 broadcast 172.16.255.255 Code:
$ cat /etc/hostname.athn0 inet 172.16.0.200 mediaopt hostap nwid OpenBSD wpakey XXXXXXXXXX |
|
||||
Hello, and welcome!
I have an athn(4) device that I have used as an AP once in a great while, and it has worked. There are two differences between my NIC and yours:
IS this AP 802.11g capable? Last edited by jggimi; 19th February 2015 at 06:01 PM. Reason: clarity |
|
|||
Quote:
More hardware detail - Code:
$ lsusb -v ....... Bus 000 Device 005: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 255 Vendor Specific Class bDeviceSubClass 255 Vendor Specific Subclass bDeviceProtocol 255 Vendor Specific Protocol bMaxPacketSize0 64 idVendor 0x0cf3 Atheros Communications, Inc. idProduct 0x9271 AR9271 802.11n bcdDevice 1.08 iManufacturer 16 ATHEROS iProduct 32 USB2.0 WLAN iSerial 48 12345 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 60 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 6 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x06 EP 6 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 255 Vendor Specific Class bDeviceSubClass 255 Vendor Specific Subclass bDeviceProtocol 255 Vendor Specific Protocol bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) I wish this somehow works so that I can remove ASUS AP; which is unreliable. I have a spare PCI WiFi card but I can not use that in this setup, planning to install dual port Intel gigabit PCI lan card there. My board, Gigabyte GA-C1007UN has a single PCI slot available. Thanks! Last edited by chigurh; 19th February 2015 at 07:00 PM. |
|
|||
For over a week I tried several things but creating a bridged interface with athn0 was impossible. It did not work with different subnet either.
I have now configured a spare ASUS router with openwrt firmware & setup a gateway pointing to OpenBSD router. |
|
||||
The usb athn(4) driver is currently undergoing some active development right now. This may not make the 5.7 window, as the release development cycle is in its final stage.
|
|
|||
That's good to know, as most of my laptop wifi cards are using that driver.
__________________
Linux since 1999, & also a BSD user. |
|
|||
Great news, thanks. There really isn't much option or scope for selection with wireless hardware and it hurts.
|
|
||||
Update -- after this set of patches for athn on USB, the athn(4) man page has this added to the BUGS section:
Quote:
|
|
|||
Alright, I will get a new device for Host AP mode.
|
|
|||
Quote:
sample http://www.ebay.ie/itm/PCI-E-PCI-Exp...item20f9c75478 Quote:
|
|
||||
Quote:
802.11a/b/g are supported. 802.11n requires significant revision to the the ieee80211(9) set of functions. |
Tags |
athn0, routing, wireless ap |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wireless Setup With AuthPF Help | EverydayDiesel | OpenBSD Security | 3 | 2nd July 2014 11:38 PM |
Help me setup my new router | Sonya | FreeBSD General | 8 | 16th July 2013 11:33 AM |
Question regarding wireless setup | stealintv | FreeBSD General | 5 | 19th September 2008 07:36 PM |
Connecting to wireless router | TomAmundsen | FreeBSD General | 19 | 25th August 2008 10:14 PM |
Wireless + wired = confused network setup | davidgurvich | FreeBSD General | 3 | 27th May 2008 06:10 PM |