DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th July 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default Wifi, network settings

I am confused, and even after reading the stickied topic :http://daemonforums.org/showthread.php?t=6245 , also 'man ifconfig', and more, still confused.

If I have the modem set to "security mode = none", then I have no problem connecting to the wifi, but as soon as I set the modem to "WPA2-PSK" , and set the "shared key= thispasswd "
(thispasswd) being the password, well then I can not connect, obviously sincee I need to use the password I set,..
This is my ifconfig , with out using any password :
Code:
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 0c:60:76:00:05:9f
	index 1 priority 4 llprio 3
	groups: wlan egress
	media: IEEE802.11 autoselect (HT-MCS7 mode 11n)
	status: active
	ieee80211: nwid Telcel-A757 chan 5 bssid 3c:cd:5d:2b:a7:57
In /etc/hosnames.athn0 it only says:
Code:
dhcp
My attempts at adding the password, and/or nwid, as mentioned in the above thread I link
to
Quote:
If you need to clear a prior WEP key or WPA passphrase, add the -nwkey or -wpakey operands to your ifconfig command.
I also tried editing "hostnames.athn0", but no luck,... I did have this working before, a long time ago, but last night I installed the newest openbsd , to the laptop, and can not remember how I had set it up before, and like a dummy, I did not make a copy of my old settings, it seems like when I did it before it was easy, maybe I am getting "senile" but can not seem to figure it out this time.
Thanks
__________________
My best friends are parrots
Reply With Quote
  #2   (View Single Post)  
Old 25th July 2019
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,262
Default

Quote:
wpaciphers cipher,cipher,...
Set the comma-separated list of allowed pairwise ciphers.

The supported values are “tkip”, “ccmp”, and “usegroup”.
usegroup specifies that no pairwise ciphers are supported and
that only group keys should be used. The default value is
“ccmp”. If multiple pairwise ciphers are specified, the pairwise
cipher will be negotiated between the station and the access
point at association time. A station will always try to use ccmp
over tkip if both ciphers are allowed and supported by the access
point. If the selected cipher is not supported by the hardware,
software encryption will be used. Check the driver's manual page
to know which ciphers are supported in hardware.

wpagroupcipher cipher
Set the group cipher used to encrypt broadcast and multicast
traffic.

The supported values are “wep40”, “wep104”, “tkip”, and “ccmp”.
The default value is “ccmp”. The use of tkip or wep40 or wep104
as the group cipher is discouraged due to weaknesses in TKIP and
WEP. The wpagroupcipher option is available in Host AP mode
only. A station will always use the group cipher of the BSS.
I had a similar problem when CCMP was made the default cipher. My wireless access point was using TKIP, and like you, I could not connect. Setting the router cipher to CCMP solved my problem.
Reply With Quote
  #3   (View Single Post)  
Old 25th July 2019
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,737
Default

Garry, for clarity, let's consider your wireless NIC during boot, after the kernel has finished its booting scan but before your hostname.athn0 file has been read by netstart(8), which gets called by rc(8). This is the same state if there is no hostname.athn0 file:

  • There is no network SSID assigned. (That's the "nwid" in OpenBSD-speak.)
  • There is no WEP key assigned. (That's the "nwkey" in OpenBSD-speak.) This is an older, insecure encryption mechanism, still supported for older Wifi access points that are too old to support WPA or WPA2.
  • There is no WPA/WPA2 pre-shared key assigned. (That's the "wpakey" in OpenBSD-speak.)
If you want to use a WPA2 pre-shared key of "thispasswd" with an SSID of Telcel-A757, on the OpenBSD side, one possible ifconfig(8) command to set these would be:

# ifconfig athn0 nwid "Telcel-A757" wpakey "thisspasswd"

Then, to start the DHCP client, one could issue the command:

# dhclient athn0

These two manual commands may start WiFi network communication, using WPA2 encryption.

These same commands will be executed by netstart(8) if they are provisioned in hostname.athn0, such as:

Code:
nwid "Telcel-A757" wpakey "thispasswd"
dhcp
There are many possible reasons for failure. As shep has noted, authentication protocols, key management protocols, and the various permitted ciphers need to be in alignment. But let's make sure you are configuring the OpenBSD NIC properly before investigating those.
Reply With Quote
  #4   (View Single Post)  
Old 25th July 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default

Thanks, both, what you show jggimi, worked perfectly,...I knew it was pretty simple,..but just could not remember, any way, great now we have a good working example here, and I am going to save the instruction to a file as well,.. thanks
P.S. also edited the hostname.athn0 files with the changes, so it should work when Iboot again.
__________________
My best friends are parrots

Last edited by PapaParrot; 25th July 2019 at 02:50 AM.
Reply With Quote
  #5   (View Single Post)  
Old 25th July 2019
ibara's Avatar
ibara ibara is offline
Real-life IT professor
 
Join Date: Jan 2014
Posts: 717
Default

If you're using hostname.<if> you should use the new syntax:
Code:
join my-router wpakey my-password
dhcp
Reply With Quote
  #6   (View Single Post)  
Old 25th July 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default

Thanks, I was looking into that, one thing that has me confused, do I need to make a file named :
hostname.if ? At this time I have no file named "hostname.if" or is the "if",just meaning the interface, IE:
mine : athn0
__________________
My best friends are parrots
Reply With Quote
  #7   (View Single Post)  
Old 25th July 2019
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,737
Default

The hostname.if(5) man page describes these files. The file names we use are "hostname.<NIC driver and number, as shown in ifconfig(8) or dmesg(8) output>"
Reply With Quote
  #8   (View Single Post)  
Old 25th July 2019
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 413
Default

Ok, thanks, I looked at it,(The hostname.if(5) man page) actually had before,
Quote:
Each line is processed separately and in order. For example:

[code] nwid mynwid wpakey mywpakey
inet6 autoconf
dhcp [/qode]
And I think, part of where I was confused, or going wrong is in the example they show, they do not use " " like you did in your example:
Code:
nwid "Telcel-A757" wpakey "thispasswd"
dhcp
Before I was saying it like this:
Code:
nwid mynwid wpakey thispasswd
So I had 2 things wrong, I needed the Telcel-A757, instead of mynwid, and also apparently needed the quotation marks " , any way, it works now, like you showed. Thanks again,
__________________
My best friends are parrots
Reply With Quote
  #9   (View Single Post)  
Old 25th July 2019
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,737
Default

The quotation marks can be helpful if you have any special characters in strings, and your SSID ("nwid" in OpenBSD) has a hyphen in it.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alix3d2 + Mikrotik R52nM Wifi Access point network performance jkusniar OpenBSD General 3 13th January 2015 07:59 AM
/etc/ppp settings for Earthlink shep OpenBSD General 3 24th December 2009 04:17 AM
please help me understand wpa settings gosha OpenBSD General 1 14th July 2009 11:37 AM
NetBSD 5.0 wifi/wireless network browser/scanner vermaden NetBSD General 9 5th July 2009 12:56 AM
Network settings guitarscn OpenBSD General 13 18th February 2009 01:45 AM


All times are GMT. The time now is 12:13 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick