At level 38 in Multi-player mode, you get the Overkill perk (located in the Perk 2 or red perks). This allows you to carry two primary weapons rather than a pistol. Some of the guns in online play can share ammunition. If you are a skilled sniper and prefer the bolt action to a semi-auto sniper, you can share ammo between the R700 (unlocked at level 34) and the G3 assault rifle (unlocked at level 25). Instead of having 40 rounds you will have 152 rounds for the sniper, effectively giving you an endless supply of ammo for the R700. If you are a G3 user, you will gain an extra 40 rounds (two clips). This works both ways. Because you share ammunition, you might not want to get too trigger happy with the G3. Also, there are more than just this combination. Experiment with different guns to see which can share ammo.
When you reach level 46 you will get the M14 assault rifle and you will have the M21 sniper. In the class that you want to have the extra ammo you will need have the M21 and M14 as a weapon. To have those two weapons you must have Overkill (obtained at level 38). You also must have your second perk on Overkill. For the other two perks you can have whatever desired.
Create an MP5 class. For your side arm, choose the M9. Because the MP5 and M9 share ammo you will have 90 rounds of ammo instead of 60. This is a good trick if you prestiged and have lost your Bandolier perk. When you reach level 32, enable Bandolier in this class and you will get 270 rounds of ammo instead of 180.