wifi unstable increasing interface number

I am using Ubuntu on Beagleboard rev c5. I was able to configure wpa_supplicant and connect to the network, however after working for an hour or so the network became unstable. It started dropping packets and started taking a longtime to reassign ip address. (sudo dhclient wlan0 used to work very smoothly). My Edimax wifi dongle had developed a small crack so I though that might be the issue. So I ordered new dongle and tried to make it work. It recognized the interface however as wlan8 (instead of wlan0) and the system started working fine. However again after a couple of hours there was a problem with ip address renewal (it would take a few minutes before it could get an ip address) and after a few boots it is now recognizing wlan card as wlan9 and then wlan10.The chipset is 8192cu.

In between I also saw the following messages while trying to get an IP address. RTNETLINK answers: file exists. On other ocassions it automatically tired to ping 192.168.1.254 and then failed. Following are my settings for /etc/network/interfaces

auto lo
iface lo intet loopback

auto wlan8
iface wlan8 inet dhcp
pre-up wpa_supplicant -Dnl80211 -iwlan8 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
post-down killall -q wpa_supplicant

Following is wpa_supplicant.conf
ctrl_interface = DIR=/run/wpa_supplicant
ap_scan = 1

network ={
ssid = " "
psk = " "
proto = WPA RSN
key_mgmt =WPA-PSK
pairwise = CCMP TKIP
}

What am I doing wrong ? How does linux determine the interface number ?
Thanks for your help

The increasing interface number has to do with udev rules, I think. I have this in my notes:
“delete /etc/udev/rules.d/persistent network blah blah” If you don’t switch dongles, I don’t know why it would continue to increase though

As far as losing connectivity, there have been some hints on the list about dhcp and clock times far in the future, but I haven’t really figured out how to handle that if it is true. I though it was heat related, and there could be some of that.