This problem is often confounded by the fact that dogs who stink due to disease will often try to either rid or mask the offensive smell by rolling in such fragrant delights as dead animal and cat poop. Skin diseases are relatively easy to treat with the help of your veterinarian, and sometimes, even a change in dog food will do the trick. The other thing that makes dog really stink, especially Beagles, is floppy ears. Interesting to note that the cause of most dog funk is the ears. Droopy puppy-dog ears can be bad news if stink is your concern.
Ears can get itchy and stink because of a foreign object or infection.
Foreign objects simply need to be removed by the skilled hand of your vet, while infection is generally a big production involving lots of ear poking and tubes of squishy stuff.