Optical fiber is a long thin cylindrical fiber that is made of plastic or glass, that is as small as…