Two main systems are used: impressed current cathodic protection (ICCP), which uses an external power source and inert anodes to drive protective current and galvanic (sacrificial anode) systems, which use more active metals like zinc or magnesium that corrode preferentially to protect the pipeline. The right system depends on soil resistivity, pipeline size and coating condition.