# MPLS Global Configuration Tasks

Complete these tasks to configure a virtual router as an LSR. You perform these commands in Global Configuration mode. The following sequence is arbitrary; you can perform these tasks in any order.

Your choice of label distribution protocol determines whether the LDP or RSVP-TE global tasks are appropriate for your network design.

MPLS global configuration tasks include the following sets of tasks:

- MPLS Global Tasks
- LDP Global Tasks
- RSVP-TE Global Tasks

## MPLS Global Tasks

In a typical network, you perform only the first task. You might also perform the optional configuration tasks, but typically do not need to do so.

1. Enable MPLS on a virtual router.
   host1(config)#mpls
2. (Optional) Configure the time-to-live field placed in the MPLS header when a label is first added to an IP packet.
   host1(config)#mpls ip propagate-ttl forwarded
3. (Optional) Configure the tunneling model for differentiated services. See Configuring MPLS and Differentiated Services for more information and command descriptions.
   host1(config)#mpls tunnel-model uniform
4. (Optional) Specify whether to use the TOS value (the default condition) or the UPC value of the packet as the value of the EXP bits when the router acts as an LER.
   host1(config)#mpls copy-upc-to-exp
5. (Optional) Specify whether the EXP bits for VPN MPLS labels can be modified by EXP bit mapping or by policy for differentiated services.
   host1(config)#mpls preserve-vpn-exp
6. (Optional) Specify whether to create dynamic IP interfaces on top of MPLS major interfaces and optionally what profile to use for them.
   host1(config)#mpls create-dynamic-interfaces ip on-major-interfaces profile v4intf

## LDP Global Tasks

Typically, you do not configure anything for LDP at the global level, but you can perform the following optional tasks.

1. (Optional) Enable LDP and topology-driven LSP. Any LDP-related command creates LDP implicitly, negating the need to issue this command.
   host1(config)#mpls ldp
2. (Optional) Configure the redistribution of IGP routes to LDP.
   host1(config)#mpls ldp redistribute ospf route-map boston5
3. (Optional) Configure a global LDP profile that specifies how long an LSR maintains link hello records before another link hello is sent, the interval between link hellos, or both.
   host1(config)#mpls ldp interface profile ldp1 host1(config-ldp)#hello hold-time 55 host1(config-ldp)#hello interval 10
4. (Optional) Configure lists of peer addresses that targeted hello messages are sent to or accepted from.
   host1(config)#mpls ldp targeted-hello send list 10.21.5.87 host1(config)#mpls ldp targeted-hello receive list 192.168.45.25

   | Note: The mpls ldp targeted-hello receive list command is unnecessary if you configure the mpls ldp targeted-hello send list command.

5. (Optional) Configure the hold time and interval values for targeted hello messages used in LDP extended discovery.
   host1(config)#mpls ldp targeted-hello holdtime 90 host1(config)#mpls ldp targeted-hello interval 30
6. (Optional) Configure LDP session retry values.
   host1(config)#mpls ldp session retry-time 2 host1(config)#mpls ldp session retries 1800
7. (Optional) Configure the period that LDP negotiates with its peer for which the LDP session is maintained in the absence of any LDP messages.
   host1(config)#mpls ldp session holdtime 1800
8. (Optional) Configure the interval at which LDP sends session keepalive messages.
   host1(config)#mpls ldp session keepalive-time 180
9. (Optional) Specify an IP address to be advertised to peers as the transport address in discovery hello messages.
   host1(config)#mpls ldp discovery transport-address 192.168.34.2
10. (Optional) Configure independent control as the method of label distribution that LDP uses.
    host1(config)#mpls ldp independent-control
11. (Optional) Configure LDP to advertise the explicit null label or a non-null label for the egress router to achieve ultimate hop popping.
    host1(config)#mpls ldp egress-label explicit-null

For topology-driven LSPs, perform the following LDP configuration tasks.

1. (Optional) Configure the LSR to create topology-driven LSPs. Enabling LDP automatically creates topology-driven LSPs.
   host1(config)#mpls topology-driven-lsp
2. (Optional) Specify filters for the routes and peers to which the labels are advertised.
   host1(config)#mpls ldp advertise-labels host-only
3. (Optional) Specify the LSPs to be put into the IP routing table for forwarding plain IP traffic.

   | Note: This step is not optional if you are using a topology-driven network to forward plain IP packets.

   host1(config)#ldp ip-forwarding host-only
4. (Optional) Establish a policy governing the distribution of incoming LDP labels.
   host1(config)#mpls ldp advertise-labels for boston1
5. (Optional) Remove and then reestablish existing LDP LSPs and to restart topology-driven LDP. Use this command when you have modified or created policies or access lists (with the mpls ldp-ip-forwarding and mpls ldp advertise-labels commands) and want them to be applied to LDP LSPs that are already in an up state.
   host1#clear mpls ldp

## RSVP-TE Global Tasks

Typically, you do not configure anything for RSVP-TE at the global level, but you can perform the following optional tasks.

1. (Optional) Enable RSVP-TE. Any RSVP-TE–related command creates RSVP-TE implicitly, negating the need to issue this command.
   host1(config)#mpls rsvp
2. (Optional) Configure a global RSVP-TE profile that specifies the timeout period in milliseconds between generation of RSVP refresh messages, the number of refresh messages that can be lost before the PATH or RESV state is ended, or both.
   host1(config)#mpls rsvp interface profile rsvp4 host1(config-rsvp)#refresh-period 60000 host1(config-rsvp)#cleanup-timeout-factor 9
3. (Optional) Configure retry timer options globally (to apply to all tunnels) to set up an LSP after a setup failure (a failure other than one due to no available route). Specify the number of attempts to be made to set up an RSVP-TE tunnel or the interval in seconds between attempts.
   host1(config)#mpls lsp retries 35 host1(config)#mpls lsp retry-time 55
4. (Optional) Configure retry timer options globally (to apply to all tunnels) to set up an LSP after a failure due to no available route. Specify the number of attempts to be made to set up an RSVP-TE tunnel or the interval in seconds between attempts.
   host1(config)#mpls lsp no-route retries 3200 host1(config)#mpls lsp no-route retry-time 45
5. (Optional) Configure the interval at which the bandwidth values are flooded.
   host1(config)#mpls traffic-eng link-management timers periodic-flooding 10
6. (Optional) Configure reoptimization—the frequency at which MPLS searches for better paths for existing tunnels.

   | Note: Low timer values lead to frequent reoptimization of LSPs, which is undesirable for the following reasons: Frequent changes to the LSPs increases packet loss. Frequent reoptimization increases the load on the router, especially when the router acts as the LSP head end. The load is particularly noticeable in a scaled network, resulting in high CPU utilization on the router.

   host1(config)#mpls reoptimize timers frequency 180

   You can also force an immediate search for better paths for all existing LSPs.

   host1#mpls reoptimize
7. (Optional) Enable refresh reduction and message bundling.
   host1(config)#mpls rsvp refresh-reduction host1(config)#mpls rsvp message-bundling
8. (Optional) Configure the egress router to advertise the explicit null label.
   host1(config)#mpls rsvp egress-label explicit-null