iwconfig works, but ifup does not
I have minimal debian wheezy installation on my laptop, and I am trying to get wifi working via the command line. I have wifi working at home where I use WPA2 with the entry
iface wifi_home inet dhcp
wpa-ssid "Home Network"
wpa-psk "Home Password"
in /etc/netowrk/interfaces. I use the command 'sudo ifup wlan0=wifi_home'. However, my university wifi does not use secure wifi. So I tried the entry
iface wifi_school inet dhcp
wireless-essid "School Network"
but 'sudo ifup wlan0=wifi_school' fails to get a dhcp lease. The odd thing is that at school the commands
sudo ip link set wlan0 up
sudo iwconfig wlan0 essid "School Network"
work perfectly. Any idea where I have gone wrong? I assume my entry for wifi_school is incorrect, but it matches the guides I have found on the web. Any help is appreciated. I think I just need to RTFM, but I can not seem to find the right FM. So a link would be most appreciated.