I want to connect to a wireless network (no password needed)

I tried this 

    sudo iwconfig wlan0 essid network-essid

and tried this, in `/etc/network/interfaces`

    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet dhcp
           wpa-ssid ="network-essid"

but `ifconfig` still shows

    wlan0     Link encap:Ethernet  HWaddr e8:94:f6:16:7f:f1  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)