"All right, we'll have to delay them a bit. Corporal, Silis, help me out here."
He opened the door a little, and shot the two aliens preparing explosives. Silis and the Corporal provided some more fire. One of the aliens roared and began shooting back. Dag quickly stepped back and closed the door, but one shot hit him in the arm. He was thrown backwards onto the bulkhead. He sat up. The armor seemed to have taken most of the impact.
"Dag, take that off!"
He looked down again, and found that whatever he'd been shot with had begun eating through his armor. He quickly took the armplate off, and threw it down onto the floor.
"Look at that!"
Even though the substance was eating through Dag's armor quickly, the ship seemed unharmed by it, in fact once the substance was on the ship's floor, it lay there benignly, and after a few seconds, it stopped glowing. The corporal tentatively pushed it with his boot. No more damage.
"Of course......whatever that is recognizes their own armor! The guys we shot didn't die, they were knocked out by the impact!"
"Great, we're going to have to go back to using the flamethrowers. There's no way we can get in range without getting decimated."
He looked around for any other way out. He saw a vent overhead. Using his jetpack he hovered to get a closer look.
"This could be a way to flank them...but it's too small. They can't fit through there, and with our armor we can't fit either. But.."
He looked at Janya and motioned for her to come over.
"Come over here, take a look? Can you fit through here? You could attack them from behind, distract them while we rush forward. "
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.