Yes both LSR[12] could advertise given FEC, say 10.0.0.1/32 with label 10 to each other.
Then if IGP says to LSR1 10.0.0.1/32 egress interface is towards LSR2, it'll impose (or swap to) label 10 and send towards LSR2. LSR2 then will find egress interface being something else than towards LSR1 and swap label to what ever that direction has advertised, might be still label 10, or might be something else, does not really matter at all.
Labels are completely local today and some RFCs dictate that is how it should be. Personally I'd like IGP labels to be global for simplicity. Because MPLS LSR does not know how labels look from anyone else's POV, we need hacks like tLDP (targeted LDP) when implementing rLFA (remote loop free alternative). We need the tLDP to learn bindings of remote node.
With regards label scope, label space today is chassis-wide in every device I've ever seen, but standards fully allow per-interface label spaces.
First, I would recommend checking out Cisco's MPLS FAQ For Beginners, or the NANOG Presentation "MPLS for Dummies" by Richard A Steenbergen. They both have some really good information.
With that said, let me address your questions one at a time. (I have excerpted them in part below.)
1: After the initial convergence of the network, LSPs now exist between all FECs which are typically interfaces on LERs that connect to a subnet.
Yes, LSP's exist towards all reachable FECs. And an MPLS packet could now be switched across the network.
2: Assuming that baseline is correct; How does R1 know it is an LER for an LSP that spans to R6 for example
R1 has no clue that it is part of an LSP that spans to R6. It only cares about the local/connected labels and FECs. That is part of what makes MPLS Label Switching fast and effective. It doesn't have to know the whole path. The router just knows that to reach FEC1
, I apply label 1234
, and exit interface XYZ
.
Then later hops in the path utilize the same process, swapping in the appropriate next hop label and switching the packet on.
As for the bottom line question How are the LERs determined?, a router itself doesn't really know or care if it's an LER. It just knows that when it receives a packet destined for a local destination, with no tag, it delivers it.
In your output above, you can see that the first 4 outgoing FECs have Pop tag
listed as the Outgoing Tag. A packet leaving R1 for one of the local subnets on R2 or R3 simply has it's tag popped and forwarded out the appropriate interface.
When R2 or R3 receive that packet, they see no label and process it via the normal routing process which delivers it to a local interface.
To quote the Wikipedia article on MPLS:
At the egress router, when the last label has been popped, only the payload remains. This can be an IP packet, or any of a number of other kinds of payload packet. The egress router must therefore have routing information for the packet's payload, since it must forward it without the help of label lookup tables. An MPLS transit router has no such requirement.
Best Answer
Label itself is either an aggregate label, which means label does not have rewrite information attached to it, so it does not know egress interface nor egress MAC address. Aggregate labels are used for example to connected networks.
Aggregate label implies that you do not know egress information after MPLS lookup, so you must do normal IP lookup to determine egress information.
Normal label is attached with egress rewrite information, that is lookup against label will return egress interface (with all necessary information, like MAC address, VLAN etc)
Lets assume all links are IGP metric 1, except B-C is metric 2.
For A to send to E's loopback (192.0.2.5) following will happen
Now what happens in forwarding plane when A sends to 192.0.2.5/32