• The previous lesson ended on a question: who chose labels 58, 31, and 67, and how did the routers agree on them?
    The answer is a dedicated protocol: the Label Distribution Protocol (LDP).

    Automatic Label Selection

    LDP starts with a simple rule, shown below:

    Diagram showing automatic label selection by LSRs in an MPLS domain

    Figure 1 – Automatic local label selection by LSRs

    For every network in its routing table, an LSR automatically picks a label.
    This happens only on routers running MPLS.

    Answer the question below

    Where does an LSR find the networks it assigns labels to?

    Label Assignment per Router

    Follow one network: 192.168.2.0/24, connected to R5.
    All five routers have it in their routing table. The first four pick a label for it, and R5 answers differently:

    Diagram showing local label assignments for network 192.168.2.0/24 on each router

    Figure 2 – Local label assignment per router

    • R1 picked 24,

    • R2 picked 58,

    • R3 picked 31,

    • R4 picked 67,

    • R5 did not pick a number: it advertises Pop

    This pairing of a network and a label is a label binding.
    The choice is completely local: each router picks its labels independently.

    Check it on R1:

    R1# show mpls ldp bindings 192.168.2.0 255.255.255.0
      lib entry: 192.168.2.0/24, rev 12
            local binding:  label: 24
            remote binding: lsr: 2.2.2.2:0, label: 58

    The output starts with lib entry. Bindings are stored in the LIB (Label Information Base): the label this router picked, and the labels its neighbors sent it.

    The local binding line is R1's own choice: label 24, the same value as in the figure.
    The second line holds a label R1 did not pick. Where it comes from is the rest of this lesson.

    Answer the question below

    Which router picked label 31 for 192.168.2.0/24?

    Answer the question below

    192.168.1.0/24 is directly connected to R1. Which value does R1 advertise for it?