Don't attack NCR soldiers, and they'll help you fend off Legion adversaries as they appear.
If you're following our walkthrough and our particular permutation through the game's main events, then the NCR should be your friends. The Legion and NCR are already doing battle. When you arrive at the Hoover Dam, you'll find a grisly scene. If not, load up an old save and go about your business, and then reconvene with Yes Man when you're ready. You're stuck on this path through to the end of the game, and you won't be able to quick-travel anywhere else. Once you've accepted Yes Man's offer to go to the Hoover Dam to head-off the Legion's advance from the east, and once the game itself prompts you that you've basically reached the point-of-no-return (a similar kind of prompt to the one you received in Doc Mitchell's house at the beginning of the game about Hardcore Mode), you'll be automatically transported to the Hoover Dam itself, where the battle is well underway.