A link quality agent running in a computer embedded in a device, such as an optical
communication transceiver, to monitor an optical signal quality of the link. In
one embodiment, avalanche photodiode (APD) and filter wheel values on each side
of the free space link as well as packet errors from a distribution switch are
monitored. When the link quality agent determines that the free space link is marginal
(based on the monitored optical signal quality), the link quality agent configures
down the port between the distribution switch and the router on the receive end
of the free space link, and forces customer traffic over a backup link. When both
ends of the free space link are again functional, the link quality agent configures
the port up and routes customer traffic to the free space link.