主权项 |
1. A label distribution method, comprising:
sending, by a first routing device, a first Border Gateway Protocol (BGP) update message to a second routing device, wherein the first BGP update message comprises a first virtual private network (VPN) instance identifier and a first route target (RT), wherein the first VPN instance identifier is used to identify a first VPN instance on the first routing device, and the first RT is an RT of the first VPN instance; receiving, by the first routing device, a second BGP update message sent by the second routing device, wherein the second BGP update message comprises a second VPN instance identifier and a second RT, wherein the second VPN instance identifier is used to identify a second VPN instance on the second routing device and the second RT is an RT of the second VPN instance, and wherein the second BGP update message is sent by the second routing device after the second routing device determines that the first RT is equal to the second RT; allocating, by the first routing device, a first VPN instance label to the second VPN instance after determining that the first RT is equal to the second RT; and sending, by the first routing device, a third BGP update message to the second routing device, wherein the third BGP update message comprises the first VPN instance label. |