I am a true beginner as far as MPLS is concerned and I was wondering if this would be possible; To be more specific assume a LSP (Label Switched Path) from
Host A -> Router 1-> Router 2 -> Router 3 -> Host B
Each of the above routers would be a LSR (label switched router) of course having its own LIB (label information base). Now assume that Host A would like to send a packet to B, and assume that the label distribution would take place using plain LDP (Label Distribution Protocol).
If I am correct, after signaling has taken place between them, router 3 will decide upon a label, suppose Label 1
, to accept in its particular interface with router 2 that if a packet has will be forwarded to host B. Similarly, router 2 will set up in its LIB that for this LSP every packet forwarded to router 3 has to leave interface x with a label Label 1
, and has to let router 1 know that in order to forward a packet in this LSP it has to send it over to it with Label 2
. Finally, router 1 sets up its LIB in the way that when a packet going to host B enters the MPLS cloud from the interface with Host A,it will be assigned label Label
2 by Router 1.
Therfore, the label path would be
---(No label) -> Label 2 -> Label 1 -> ---(No label)
So, my actual question is could Label 1 be the same as Label 2, thus making the most efficient use of labels (using as less as possible)? I am perfectly aware of the fact that you can use 2^20 labels (correct me if I am wrong), but assume that you have to be as efficient as possible for the sake of an exercise. I also know that you can use the same label in the same LIB for different input interfaces (i.e. it is not the label itself that matters but the pair Input Interface & Label that will define how the packet will be forwarded).
Any feedback would be very much appreciated. Thank you all for your time.