an optical device for rearranging wavelength channels in an optical network is disclosed . the optical device has a wavelength selective coupler having one input port and a plurality of output ports coupled to a plurality of input ports of an optical grating demultiplexor such as an arrayed waveguide grating . the wavelength channels in each of the input ports are dispersed by the demultiplexor and are directed to a plurality of output ports of the optical grating demultiplexor . as a result , at least one wavelength channel at each of the input ports of the optical grating demultiplexor is coupled into a common output port . the optical device is useful in passive optical networks wherein a same demultiplexor is used for simultaneous multiplexing and demultiplexing of wavelength channels .