i have a grammmatically incorrect sentence

How long do you know Nathan?

I fixed it by: How long have you known Nathan?

but grammaticaly I can't figure out why my corrected sentence is better?
do is used for general statement while ' have ' involves a range of time. That's from the time you came to know him until now.
The correct explanation is that "do you know" is present tense and "have you known" is present perfect. Present perfect means the action was begun in the past and is now complete. You can't ask how long something is happening in the present, but you can ask how long something has happened from the past until now.