If you are in University, then you will be running into the same Professors throughout your Degree courses. You will land up doing Tutorials with some of them and they should then get to know you personally, and you will not be just a number. In that case, ask one of them to be a Reference for you. Ideally five years would be required, but there are exceptions. Children of Armed Forces parents have often moved every four to six years, so they also have a similar problem. They use References of friends that they have met in the past and may still have contact with. There is nothing saying that your References must be in the same town as you. They could reside anywhere.
It shouldn't cause you too much consternation.
GW
Not in my case. Maybe thats why the recruiters seemed like it was an absolutely ludicrous thing for me to say that a professor was not possible for a reference. Because it probably varies from school to school, and maybe mine was the exception or whatever.
Throughout my academic career, I only had one professor off the top of my head who was a repeat instructor, and that was only for what amounted to one course split into to two and spread out over the whole year. With the 120+ students in the class, he might've recognized me, but he'd have no idea who I was. Part of that was the fact that I didn't spend every day camped outside his office for office hours (like some students did), but I did probably an average amount of communication with him. In extreme cases one might get to know a single professor (a friend of mine did a special project as a course, so obviously he got in), but at my school that was way outside the norm.
I'd also point out that the lack of repeat professors wasn't for lack of trying. I had a number of professors that I wish I could've gotten again, where it just wasn't feasible. Either they weren't teaching their regular course some time later, or the time they taught it conflicted, or anything. Even still, I wouldn't trust any of them to write me a reference, or I'd be certain to screen the references quite well. Even the senior design project courses I took, where we were spending 6 hours minimum a week in a lab and the lab TA's were there at least half the time, they'd still make a lousy reference.