dsconfigad returns error "authentication server could not be contacted. (5200)", but GUI domain join works without a problem
I have resolved this problem. I was specifying SERVERNAME in the command. 

I used to enter something like: SERVER.DOMAIN.Local (as we have *.local domain). Turns out, I had to enter just DOMAIN.Local.