Since many things could cause an ear infection, your dog should be diagnosed by a vet who can prescribe medicated prescription ear drops that contain antibiotics. If your dog has had ear infections before, the vet may swab his ears to get samples of pus to send for a culture. This will precisely identify the bacteria causing the infection and which antibiotic will kill them. Severe infections may require a combination of topical drops into the ear and oral systemic antibiotics. There are many medications available. Your vet will select the best one for your dog and give you instructions on how often to apply it and for how long. Treatment will be largely determined by your dog's size and condition. In some dogs, recurrent and unexplained ear infections may be linked to an allergic reaction. The dog may be allergic to something in the environment (pollen or dust mites) or an ingredient in their food. Talk to your vet about this possibility if your dog continues to get ear infections — they may recommend putting the dog on a hypoallergenic diet as a trial to see if things improve.

TL;DR in Vietnamese:
Đưa chó đi khám thú y. Nhận biết những cơn dị ứng.