摘要 |
A method and network device for distributing Multi-Protocol Label Switching (MPLS) labels are provided by the present invention. The method for distributing the MPLS labels includes: a first device receives a Border Gateway Protocol (BGP) protocol message transmitted from a second device, wherein the BGP protocol message carries a service identifier of the second device; the first device establishes, according to the service identifier of the first device and the service identifier of the second device, a corresponding relationship between the first device and the second device; the first device distributes a MPLS label for the corresponding relationship. The present invention realizes that the MPLS labels are distributed for some type of the specific logical relationship between the two nodes in the BGP protocol, so that the network devices running the BGP protocol can efficiently obtain the MPLS label corresponding to the specific logical relationship.
|