I think there is no ideal age gap.
Based on what I have seen, exactly (or less than) two years is very hard for the parents early on because you basically have two babies. But then as they get bigger they often play together and can be very close - they entertain each other and you don't have to as much. They also fight though!
A three year gap is popular among my friends, and is what I orginally intended. They are still close enough to play together when they are older but it seems to be a bit easier on the parents at first - only one in nappies/bugy/cot, etc.
I have just found out I am pregnant and will have a five year gap. It's not what I originally planned but we had to put it off for many reasons, mostly money. I think the advantages will be that my oldest is pretty self sufficent and won't need much personal care, will be at school so I can give the baby plenty of one to one attention, and will be able to understand better what has happened to our family. The disadvantages will be juggling school run with a new born, they will require very different types of childcare when I go back to work and I will have multiple drop offs and pick ups for a long time, they will want to do different things on days out - entertaining a 9 year old and 14 year old on holiday will be hard.
Age gaps are no garuntee (sp) they will be close though - I'm closer to a sibling 7 years younger than one 2 years younger and my best friend is closest to a sister 10 years younger, despite being a twin.
Whatever happens, you'll make it work.