An apparatus for generating a label forwarding table for a non-destination router on a ring topology, wherein a ring topology comprises one destination router and multiple non-destination routers, and the apparatus comprises:
- a clockwise outgoing label receiving unit configured to receive a clockwise outgoing label actively allocated by a clockwise next-hop router of a non-destination router where the apparatus is located on the ring topology, wherein the clockwise outgoing label takes the one destination router on the ring topology as an endpoint of a clockwise label switching path LSP corresponding to the clockwise outgoing label, the clockwise next-hop router on the ring topology allocates only one clockwise outgoing label to the non-destination router where the apparatus is located, and the label takes the destination router as the endpoint of the clockwise LSP;
- a counterclockwise outgoing label receiving unit configured to receive a counterclockwise outgoing label actively allocated by a counterclockwise next-hop router of the non-destination router where the apparatus is located on the ring topology, wherein the counterclockwise outgoing label takes the destination router on the ring topology as an endpoint of a counterclockwise LSP corresponding to the counterclockwise outgoing label, and the counterclockwise next-hop router on the ring topology allocates only one counterclockwise outgoing label to the non-destination router where the apparatus is located, and the label takes the destination router as the endpoint of the counterclockwise LSP;
- a clockwise incoming label allocating unit configured to actively allocate a clockwise incoming label of the non-destination router, where the apparatus is located, to a clockwise previous-hop router of the non-destination router where the apparatus is located on the ring topology, wherein the clockwise incoming label takes the destination router as an endpoint of a clockwise LSP corresponding to the clockwise incoming label, and the clockwise incoming label allocating unit allocates only one clockwise incoming label of the non-destination router where the apparatus is located, to the clockwise previous-hop router of the non-destination router where the apparatus is located on the ring topology;
- a counterclockwise incoming label allocating unit configured to actively allocate a counterclockwise incoming label of the non-destination router, where the apparatus is located, to a counterclockwise previous-hop router of the non-destination router where the apparatus is located on the ring topology, wherein the counterclockwise incoming label takes the destination router as an endpoint of a counterclockwise LSP corresponding to the counterclockwise incoming label, and the counterclockwise incoming label allocating unit allocates only one counterclockwise incoming label of the non-destination router, where the apparatus is located, to the counterclockwise previous-hop router of the non-destination router where the apparatus is located on the ring topology;
- a clockwise label forwarding table generating unit configured to generate a clockwise label forwarding table according to the clockwise incoming label allocated by the clockwise incoming label allocating unit and the clockwise outgoing label received by the clockwise outgoing label receiving unit;
- and
- a counterclockwise label forwarding table generating unit, configured to generate a counterclockwise label forwarding table according to the counterclockwise incoming label allocated by the counterclockwise incoming label allocating unit and the counterclockwise outgoing label received by the counterclockwise outgoing label receiving unit.