While reading MPLS basics, I have a query :-
FEC says providing the same behavior to same kind of packet that is allocating the same next hop, same egress interface.
AS book says - "In MPLS, the assignment of a particular packet to a particular FEC is done just once, as the packet enters the network. The FEC to which the packet is assigned is encoded as a short fixed length value known as a "label". "
That mean classifying the packets and assigning the labels as per the classification.
and for LIB book says - " The LIB functions in the control plane and is used by the label distribution protocol where IP destination prefixes in the routing table are mapped to next-hop labels that are received from downstream neighbors, as well as local labels generated by the label distribution protocol."
I am confused - FEC says classifying the packet and assigning the label and LIB says destination prefixes are mapped to labels.
If Destination prefixes need to mapped to labels then why do we need to classify the packets and why do we need FEC ?
I know that I am missing something because books area already reviewed by experts.