# University network [SOLVED]

## isilia

Hey guys, first day with my laptop in uni today. The thing is, I don't have the slightest idea about how to connect to the internet from Gentoo, I'm currently running Ubuntu (>.<) until I get it fixed. I'd do a google search but I'm a bit short on time right now, so I'm hoping you can help. The school is running WPA enterprise and every student has to log in with their own username and password. The EAP-methode is PEAP apparently, but that was set automatically so I have no idea if that is being used.

I'd like to simply add the school's network information to my /etc/conf.d/net. This is what it looks like now:

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "iwconfig" )

key_Gentoo="[1] DB8F4F683E key [1] enc open"

key_linksys="[1] enc open"

preferred_aps=( "ESSID1" "ESSID2" "ESSID3" "ESSID4 "ESSID5" )

Hopefully you can help me out, once again sorry for not doing any research myself but I'm short on time to get this working.Last edited by isilia on Mon Sep 08, 2008 1:18 pm; edited 2 times in total

----------

## muhsinzubeir

last time i used gentoo with a laptop, i had networkmanager to handle little details for me...you can have a wiki for it if you google...

but thats not for now you will need to get back home and do that, or get a cable and set it up....

sorry that this isnt that helpful rightway  :Smile: 

----------

## MorpheuS.Ibis

for WPA you need wpa_supplicant

EDIT: is the network part of eduroam?

----------

## isilia

I'll compile that then, I'm at home now, so I got about a week to set up networking (and this wretched Windows only chemistry program), yay.

And the network is not part of eduroam.

Thanks so far, lets hope I can figure things out myself with wpa_supplicant.

----------

## depontius

In /etc/conf.d/net.example there should be lines showing how to get wpa_supplicant hooked in.  I'm not sure where the key_Gentoo, key_linksys, and preferred_aps lines came from.  However, obviously at the moment you have nothing in "/etc/wpa_supplicant/wpa_supplicant.conf".  In the past they've had quite an illustrative sample, but I haven't looked at it lately.  The particulars for you university setup need to go in there.

One note is that there's a program "wpa_gui" that give you your current wireless status, as well as scan for access points and let you select one for connection.  It's also worth noting that wpa_supplicant is "opportunistic" and will automagically connect to whatver it can find in wpa_supplicant.conf.

----------

## jeanfrancis

Hi there !

Well, once wpa_supplicant installed, it should be started when you start your wireless interface (my /etc/conf.d/net is blank... but you may need to follow net.example recommendations for wpa_supplicant module).

Then, you can use the wpa_gui command to scan the networks, select the correct one, and usually the correct options are already selected (WPA-EAP w/ LEAP or PEAP, etc.). Once you manage to connect to it, note the correct options.

If it can help, here is my wpa_supplicant.conf, with my university's options :

```

network={

        ssid="your_university's_ssid"

        scan_ssid=1

        key_mgmt=WPA-EAP

        eap=LEAP

        identity="yourusername"

        password="yourpassword"

        ca_cert="/etc/cert/ca.pem"

        phase1="peaplabel=0"

        phase2="auth=MSCHAPV2"

}

```

----------

## isilia

Oh great, that configuration should help loads! (I've been messing with wpa_supplicant most of the day >.>) I'll try it out on Monday and let you know.

----------

## depontius

While you're at it, my wireless section from /etc/conf.d/net that calls out wpa_supplicant:

```
config_ath0=( "dhcp" )

# To choose wpa_supplicant over iwconfig

modules=( "wpa_supplicant" )

#Don't start automatically

modules_ath0=( "!plug" )

wpa_supplicant_ath0="-Dwext" # For generic wireless

#wpa_supplicant_ath0="-Dmadwifi" # For Atheros based cards
```

I've got an Atheros card, and had been using Madwifi, but recently started playing with the new in-kernel ath5k driver.  This is on a wired/wireless laptop that is frequently wired.  When it's not wired, ifplugd would automatically attempt a wireless connection if I didn't have that "!plug" in there.  When the laptop is not on a leash, I only want a manually-initiated wireless connection.

----------

## BrummieJim

If you're using eduroam, this works for me.

network={

               ssid="eduroam"

               key_mgmt=WPA-EAP IEEE8021X NONE

               pairwise=TKIP CCMP

               group=TKIP CCMP WEP104 WEP40

               eap=PEAP TTLS TLS

               identity="your log in"

               password="password"

	       priority=500

}

----------

## isilia

Well, it's not working. When I run /etc/init.d/net.wlan0 start, it scans for networks, finds my school's and then tells me there isn't a valid WEP key (it's wpa) and can't connect. I think it won't read my wpa_supplicant configuration.

Here's /etc/conf.d/net:

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dndiswrapper"

key_Gentoo=( "DB8F4F683E enc open" )

key_linksys=( "enc open" )

and here's etc/wpa_supplicant/wpa_supplicant.conf:

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

ctrl_interface=/var/run/wpa_supplicant

ap_scan=1

network={

        ssid="Hogeschool Zuyd"

#       scan_ssid=1

        key_mgmt=WPA-EAP

        eap=LEAP

        identity="<username>"

        password="<password>"

#       phase1="peaplabel=0"

#       phase2="auth=MSCHAPV2"

}

----------

## isilia

I met another Linux geek who happened to be sitting next to me in chemistry class, he couldn't connect to the uni network either. After a bit of tweaking we found that this configuration works for him:

```
ctrl_interface=/var/run/wpa_supplicant

ap_scan=1

network={

        ssid="Hogeschool Zuyd"

        scan_ssid=1

   proto=WPA

        key_mgmt=WPA-EAP

        eap=PEAP

        identity="<username>"

        password="<password>"

   pairwise=TKIP
```

No suck luck for me though, all I get is an error. It says something along the lines of wireless scanning being timed out and then it assigns itself (or gets assigned? It's a really odd address to assign on time out) an IP address (192.168.x.xxx). I'll post the exact error as soon as I am able to reproduce it.

In the meanwhile, how do I check that my laptop is actually using wpa_supplicant (see last my post for my /etc/conf.d/net file)?

----------

