Abstract: The present invention relates to an optical fiber and a planar waveguide for achieving a uniform optical attenuation, which comprises a core co-doped with a first metal ions having an optical absorption coefficient of a negative slope in a particular wavelength band and a second metal ions having an optical absorption coefficient of a positive slope in a predetermined wavelength band.