Preferred option: Let them waste time camping it. Focus on the flag stand instead.
First, an aside: Unlike earlier Tribes games, players spawn fully equipped in their chosen armor class. Since you don't have to visit an inventory station to gear up anymore, the generators tend to be ignored in high-level play. This is a controversial state of affairs that may see some changes in the coming months.
If a third of the other team wants to have a party in your gen room, let them. Switch to Pathfinder and chase enemy cappers instead. Switch to Doombringer and plant yourself on the flag, chaingunning down anyone who approaches. Switch to Soldier and harass approaching offense in your midfield. Cappers zooming around at 200 sanics or more aren't going to care about turrets, so neither should you.
Alternate option: Switch to Brute or Juggernaut and clear out your base, but don't forget...
If there's one thing the Brute is good at (and arguably, this is the only thing the Brute is good at) it's close-quarters combat. The Heavy Spinfusor and Disco Grenades are great at taking down enemies indoors, but depending on the layout of the base and the number of hostiles, the Juggernaut's mortars may work better.
However, keep in mind that any players you kill will have respawned and skied back to your gen room in 20 or 30 seconds. With the regular repair gun, that's just enough time for you to get your generator back to 60% or so before the Raider you just killed turns the corner and blows it up again. If you don't have a Technician buddy to repair the generator for you and set up a couple turrets, you'll be right back where you started.
Personally, if I find myself in this situation, and none of my teammates are helping me set up a solid base defence, I'll just opt for option #1 above.
Best Answer
Simply put, the best way to farm XP is to play games and win them.
The XP you earn by playing is determined by three things: How long you were in the game, your position on the scoreboard, and whether your team won or lost.
Base XP
First, you earn Base XP based on the amount of time you spent playing, at a rate of 0.5833/second. (Time spent waiting to respawn doesn't count.)
Example: You spent ten minutes of the match in-game, so you earn 350 Base XP.
Bonus XP
Next, you earn Bonus XP based on who won and how well you played. This value starts at 1/4 of your Base XP, and is divided by your position on the scoreboard. Everyone on the winning team gets their Bonus XP doubled. Any badges (achievements) and first-win-of-the-day bonuses get added here as well.
Example: If you were second on your team, you would earn
(350 / 4) / 2
= 43 Bonus XP. Since your team won, this would be doubled to 86 Bonus XP. The first win of the day bonus increases that to 1286 Bonus XP.VIP/Boost
Finally, you earn VIP and Boost bonuses based on the total thus far. If you have made any real-money purchase, you get a VIP bonus of (Base+Bonus * 0.5). If you are boosted, you earn another bonus of (Base+Bonus * 1.5). Effectively, being a boosted VIP triples the XP you earn.
Example: You are a VIP and boosted, so you earn an additional 818 VIP Bonus and 2454 Boost Bonus. All together, you earned 3,272 XP for this match.