How to connect linux wpa_supplicant to Virgin Media wifi hostspots

This is a basic guide which may vary depending on your flavour of linux for connecting to WPA2 enterprise encrypted hotspots with ssid Virgin Media.

1. You'll need a working username (email address) for virgin media - either your account login or an email address provided by virgin media.

2. edit /etc/wpa_supplicant.conf as follows:

network={
    ssid="Virgin Media"
    key_mgmt=WPA-EAP
    eap=TTLS
    identity="vmedwifi/YOUREMAIL@ADDRESS.HERE"
    password="secretpassword"
    phase2="auth=MSCHAPV2"
}

3. Replace identity and password fields as appropriate.

4. start wpa_supplicant from the command line.

5. Get an ip address with dhclient -4 IF

I believe only one concurrent login works at a time but your mileage may vary.
bssid=5x:xx:xx:xx:xx:xx might come in handy if there are a lot of Virgin Media hotspots in the area.

Technical note

Once authentications through VM radius server and connected with dhcp, you'll get a NAT ip address locally on 10.x.x.x/16.
This will correspond to a routable ip address which could be registered anywhere in the country, not
necessarily within the ip range used by the AP your connecting through.

Thanks to Neil Alexander. for the initial work on this.