Sounds to me like your dog may have a severe ear infection. This is an incredibly painful problem for a dog to have and can result in the loss of hearing in that ear if left untreated.
There is nothing over the counter that will help this ear. Your dog needs an ear cytology done at your regular vet's office to determine whether it's a bacterial or yeast infection, and once the vet makes that diagnosis, they'll be able to send out the proper medications...both oral and topical.
Because it's illegal to prescribe medication for an animal that you haven't seen, no one here is going to be able to give you a dose for the Cephalexin. What I can do, however, is point you in the right direction on where to find that information. If you follow this link:
http://www.ehow.com/about_6756512_cephalexin-dog_s-ear-infection.html you'll find the dose about 1/2 way down the page.
It's important to know, however, that if this is a yeast infection, rather than a bacterial infection, the Cephalexin will not fix it. Also, giving any medication without talking to your vet could cause your dog to become sicker as the wrong meds or the wrong dose can be toxic and can be fatal.
If this were my dog, I'd have him looked at right away. Bleeding from the ear often signals a rupture of the tympanic membrane, so time is of the essence here. Get your dog in to see a very as soon as you can.
If this is the information that you were looking for, please take a second to hit the green 'accept' button. It's the only way I get credit for my work and will not end our session...you can still come back and update me on how he's doing. Thanks.