An optical device enabling reducing device scale is constituted by M
circulators (11a, 11b), (M being a natural number), a waveguide-type
diffraction grating (12) including M first input/output waveguides (121a,
121b) formed at its one end and M.times.N second input/output waveguides
(125a-1 to 125a-N and 125b-1 to 125b-N) formed at the other end, (N being
a natural number), and paths from the M circulators being connected to
the M first input/output waveguides; and N reflection-type optical
switches (13-1 to 13-N) each for reflecting the optical paths for M
adjacent waveguides out of the M.times.N second input/output waveguides
(125a-1 to 125a-N and 125b-1 to 125b-N) and for switching over the
returning-destination waveguide respectively, wherein the M circulators,
the waveguide-type diffraction grating and N reflection-type optical
switches are arranged in cascade. Consequently, the optical device can
function preferably also as a wavelength selective optical switch
available in a WDM transmission system.