Greer: All right, I can see you're not on Corusant. We'll need to get out of here quickly when we finish up, so call me when you can set up a pickup point somewhere. I'll wait for it
*Greer put his comlink away. He checked the room, it was being evacuated. He waited for a few more seconds then finally Qwera came back in. He signaled to the others to move. Caruso covered one entrance, Greer, Perez went for Qwera.*
Greer: We're here.
Qwera: Let me finish downloading this stuff
*A few seconds later a data-disk ejected from the computer, she grabbed it*
Qwera: This has everything the New Republic is doing, fleet movements, garrisons, everythign. It also has a list of weakpoints on some shipyardss and bases, along with a list of stragetic targets. I'm ready to go.
Greer: Good. Let's get her out of here.
*Greer started leading the way back out of there*
Vader's wife was very pregnant when she died 19 years ago. All of a sudden a 19 year old who is very strong in the force and has a distinct resembalance to him in his younger days rolls in from Vader's home planet with his old Master Obi-Wan (Who was the ONLY other person preset at the time his wife died. And to boot, the kid's last name is Skywalker.
So in answer to your question, he knew Luke was his son because his name is Darth Vader, and not Darth Retard.
-Forum post on why Vader knew Luke was his son.