I’m no expert but I believe if it’s on the supply side it is galvanized iron pipe, and if on the sewer side, cast iron pipe, either way not good news. If one is handy both can be replaced, the latter with pvc and the former with copper and shark bite fittings(home depot), i believe lowes calls them gator bite or something like that. If you want to replace the 4″ cast iron all the way to the main drain at the street then that’s a big job, that’s where I draw the line and call in a pro.