MPLS Configuration Statements
To configure Multiprotocol Label Switching (MPLS), you can include the following statements in the configuration:
protocols {mpls {disable;admin-groups {group-name group-value;}advertise-hold-timeseconds;auto-policing {class all (drop | loss-priority-high | loss-priority-low);class ctnumber(drop | loss-priority-high | loss-priority-low);}bandwidthbps{ct0bps;ct1bps;ct2bps;ct3bps;}class-of-servicecos-value;diffserv-te {bandwidth-model {extended-mam;mam;rdm;}te-class-matrix {tenumber{prioritypriority;traffic-class ctnumberprioritypriority;}}}explicit-null;hop-limitnumber;icmp-tunneling;interface (interface-name| all) {disable;admin-group {[group-name];}label-map {in-label{ class-of-servicecos-value;(next-hop (address|interface-name|address/interface-name)| (reject | discard);(pop | swap <out-label>);preferencepreference;typetype;}default-route {class-of-servicecos-value;(next-hop (address|interface-name|address/interface-name)| (reject | discard);(pop | swap <out-label>);preferencepreference;typetype;}}}ipv6-tunneling;label-switched-pathlsp-path-name{disable;adaptive;admin-group {exclude [group-names];include [group-names];}auto-bandwidth {adjust-intervalseconds;adjust-thresholdpercent;maximum-bandwidthbps;minimum-bandwidthbps;monitor-bandwidth;}bandwidthbps{ct0bps;ct1bps;ct2bps;ct3bps;}class-of-servicecos-value;descriptiontext;fast-reroute {bandwidthbps;bandwidth-percentpercent;(exclude [group-names] | no-exclude);hop-limitnumber;(include [group-names] | no-include);}fromaddress;hop-limitnumber;install {destination-prefix/prefix-length<active>;}ldp-tunneling;link-protection;lsp-attributes {gpid(ethernet | hdlc | ipv4 | ppp);signal-bandwidthtype;switching-typetype;}metricmetric;no-cspf;no-decrement-ttl;node-link-protection;optimize-timerseconds;p2mppath-name;policing {filterfilter-name;no-automatic-policing;}preferencepreference;prioritysetup-priority hold-priority;primarypath-name{adaptive;admin-group {exclude [group-names];include [group-names];}bandwidthbps{ct0bps;ct1bps;ct2bps;ct3bps;}class-of-servicecos-value;hop-limitnumber;no-cspf;no-decrement-ttl;optimize-timerseconds;preferencepreference;prioritysetup-priority hold-priority;(record | no-record);retry-limitnumber;retry-timerseconds;select {manual;unconditional;}standby;}(random | least-fill | most-fill);(record | no-record);retry-limitnumber;retry-timerseconds;revert-timerseconds;secondarypath-name{adaptive;admin-group {exclude [group-names];include [group-names];}bandwidthbps{ct0bps;ct1bps;ct2bps;ct3bps;}class-of-servicevalue;hop-limitnumber;no-cspf;no-decrement-ttl;optimize-timerseconds;preferencepreference;prioritysetup-priority hold-priority;(record | no-record);select {manual;unconditional;}standby;}soft-preemption {cleanup-timerseconds;}standby;toaddress;traceoptions {filefilename<replace> <sizesize> <filesnumber> <no-stamp><(world-readable | no-world-readable)>;flagflag<flag-modifier> <disable>;}}log-updown {(syslog | no-syslog);(trap | no-trap);trap-path-down;trap-path-up;}mtu-signaling;no-cspf;no-decrement-ttl;no-propagate-ttl;optimize-aggressive;optimize-timer;pathpath-name{address<strict | loose>;}path-mtu {allow-fragmentation;rsvp {mtu-signaling;}}preferencepreference;prioritysetup-priority hold-priority;(record | no-record);revert-timerseconds;rsvp-error-hold-timeseconds;soft-preemption {cleanup-timerseconds;}standby;static-path inet {prefix{class-of-servicevalue;next-hop (address|interface-name|address/interface-name);preferencepreference;pushout-label;}}statistics {auto-bandwidth;filefilename<sizesize><filesnumber><no-stamp>;intervalseconds;}traceoptions {filefilename<replace> <sizesize> <filesnumber> <no-stamp><(world-readable | no-world-readable)>;flagflag<flag-modifier> <disable>;}traffic-engineering (bgp | bgp-igp | bgp-igp-both-ribs | mpls-forwarding);}}You can configure these statements at the following hierarchy levels:
Minimum MPLS Configuration
To enable MPLS on the router, you must include at least the following statements. This minimum configuration enables MPLS on a logical interface. All other MPLS configuration statements are optional. Note that this configuration does nothing more than enable MPLS on the router and on the specified interface.
Include the
family mplsstatement:family mpls;You can include this statement at the following hierarchy levels:
[edit interfacesinterface-nameunitlogical-unit-number][edit logical-routerslogical-router-nameinterfacesinterface-nameunitlogical-unit-number]Include the interface in the MPLS and Resource Reservation Protocol (RSVP) protocol configuration:
mpls {interface (interface-name| all); # Required to enable MPLS on the interface}rsvp { # Required for RSVP-signaled MPLS onlyinterfaceinterface-name;}You can configure these statements at the following hierarchy levels:
For every interface you enable, two special routes are installed automatically in the MPLS forwarding table. One route has a label value of
0, and the second has a label value of1.(For information about these labels, see Special Labels.)