IllinoisNet Wireless – netcfg

IllinoisNet Wiress using netcfg on Arch

netcfg is used to configure and manage network connections via profiles. It has pluggable support for a range of connection types, such as wireless, ethernet, ppp. It is also capable of starting/stopping many to one connections, that is, multiple connections within the same profile, optionally with bonding.

I’m going to assume you’ve already installed the drivers for your wireless card and wpa_supplicant. These instructions are Arch specific but can probably be ported to other systems with netcfg installed. This page is based on the Netcfg page located at the Arch Wiki. It has been modified to include information specific for IllinoisNet at UIUC.

First we’ll install netcfg

# pacman -S netcfg

Now create a file “IllinoisNet” in /etc/network.d/ with the following content using your favorite text editor:

CONNECTION="wireless"
INTERFACE=wlan0
SECURITY="wpa-configsection"
ESSID="IllinoisNet"
IP="dhcp"
CONFIGSECTION='
    ssid="IllinoisNet"
    key_mgmt=WPA-EAP
#    eap=TTLS
    eap=PEAP
    group=CCMP
    pairwise=CCMP
    identity="<YOUR NETID>"
    password="<YOUR AD PASSWORD>"
    priority=1
#    phase2="auth=PAP"
    phase2="auth=MSCHAPV2"
'

Note: elsewhere on this wiki it has been suggested that TTLS be substituted for PEAP for non-Windows boxes. Unfortunately, I haven’t tried this as I was in a bit of a hurry to get secured wireless access.

If you are afraid of this file being readable (to anyone with access to your box) make sure you set the permissions to 0600.

# chmod 0600 /etc/network.d/IllinoisNet

Check if it’s working:

# netcfg IllinoisNet

It should succeed with “Done” or similar. If anything else pops up search the Arch Wiki or Arch forums using Google.

You might also want to setup a wired Profile just in case you want to bring along an ethernet cord. The default one should work.

# cd /etc/network.d/examples/
# cp ethernet-dhcp ../wired

If you’ve switched to systemd (do it!) you now have to configure networks (and everything else) outside of rc.conf. Modify/create the file /etc/conf.d/netcfg with the following contents:

NETWORKS=(IllinoisNet wired)

Now, enable netcfg at startup:

# systemctl enable netcfg

If you’re not using systemd (:o) you’ll need to edit /etc/rc.conf. Add the following lines (somewhere near similar lines)

. . . 
'wlan0=dhcp'
INTERFACES=( . . . wlan0)
NETWORKS=(IllinoisNet wired)
. . .
DAEMONS=( . . . net-profiles)

You might also want to disable the network daemon (in rc.conf), since it’s no longer necessary.

DAEMONS=( . . . !network . . .)

Now when you reboot you should automagically connect to IllinoisNet, if it’s available! 🙂