Defending a base

Barracks are the first base defense.
They have 2 functions: to protect the base against any attack, and to produce Marines.
Each Barracks level will also give 10% more Marine production (build faster).
 
Some defense structures have the ability to fire on OR at any ship within the base System.
The defenses that allow these ranged attacks are: Laser, Missile, Pulse and and Drones.
So you probably want to have some of those in each base.  Each attack on a nearby astro costs credits.
 
Deflection Shields add shielding to all ground batteries, from Barracks to Disruptors. Planetary Shields or Starbase Shields will add shielding to all on orbit ships (owner only).
Base your defenses on the Base Economy. Low economy doesn't need big guns.
 
Unshielded base defenses (barracks to pulse batteries) will help any of your alliance member in orbit, so is is recommended that you build a few laser and missile batteries to both allow you to fire on any ship within the system and to help protect your mates.
 
Command Centers add extra 5% per level to all ships armour and power in orbit, to yours and your allies.
Also to the speed universes Command Centers, the 5% boost includes all base defenses.

The bases defenses will only prevent the base to be occupied, the Owner Economy can be pillaged if you dont have ships protecting it

How extended shielding works

Ground Defenses

If your base has Deflection Shields, they will add shielding to all ground-battery defenses (from barracks to disruptors)

The math behind it is:

total of shields divided by total of area

shields = deflection shielding * 5
area = sum of all battery levels * 5

limited to a maximum increase of 3 shielding per battery.

For a simple example, if a base has 1 barracks, 1 laser battery, 2 ion battery and 1 deflection shields, then:

(1+1+2)*5=20 area
1 deflection=20 shielding (add 5% to each shielding tech level you have)

so each ground defense would get 1 extra shielding.

Base Owner Orbiting Ships

To the orbiting ships the bonus is similar, divide the total number of units you have by the p.shields or s.shields

1000 ft
1 level of p.shields

24*5 / 1000 = 0.12

if you have shielding tech 20, it would give double that shielding to your fighters.

Shielded units will have their shielding increased.