I'm not sure if anyone has brought this up before or not, but I experienced this problem myself and found a solution.
For awhile now I have been playing BF2 and occasionally I would get disconnected from a server, but not getting completely kicked out of the account server. Then it would refuse to let me join the server or let me in for about 20 seconds and disconnect again. I could sometimes join small (less than 20) player servers and play without problem. I checked my pings and everything looked great. For some time I thought it might be my ISP cutting me off for bandwidth issues and I was about to call them up and complain.
I had a friend come over and play BF2 with me and he never had connection problems. I decided to look around for answers and finally found one. Turned out that my CPU was to blame. I run an AMD X2 4200. What I found out was there is a bug in the programming for BF2 where it does some strange stuff to the TCP stack. Having a dual core processor compounds this problem and eventually leads to connection problems after playing for a hour or two at once.
The solution is fairly simple. All you have to do is set the "Affinity on the BF2.exe process to just one core (either 0 or 1). If you don't know how to do this, just right press Ctrl+Shift+Esc and right click the process and choose "set affinity." Chances are if you have a dual core CPU you already have had to do this before. Doing this now allows me to play on 64 player servers for as long as I like (which is probably a bad thing

). Hope this helps if anyone else has ever had this problem.