Previous Section  < Free Open Study >  Next Section

Label Distribution Protocol Configuration

This section gives you a basic understanding of how to configure LDP. The assumption is made that you already know how to configure the IGP routing protocols. Various aspects of configuring MPLS TE are dealt with in the remaining chapters of this book.

Configuration tasks for LDP include the following:

  • Configuring CEF

  • Configuring MPLS forwarding globally

  • Interface-level configuration

Consider the service provider network shown in Figure 2-31. The goal here is to have an MPLS-enabled core. This section goes over the configuration of a core router 12008a to enable MPLS and thus act as an LSR. In order to enable MPLS in the entire network, you of course must enable CEF, MPLS forwarding globally, and MPLS forwarding per interface on every router you want to participate in MPLS.

Figure 2-31. Enabling MPLS Forwarding in a Service Provider Network

graphics/02fig31.gif

Configuring CEF

Example 2-17 shows how to enable CEF on a router. 12008a is used as an example.

Example 2-17 Enabling CEF

12008a#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

mpls-12008a(config)#ip cef distributed

The keyword distributed applies only to distributed platforms such as the 12000 series router and the 7500 series router—not the 7200 series router.

NOTE

Example 2-17 shows how CEF is configured on a 12000-series router. In reality, 12000 series routers support CEF only as a forwarding mechanism, so there is no need to explicitly enable it. By default, distributed CEF is enabled on 12000 series routers.


CEF is a prerequisite for MPLS forwarding, no matter whether you're using LDP, TDP, RSVP, or BGP for label distribution.

Example 2-18 shows output generated from the show ip interface command.

Example 2-18 Verifying That CEF Is Enabled on Inbound/Outbound Interfaces with the show ip interface Command

12008a#show ip interface pos 2/1

POS2/1 is up, line protocol is up

  Internet address is 10.0.3.5/24

  Broadcast address is 255.255.255.255

  Address determined by non-volatile memory

  MTU is 4470 bytes

  Helper address is not set

  Directed broadcast forwarding is disabled

  Multicast reserved groups joined: 224.0.0.5 224.0.0.6 224.0.0.2 224.0.0.14

  Outgoing access list is not set

  Inbound  access list is not set

  Proxy ARP is enabled

  Security level is default

  Split horizon is enabled

  ICMP redirects are always sent

  ICMP unreachables are always sent

  ICMP mask replies are never sent

  IP fast switching is enabled

  IP fast switching on the same interface is enabled

  IP Flow switching is disabled

  IP CEF switching is enabled

  IP Null turbo vector

  IP multicast fast switching is enabled

  IP multicast distributed fast switching is disabled

  IP route-cache flags are Fast, Distributed, CEF

  Router Discovery is disabled

  IP output packet accounting is disabled

  IP access violation accounting is disabled

  TCP/IP header compression is disabled

  RTP/IP header compression is disabled

  Probe proxy name replies are disabled

  Policy routing is disabled

  Network address translation is disabled

  WCCP Redirect outbound is disabled

  WCCP Redirect inbound is disabled

  WCCP Redirect exclude is disabled

  BGP Policy Mapping is disabled

show ip cef summary is another useful command to ensure that CEF is enabled, as demonstrated in Example 2-19. This is useful for global information about CEF, such as whether it is running in distributed mode, how many routing entries are present, and so on.

Example 2-19 Verifying That CEF Is Enabled and Obtaining Statistics with the show ip cef summary Command

mpls-12008a#show ip cef summary

IP Distributed CEF with switching (Table Version 170), flags=0x0, bits=8

  37 routes, 0 reresolve, 0 unresolved (0 old, 0 new)

  37 leaves, 34 nodes, 40724 bytes, 141 inserts, 104 invalidations

  8 load sharing elements, 2688 bytes, 8 references

  universal per-destination load sharing algorithm, id 5008782C

  2 CEF resets, 33 revisions of existing leaves

  34 in-place modifications

  refcounts:  8999 leaf, 8960 node



Adjacency Table has 9 adjacencies

Configuring MPLS Forwarding Globally

Example 2-20 shows the router-level configuration to enable MPLS forwarding.

Example 2-20 Configuring MPLS Forwarding Globally

mpls-12008a#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

mpls-12008a(config)#mpls ip

mpls-12008a(config)#mpls label protocol ldp

mpls-12008a(config)#mpls ldp router-id loopback 0

