How should a section of cast iron piping be replaced?
Cast Iron drain pipe with Bell fittings, these are packed with oakum and overlaid with hot poured lead driven in place to seal and then a second layer poured in to complete the seal.

It may only need the lead driven in to repack the oakum and a new layer of lead poured.

Contact a plumber with knowledge about old drain systems, cast iron can take a long time to rust through and may not need replacement.