An optical communication equipment, comprising: a first plurality of ports; a second plurality of ports; a first diffraction grating interposed between the first plurality of ports and the second plurality of ports; and a first beam-steering device interposed between the first plurality of ports and the second plurality of ports, wherein: each port of the first plurality is configured to receive a respective input WDM signal having two or more respective WDM components; the optical communication equipment is configured to variously route the WDM components from the first plurality of ports to the second plurality of ports so that each of the WDM components traverses the first diffraction grating and the first beam-steering device; the first diffraction grating is configured to spectrally disperse light received from the first plurality of ports and direct spectrally dispersed light to the first beam-steering device; and the first beam-steering device is configurable to individually steer beams corresponding to different wavelength bands of the spectrally dispersed light received from the first diffraction grating to enable the optical communication equipment to route any of the WDM components from the respective port of the first plurality to any port of the second plurality, characterized in that the optical communication equipment has a folded structure that causes a WDM component to traverse the first diffraction grating four times; wherein the folded structure causes the WDM component to traverse the first beam-steering device two times; and further comprising a first curved mirror configured to direct light between the first diffraction grating and the first beam-steering device so that the WDM component traverses the mirror eight times, and a second curved mirror configured to return light back to the first curved mirror, which then redirects it to the first diffraction grating. a first plurality of ports; a second plurality of ports; a first diffraction grating interposed between the first plurality of ports and the second plurality of ports; and a first beam-steering device interposed between the first plurality of ports and the second plurality of ports, wherein: each port of the first plurality is configured to receive a respective input WDM signal having two or more respective WDM components; the optical communication equipment is configured to variously route the WDM components from the first plurality of ports to the second plurality of ports so that each of the WDM components traverses the first diffraction grating and the first beam-steering device; the first diffraction grating is configured to spectrally disperse light received from the first plurality of ports and direct spectrally dispersed light to the first beam-steering device; and the first beam-steering device is configurable to individually steer beams corresponding to different wavelength bands of the spectrally dispersed light received from the first diffraction grating to enable the optical communication equipment to route any of the WDM components from the respective port of the first plurality to any port of the second plurality, characterized in that the optical communication equipment has a folded structure that causes a WDM component to traverse the first diffraction grating four times; each port of the first plurality is configured to receive a respective input WDM signal having two or more respective WDM components; the optical communication equipment is configured to variously route the WDM components from the first plurality of ports to the second plurality of ports so that each of the WDM components traverses the first diffraction grating and the first beam-steering device; the first diffraction grating is configured to spectrally disperse light received from the first plurality of ports and direct spectrally dispersed light to the first beam-steering device; and the first beam-steering device is configurable to individually steer beams corresponding to different wavelength bands of the spectrally dispersed light received from the first diffraction grating to enable the optical communication equipment to route any of the WDM components from the respective port of the first plurality to any port of the second plurality, characterized in that the optical communication equipment has a folded structure that causes a WDM component to traverse the first diffraction grating four times; wherein the folded structure causes the WDM component to traverse the first beam-steering device two times; and further comprising a first curved mirror configured to direct light between the first diffraction grating and the first beam-steering device so that the WDM component traverses the mirror eight times, and a second curved mirror configured to return light back to the first curved mirror, which then redirects it to the first diffraction grating.