Both, and a new seal for the inner. Usually, you can buy them as a kit that includes all 3 pieces and new races (which you may or may not need). I am assuming that you have determined by some method that it is, in fact, the wheel bearings....?
1982 Mercedes-Benz 300CD
1982 Mercedes-Benz 240D - stick