A wavelength selective optical switch particularly usable as a
programmable N.times.M optical switch in a multi-wavelength communication
system. The switch uses a grating that separates multi-channel optical
signals into a plurality of optical channels, and combines a plurality of
optical channels into multi-channel optical signals. Programmable mirrors
switch each optical channel to any of a plurality of fibers coupled to
the switch.