what's means about "(S=0)"in the output
mpls.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 01:37:25, metric 1 Receive1 *[MPLS/0] 01:37:25, metric 1 Receive2 *[MPLS/0] 01:37:25, metric 1 Receive300032 *[LDP/9] 00:29:39, metric 1 > to 10.0.8.5 via em3.66, Pop 300032(S=0) *[LDP/9] 00:29:39, metric 1 > to 10.0.8.5 via em3.66, Pop 300048 *[LDP/9] 00:29:14, metric 1 > to 10.0.8.10 via em2.55, Pop 300048(S=0) *[LDP/9] 00:29:14, metric 1 > to 10.0.8.10 via em2.55, Pop
thanks a lot!
Check this out
There are two entries per route because the stack values in the MPLS header may be different. For each route, the second entry 300032 (S=0) and 300048 (S=0) indicates that the stack depth is not 1, and additional label values are included in the packet. In contrast, the first entry, 300032 and 300048 has an inferred S=1 value which indicates a stack depth of 1 and makes each label the last label in that particular packet. The dual entries indicate that this is the penultimate router.
"S=0" basically means that the label is not at the bottom at the label stack, and that there are more labels to follow. There are situations when a packet would contain more than 1 label, with each meant to achieve a different objective. In such scenario, we can choose our router to treat such a packet differently, in comparison to packets that have only one label ( "S=1", not shown in the above output, but is implicit for the other routes that do not have "S=0"). This is the reason 2 entries are present in the routing table for the same destination prefix.