f in-service discovery, while the second is a type of out-of-service discovery. The resource discovery has a wider scope than the neighbor discovery. It allows every node to discover network topology and resources. This kind of discovery determines what resources are available, what are the capabilities of various network elements, and how the resources are protected. It improves inventory management as well as detects configura- tion mismatches. It has to be considered that, if an OXC has five DWDM output ports, this means that it switches probably more than 600 optical channels and that more than 1200 fiber patch- cords (every channel comes in and goes out) physically comes out from some OXC card to be plugged on some other card or on an external equipment. Since physical connections of Telecommunication Networks fiber patch-cords have to be done manually, the probability that some error occurs when a new equipment is installed or when an upgrade is done is not negligible. Many errors can be detected via the equipment self-test, but not all, and there is a prob- ability that an error manifests its presence much later with respect to the equipment instal- lation, since without any specific test, it will become evident only when a certain card is really used (let us think, e.g., about redundancy cards). Thus, having an automatic proce- dure that through the discovery of network links at each network layer points out errors in connecting different equipments is very important to simplify the network operation. The service discovery is responsible for verifying and exchanging information about service capabilities of the network, for example, services supported over a trail or link. Such capabilities may include, as an example, the quality of service (QoS) a certain net- work link is capable of providing in terms for example of error probability, connectivity restoration time in case of failure or packets average delay. 8.2.3.2 Routing Routing is used to select paths for establishment of connections through the net