The command mpls label protocol ldp specifies which label protocol to use. The choices are ldp and tdp.

The command mpls ldp router-id loopback 0 ties the MPLS LSR ID to the IP address of the virtual interface Loopback0. This is recommended in order to avoid unpredictable results during session establishment.

Interface-Level Configuration

Apart from the router-level configuration presented in Example 2-20, you also have to explicitly configure each interface on which you want to run LDP by using the command mpls ip at the interface level.

Frame-Mode Interface Configuration

Example 2-21 shows the MPLS configuration options available at the interface level for a frame-mode interface.

Example 2-21 Interface-Level MPLS Configuration

12008a#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

mpls-12008a(config)#interface ethernet 0

mpls-12008a(config-if)#mpls ip

mpls-12008a(config-if)#mpls mtu ?

  <64-65536>  MTU (bytes)

mpls-12008a(config-if)#mpls mtu 1504

mpls-12008a(config-if)#end

mpls label protocol can also be specified at the interface level. This is particularly useful when you have Cisco LSRs as neighbors on one set of interfaces and non-Cisco neighbors on other interfaces. This way, you can leave the label protocol as tdp (the default) on all interfaces connecting to other Cisco devices while specifying LDP on others.

The MPLS MTU size can also be set to values between 64 and 65,536 in order to accommodate situations in which label sizes have to be accounted for during MTU computation. This typically is an issue only on Ethernet interfaces.

For example, on an Ethernet interface, you'd normally have a maximum data size of 1500 bytes. After the Ethernet encapsulation has been added, this equals 1518 bytes (the maximum allowable size of an Ethernet frame). However, because of the fact that certain end-user applications don't use Path MTU Discovery to discover the maximum MTU size, you can receive 1500-byte IP packets with the Don't Fragment (DF) bit set. When this arrives at an ingress LER, the LER adds 4 or more bytes of MPLS header(s). The LER needs to fragment the packet, but it cannot do so because the DF bit is set. In such situations, if the LSR and the Layer 2 switches that are downstream from the LSR accommodate jumbo packets (also called baby giants), it is possible to transmit 1504-byte packets (with one MPLS label) or more on the Ethernet by setting the MPLS MTU to 1504. You compute the IP MTU by subtracting the number of labels from the MPLS MTU:

graphics/02equ01.gif


The maximum number of labels in your network depends on several factors. For example, if an LSR is a PE in an MPLS-VPN network, it requires at least two labels. A third label is also imposed if the LSR is the headend of an MPLS TE tunnel. Using Fast ReRoute (see Chapter 7, "Protection and Restoration") might add another label to the mix, making your maximum label size 4. If the IP MTU on an interface is 1500, your best bet is to set the MPLS MTU to 1516 (1500 + (4 * 4)). Setting the MPLS MTU higher than you need doesn't hurt anything, so you might want to set the MPLS MTU to 1516 or 1520 on all Ethernet interfaces as a general practice.

The show mpls forwarding a.b.c.d detail command displays the label stack used to forward a data packet to subnet a.b.c.d. Example 2-22 shows the output of show mpls forwarding detail on 7200a when directed LDP is run on top of TE tunnel tunnel1. In this example, you can see the label stack containing two labels, 12335 and 43. 12335 is the tunnel label, and 43 is the result of LDP over it.

Example 2-22 Label Stack Information Obtained Through show mpls forwarding detail

7200a#show mpls forwarding 13.13.13.13 detail

Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop

tag    tag or VC   or Tunnel Id      switched   interface

45     12326       13.13.13.13/32    0          PO3/0      point2point

        MAC/Encaps=4/8, MTU=4470, Tag Stack{12326}

        FF030281 03026000

        No output feature configured

    Per-destination load-sharing, slots: 0 2 4 6 8 10 12 14

       43          13.13.13.13/32    0          Tu1        point2point

        MAC/Encaps=4/12, MTU=4466, Tag Stack{12335 43}, via PO3/0

        FF030281 0302F0000002B000

        No output feature configured

    Per-destination load-sharing, slots: 1 3 5 7 9 11 13 15

Cell-Mode Interface Configuration

Example 2-23 shows the interface-level MPLS configuration for an ATM subinterface on a router for cell-mode operation.

Example 2-23 Cell-Mode ATM Configuration for an ATM Subinterface on a Router

12008a#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

mpls-12008a(config)#interface atm 3/0

mpls-12008a(config-if)#no ip address

