Question: how are mpls labels assigned?
Answer: When a packet initially enters an MPLS router, the MPLS router will assign a label to the packet. This label is randomly assigned by the router but it is tied to a specific forward equivalency class (FEC). A FEC is basically an IP destination found in the routers IP routing table.