Its not uncommon for dogs to start misbehaving and there are a number of reasons why this occurs.
A common one is you when dog ignores you. Despite your shouts and requests your best friend continues to give you the deaf ear. If this happens a good approach is to avoid repeating yourself over again, this is what many dog owners to with the belief that their dog will eventually respond.
Instead of doing that you'll need to take a step back and have a look at some of the scenarios which a lot of dog owners encounter and use the following solutions too.
If this ever happens you should never become frustrated or become angry otherwise this will confuse your dog even more. What you could do instead is to never allow your dog's training to go on for too long at any given session and instead make sure that they are short and sweet.
The lack of training is usually a reason why bad behaviour exists in dogs. Lets face it a dog that has never been trained or one that hasn't been trained the right way would be used to doing as it pleases for a good part of their life. For such dogs such bad behaviour normal behaviour in their eyes. Its never too late to change your dog's bad behaviour by offering them the right form of training.
Are you giving your dog low value treats if you are then your dog is probably thinking ....are these low value treats worth working for?
For anyone who wants to hear the truth dogs also do think... What's in it for me? According to the Association of Pet Dogs Trainers. The right use of treats can make the difference between a dog that will listen and one that won't. The use of low value treats can also be detrimental if your dog just isn't excited by them especially during the initial stages of learning or when there are things distracting them.
Are you asking for too much at once. Dogs get tired too, maybe your dog just needs a rest or there could be the possibility of your command being to hard for your dog to understand.