My DD is 25 mos and this has been a problem for us too.
A few things I do...
I try not to put DS down on the floor. My mom actually pointed this out...I was putting him down low a lot and then getting so
: when DD would wake him up...pinch him etc. My mom said she thought it was just too big of a temptation for a two year old not to touch the baby. So...limiting her ability to reach him has helped.
When she does hit him (often happens when I'm nursing him and I ask her to wait). I talk to DS and say...oh I'm sorry, Quinn. We have to go someplace safe because Lily isn't using gentle hands. And I get up and move with the baby, which greatly upsets her. Then I'll go put the baby down and pick her up and explain that it's my job to keep both of my kids safe and that I can't allow her to hurt her brother. She'll usually calm down and then I go get DS and model gentle touching with her.
The other thing that's really helping is whenever possible I hand the baby off to someone else and give all my attention to DD. This was really hard for me in the begining because all I wanted to do was snuggle my baby but I realized that he is content as long as *someone* is holding him (for the most part...sometimes he only wants me) but she really needs *my* attention.
DS is 2.5 mos now and I am able to leave him for an hour or two with my DH or my mom (especially in the morning when he takes a long nap) and I've been having "special mama-Lily time" with my DD. Last week we went to the farmer's market and to the farm to get milk. She was glowing the whole time and it felt really nice for me to reconnect with her.
One last thought. Since he thinks hitting the baby is a "funny joke"....maybe you could help him with some jokes that you both think are funny...funny physical movements, faces, sounds etc.????