Many problems with dogs arise because they want to be pack leader and rule the household, but it's precisely their hierarchical view of society that makes dogs easier to train than, for example, cats. A dog that sees you as pack leader is ready to obey you. Dominant dogs want you to obey them, cuddle and feed them on demand, take them where they, not you, want to go on walks, and give way to them if they want the sofa. All humans in the household should have a higher rank than the dog, not just because this makes training easier, but for reasons of safety. There are a number of ways of reinforcing your rank.
Territory is important.
You have the right to occupy the high ground, like beds, sofas, and the top of the stairs, and your dog should always give way to you. If he shows any reluctance to do so, use a barrier like a baby gate to keep him downstairs, and obstacles like boxes to stop him getting on the furniture. Passages and doorways are important territory for dogs. They should get out of your way in passages and halls, and allow you to go out of doorways first. Shut the door in the dog's face if he tries to leave before you.