In both, metropolitan optical networks (MON) and long haul optical networks (LHON) the signal quality is often influenced by the physical impairments, therefore a proper impairment based routing decision is needed. In the absence of all-optical 3R regenerators, the quality of transmission has a strong impact on the feasibility of all-optical transmission. It is assumed that signal regeneration can be done only in electrical layer. Once the signal is in electrical layer there are some features supported e.g. the traffic grooming. We show that by taking into account both, the physical impairments characterized by the Q-factor, as we propose, and the features of the electrical layer, will have a strong impact onto the routing that is based on impairment constraints.