View Single Post
  #4   (View Single Post)  
Old 22nd February 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Is your network connection WiFi?

It was recently brought to my attention that because WiFi connections are not automated in my scripts, this may be an issue for those new to the OS. Wired Ethernet connections are automated, as long as the connection is physically made before booting.

To enable a WiFi, DHCP connection:

1. Discover the name of the attached WiFi NIC driver:

$ ifconfig

This will list all of the network interfaces, including pseudo devices like lo0 and pflog0. If you have both wired and wireless NICs, look for a NIC with an associated "nwid" field -- the SSID.

2. Define your SSID to attach to, and associated security key if used:

Open network:
# ifconfig <nic> nwid <SSID>

WPA/WPA2 with pre-shared key:
# ifconfig <nic> nwid <SSID> wpakey <passphrase>

WEP:
# ifconfig <nic> nwid <SSID> nwkey <key>

3. Request a TCP/IP configuration from the DHCP server on your LAN:

# dhclient <nic>

----

For more information, please refer to OpenBSD FAQ 6 and these man pages: ifconfig(8) and dhclient(8).

Last edited by jggimi; 22nd February 2012 at 01:05 PM. Reason: clarity
Reply With Quote