802.1x Authentication on Wired Ethernet on Raspbian

Wed Mar 18 2015 12:11:00 GMT-0400 (EDT)

I pulled out my Raspberry Pi again to tinker with at work and needed to connect to the Internet to perform updates. Our wired network in the office uses 802.1X authentication for all connections. Here's how I was able to get it configured:

sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=0
network={
    key_mgmt=IEEE8021X
    identity="alex.cline"
    password="supersecretpassword"
    eap=PEAP
    eapol_flags=0
    phase1="peaplabel=1"
    phase2="auth=MSCHAPV2"
}
sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-driver wired
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
sudo wpa_supplicant -i eth0 -c /etc/wpa_supplicant/wpa_supplicant.conf -D wired &
# Wait until you see a message stating that authentication was successful.
sudo dhclient -nw eth0
fg CTRL^c

Obviously, there are a ton of options for 802.1X authentication, but these are the ones that worked for me.