What should I do if the dog's legs are swollen?

My dog, suddenly walking, we feel that there are problems with legs, rubbing him, rubbing the more swollen, the mother said that it hurts the nerves, and is there any way to treat it? The legs are not broken, I look at those answers on the Internet, ice application ... Is there any use?