I have a 2.10 year old and a 3 month old.
I don't know what the answers are really as it depends so much from child to child but what's worked (mostly!) for us is:
Lots of exercise - getting out of the house every single day rain or shine, preferably morning and afternoon. Plenty of exercise seems to reduce the potential for boredom/playing up.
Special time with mummy and daddy every day (for the toddler). He has a bath most days with his dad and then I put him to bed and if the baby screams then it screams - DH deals - it's our special time.
Involving the toddler as much as poss in the baby's care - help changing nappies, washing, sharing baths, lots of (supervised) cuddles.
Lots of praise, "you are being such a good older brother cuddling so nicely, DS2 thinks you are so clever riding your bike, look at him watching you (even if he's not!), thank you for helping me with DS2's nappy you were a real help (even if he wasn't!)" - you get the picture.
Time with other adults - lots of attention from granny etc, making sure that people who come to the house to admire the new baby play with DS1 lots as well.
Reading lots of stories about baby brothers and sisters at all stages - talks about how he can teach DS2 things when he's a bit bigger, books like Alfie and Annie Rose, Charlie and Lola, etc - trying to show him the positives of having a baby brother.
And it may sound weird but we potty trained him about a month after the new baby arrived - which sounds like a major hassle but I think he liked the attention, plus we did it with bribery (stickers) so he enjoyed that too! If there is a project you can share with your DD then perhaps a good time to start it?
Er, can't think of anything else (knackered!) but those tactics seemed to work for us (so far anyway) as DS1 has actually been really, really good with the new baby, the only thing is his sleep has gone to pot sadly, I am currently up once with DS2 and 3 or 4 times with DS1, ho hum.
Good luck, it does get a LOT easier when the newborn isn't quite so needy.