mpls-12008a(config-if)#no atm ilmi-keepalive

mpls-12008a(config-if)#exit

mpls-12008a(config)#interface atm 3/0.1 mpls

mpls-12008a(config-subif)#ip address 10.0.4.5 255.255.255.0

mpls-12008a(config-subif)#mpls ip

mpls-12008a(config-subif)#mpls ldp address-message

mpls-12008a(config)#mpls ldp atm ?

  control-mode  Select LSP setup control mode for MPLS VCs

  vc-merge      Select VC merge capability

Configuring MPLS forwarding and LDP on routers for cell-mode ATM is done on ATM subinterfaces. In addition to the commands done at the subinterface level, the following three router-level commands are specific to ATM:

  • mpls ldp address-message— Cisco LSRs do not send address binding by default on ATM devices. This command enables sending the address binding.

  • mpls ldp atm [control | vc-merge]— This global command can be used to specify ATM-related control. Both independent and ordered are supported. Configuring vc-merge allows the LSR to perform VC Merge. VC Merge is off by default.

  • mpls ldp loop-detection— This router-level command enables loop detection, which is off by default on Cisco routers.

Verifying Your LDP Configuration

To verify the configuration, the following commands are useful:

  • show mpls ldp discovery

  • show mpls ldp neighbor

  • show mpls interfaces [detail]

The discovery command option is useful to verify that hellos are being received from neighbors.

Example 2-24 shows the output from the show mpls ldp discovery command.

Example 2-24 show mpls ldp discovery Command Output Shows a List of Interfaces Over Which the LDP Discovery Process Is Running

12008a#show mpls ldp discovery

Local LDP Identifier:

    5.5.5.5:0

Discovery Sources:

    Interfaces:

        POS1/0 (ldp): xmit/recv

            LDP Id: 11.11.11.11:0

        POS2/0 (ldp): xmit/recv

            LDP Id: 3.3.3.3:0

        POS2/1 (ldp): xmit/recv

            LDP Id: 4.4.4.4:0

        ATM3/0.1 (ldp): xmit/recv

            LDP Id: 11.11.11.11:1; IP addr: 10.0.4.11

mpls-12008a#

If you don't see recv for an interface, hello packets were not received. In the context of serial interfaces using PPP encapsulation, this could mean that there is a PPP negotiation issue.

The show mpls ldp neighbor command, shown in Example 2-25, is useful to get more details, such as the addresses bound to a neighbor and the neighbor's LSR ID. If you have not explicitly configured the LDP identifier address using the mpls ldp router-id command, LDP might pick a different interface address than you intended. In such cases, the Peer LDP Ident field helps identify the problem.

Example 2-25 show mpls ldp neighbor Command Output Shows the Status of LDP Sessions

12008a#show mpls ldp neighbor

Peer LDP Ident: 4.4.4.4:0; Local LDP Ident 5.5.5.5:0

        TCP connection: 4.4.4.4.646 - 5.5.5.5.11000

        State: Oper; Msgs sent/rcvd: 67/65; Downstream

        Up time: 00:39:40

        LDP discovery sources:

          POS2/1

        Addresses bound to peer LDP Ident:

          7.1.5.110       10.0.1.4        4.4.4.4         10.0.3.4

Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 5.5.5.5:0

        TCP connection: 3.3.3.3.646 - 5.5.5.5.11001

        State: Oper; Msgs sent/rcvd: 66/65; Downstream

        Up time: 00:39:40

        LDP discovery sources:

          POS2/0

        Addresses bound to peer LDP Ident:

          7.1.5.113       10.0.1.3        3.3.3.3         10.0.2.3

Peer LDP Ident: 11.11.11.11:0; Local LDP Ident 5.5.5.5:0

        TCP connection: 11.11.11.11.11011 - 5.5.5.5.646

        State: Oper; Msgs sent/rcvd: 65/63; Downstream

        Up time: 00:38:24

        LDP discovery sources:

          POS1/0

        Addresses bound to peer LDP Ident:

          10.0.19.11      10.0.17.11      10.0.4.11       7.1.5.100

          11.11.11.11     10.0.5.11

Peer LDP Ident: 11.11.11.11:1; Local LDP Ident 5.5.5.5:1

        TCP connection: 10.0.4.11.11013 - 10.0.4.5.646

        State: Oper; Msgs sent/rcvd: 43/43; Downstream on demand

        Up time: 00:24:20

        LDP discovery sources:

          ATM3/0.1

