After a BGP-LS peer relationship is established between a controller and a forwarder, the forwarder collects network topology information through an IGP and then reports the information to the controller through BGP-LS.
A forwarder allocates labels through an IGP and then reports them to a controller through BGP-LS. SR-MPLS TE mainly uses adjacency labels (adjacency segments), which are allocated by the ingress, and are valid locally and unidirectional. SR-MPLS TE can also use node labels, which are configured manually and valid globally. Adjacency and node labels can both be propagated through an IGP. Use the network shown in Figure 1 as an example. Adjacency label 9003 identifies the PE1-to-P3 adjacency and is allocated by PE1. Adjacency label 9004 identifies the P3-to-PE1 adjacency and is allocated by P3.
IGP SR is enabled on PE1, P1, P2, P3, P4, and PE2, and an IGP neighbor relationship is established between each pair of directly connected nodes. In SR-capable IGP instances, all IGP-enabled outbound interfaces are allocated SR adjacency labels. These labels are flooded to the entire network through an IGP SR extension. Taking P3 on the network shown in Figure 1 as an example, the process of label allocation through an IGP is as follows:
PE1, P1, P2, P3, and P4 all allocate and propagate adjacency labels and generate label forwarding entries in the same way as P3 does. After establishing a BGP-LS peer relationship with the controller, the nodes report collected topology information (including SR labels) to the controller through BGP-LS.