2

I'm trying to connect my OpenBSD 5.8 laptop to a wireless network at home (cell phone hotspot).

Note that the status says "no network" from ifconfig. The netmask and default gateway address I took from my Windows computer which is on the same network.

$ ifconfig iwi0
iwi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr: 00:aa:bb:cc:ff:ee
priority: 4
groups: wlan egress
media: IEEE802.11 autoselect
status: no network
ieee80211: nwid mynetwork wpakey <not displayed> wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip 100dBm

The route show command sometimes takes about 30 seconds before displaying anything, which is not comforting. Sometimes it is immediate.

$ route show -inet
Routing tables

Internet:
Destination        Gateway           Flags  Refs   Use   Mtu   Prio Iface
default            192.168.43.1      UGS    0      10    -      12   iwi0
loopback           localhost       ...
localhost          localhost          ...
192.168.43/24      192.168.43.109    UC      1     0     -      12   iwi0
192.168.43.1       link#2            UHLc    1     0     -      12   iwi0
192.168.43.109     00:aa:bb:cc:ff:ee UHL1    0     0     -      1    lo0
192.168.43.255     192.168.43.109    UHb     0     0     -      1    iwi0
BASE-ADDRESS.MCAST localhost         URS     0     0 32768      8    lo0

The above is the configuration right after boot time.

This next file is what sets the iwi0 interface parameters. It is the same as a previous, working, wireless interface config file I used, with only the ip address name and details changed for the new network.

$ cat /etc/hostname.iwi0
nwid mynetwork
wpakey 123456589
inet 192.168.43.109 255.255.255.0 192.168.43.255
!route delete default 
!route add default 192.168.43.1

The network is available

$ ifconfig iwi0 scan | grep mynetwork | tail -1
          nwid mynetwork chan 11 bssid aa:bb:cc:dd:ee:ff 76dBm 54M privacy,short_preamble,short_slottime,wpa2

And yet, no sign of any outgoing traffic from my wireless interface

$ tcpdump -i iwi0 &
[1] 19019
$ tcpdump: listening on iwi0, link-type EN10MB
$ ping -c 3 192.168.43.1
PING 192.168.43.1 (192.168.43.1): 56 data bytes
------ 192.168.43.1 ping statistics -----
3 packets transmitted, 0 packets received, 100.0% packet loss
$ fg
tcpdump -i iwi0
^C
0 packets received by filter
0 packets dropped by kernel

Sometimes when running ping, I get the following errors also:

$ ping 192.168.43.1
PING 192.168.43.1 (192.168.43.1): 56 data bytes
ping: sendto: Host is down
ping: wrote 192.158.43.1 64 chars, ret=-1

traceroute has no luck finding even a first hop, and outputs the same sendto: Host is down error.

I got similar results when I try setting up the network from scratch (without the hostname.iwi0 file, just using ifconfig and route add commands), which resulted at some point in ifconfig showing network: active, but still I remained unable to ping the router.

Why is there no apparent route to the wireless router, or where can more useful details about the error be found?

What should be modified to create a path to the wireless router?

  • A lot of these problems would go away if you'd configure the router to give you an IP via DHCP, and then configure hostname.iwi0 to use it. If you search around, you can also find pages describing how to set up bridging to use a wired connection when available, and fallback to Wi-Fi otherwise. In neither case you should mess with routing explicitly. – Satō Katsura Jul 11 '16 at 19:19
  • Aren't you missing the wpa option on hostname.iwi0 and/or ifconfig? As in ifconfig iwi0 nwid ... *wpa* wpakey ... – Zé Loff Jul 15 '16 at 17:44
2

I'm trying to connect my OpenBSD 5.8 laptop...

I recommend upgrading to 5.9—wireless has been improved here.

The netmask and default gateway address I took from my Windows computer which is on the same network.

Have you tried using DHCP instead? For example:

$ cat /etc/hostname.iwi0
dhcp NONE NONE NONE nwid id wpakey passphrase

The route show command sometimes takes about 30 seconds before displaying anything...

This is likely due to failed DNS lookups—try route -n.

And yet, no sign of any outgoing traffic from my wireless interface...

Have you confirmed your default gateway responds to pings?

  • Did try DCHP, currently trying variations on it but no success or progress so far . Router does respond to pings, confirmed via Windows machine. Guess I'll try upgrading as you suggest, as I'm not sure what else to try at this point. Do you know where to get any more details about "status: no network" – hilcharge Jul 12 '16 at 14:06
  • In any event, according to tcpdump, the packets don't seem to even be making it to the wireless card let alone to the router – hilcharge Jul 12 '16 at 14:18
  • status: no network usually means you’re not connected to the access point. – Bink Jul 12 '16 at 17:55
  • haha yes not connected.. figured as much :), but where are relevant logs for whether it tried to connect, what went wrong, etc? Tried upgrading to 5.9, got some fatal iwi0 firmware errors, and found out from readlist.com/lists/openbsd.org/misc/34/170676.html that iwi(4) was "accidentally broken" in 5.9, but can be fixed by building the -stable kernel from source. My kingdom for a LAN connection right now. – hilcharge Jul 13 '16 at 13:45
  • Unfortunately, I don’t think there are any logs—you could try manually configuring your wireless interface while using ifconfig debug. – Bink Jul 13 '16 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.