A multiwavelength fiber ring laser that is based on an S-band erbium-doped fiber amplifier (EDFA) and a semiconductor optical amplifier (SOA) is developed. An optical switch is used to switch the multiwavelength fiber laser between S-band and L-band. This fiber laser can stably lase seven wavelengths in the S-band or 28 wavelengths in the L-band. Additionally, the lasing wavelengths with a signal-to-noise ratio of over 33 dB and a wavelength spacing of 100 GHz are demonstrated experimentally. The average powers of the lasing wavelength in the S-band and the L-band are -7.53 and -12.15 dBm, respectively.