The TCP connection information comes in handy when you are having problems with your session.

The State field is yet another place to check to see if everything is all right with the neighbor in question as far as your LDP session is concerned. Obviously, Oper (Operational) is good. If for any reason the session is not operational, you do not see an entry for this neighbor.

The discovery sources field is useful when you have multiple links between two LSRs. In such cases, losing one link between the LSRs does not result in the session's going down. You can observe this in the output of this show command.

Finally, the show mpls interfaces detail command is useful for checking things such as an interface's MPLS MTU size, as demonstrated in Example 2-26. The interesting information in this output is highlighted.

Example 2-26 show mpls interfaces detail Command Output Displays Detailed Label Switching Information

12008a#show mpls interfaces detail

Interface Ethernet0:

        IP labeling enabled (ldp)

        LSP Tunnel labeling not enabled

        MPLS Frame Relay Transport labeling not enabled

        BGP labeling not enabled

        MPLS operational

        MTU = 1504

Interface POS1/0:

        IP labeling enabled (ldp)

        LSP Tunnel labeling enabled

        MPLS Frame Relay Transport labeling not enabled

        MPLS operational

        MTU = 4470

Interface POS2/0:

        IP labeling enabled (ldp)

        LSP Tunnel labeling not enabled

        MPLS Frame Relay Transport labeling not enabled

        MPLS operational

        MTU = 4470

Interface POS2/1:

        IP labeling enabled (ldp)

        LSP Tunnel labeling enabled

        MPLS Frame Relay Transport labeling not enabled

        MPLS operational

        MTU = 4470

Interface ATM3/0.1:

        IP labeling enabled (ldp)

        LSP Tunnel labeling not enabled

        MPLS Frame Relay Transport labeling not enabled

        MPLS operational

        MTU = 4470

        ATM labels: Label VPI = 1, Control VC = 0/32

IP labeling enabled shows (ldp), meaning that the label imposition and switching are based on label bindings derived from LDP. This could be (tdp) if the TDP protocol were used on interface POS1/0. LSP Tunnel labeling enabled means that MPLS TE has been enabled on that interface. In Example 2-26, you can see that it is enabled for POS1/0 but not for POS2/0. This is a good place to see if MPLS MTU has been bumped up, as in the case of Ethernet/0, which has been increased from the default 1500 to 1504. Finally, for the LC-ATM interface ATM3/0.1, you can see the VPI being used and the control VC. In a multivendor environment, these default values might not be the same between two vendors and might have to be modified.

Configuring Session Attributes

In some cases, you might want to change the default LDP Hello and Holdtime parameters. Example 2-27 shows how you can find out what the current LDP parameter values are.

Example 2-27 Verifying Hello and Holdtime Intervals

12008a#show mpls ldp parameters

Protocol version: 1

Downstream label generic region: min label: 12304; max label: 100000

Session hold time: 180 sec; keep alive interval: 60 sec

Discovery hello: holdtime: 15 sec; interval: 5 sec

Discovery targeted hello: holdtime: 180 sec; interval: 5 sec

Downstream on Demand max hop count: 255

TDP for targeted sessions

LDP initial/maximum backoff: 15/120 sec

LDP loop detection: off

Example 2-28 shows how the default discovery hello holdtime can be changed.

Example 2-28 Configuring Holdtime and Hello Intervals

12008a#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

12008a(config)#mpls ldp dis

12008a(config)#mpls ldp discovery hello ?

  holdtime  LDP discovery Hello holdtime

  interval  LDP discovery Hello interval

12008a(config)#mpls ldp discovery hello holdtime ?

  <1-2147483>  Holdtime in seconds

12008a(config)#mpls ldp discovery hello holdtime 240

Example 2-29 shows how you can verify the configuration changes you made.

Example 2-29 Verifying LDP Parameters

12008a#show mpls ldp parameters

Protocol version: 1

Downstream label generic region: min label: 12304; max label: 100000

Session hold time: 180 sec; keep alive interval: 60 sec

Discovery hello: holdtime: 240 sec; interval: 5 sec

Discovery targeted hello: holdtime: 180 sec; interval: 5 sec

Downstream on Demand max hop count: 255

TDP for targeted sessions

LDP initial/maximum backoff: 15/120 sec

LDP loop detection: off

As you can see from the highlighted text in Example 2-29, the discovery holdtime has been changed to 240.

    Previous Section  < Free Open Study >  Next Section