esponding output port. Moreover, a QoS tag is also associated with the tunnel [36] that will set the priority of packets belonging to it when contentions will present in the router queues. As the last act of the tunnel setup, the router forwards along the tunnel route an LDP packet requesting a label association to the next router of the tunnel. This mechanism goes on up to reaching the destination, where the tunnel ends. Here the edge router receives the LDP label association request with the label imposed by the last LSR, and proceeds to the correct termination of the tunnel associating the input label to an output drop port. In this way, when a packet will arrive at the LER along the tunnel, the tunnel label will be eliminated and the datagram will be delivered to the destination. If a bidirectional tunnel is to be set up, the LER also creates another LDP packet suitable to set up a tunnel where destination and source are exchanged and the process starts again. Summarizing, an MPLS tunnel created by LDP can be viewed as a series of labels, one for each network link, SO that the output label of a router is the input label of the following router along the tunnel path. The tunnel is identified by a router via the association of the input label and output label since each label is uniquely associated to a router port. During the tunnel working, when a packet arrives at a router, the MPLS header is eliminated and the input label processed to determine the output port. The datagram is switched to the output port where the datagram is enveloped in the new MPLS header and it is sent to the next router. Tunnel monitoring is also performed by each router in terms of statistics on the QoS variables. When the tunnel has to be deleted, a suitable LDP packet is generated by one of the LER and is transmitted all along the tunnel route; every router forwards it, and after forward- ing cancels the tunnel from its tunnel list. Also in this case, in case of bidirectional tunnels, a double passage is needed, one in each directio