Configuring a Basic MPLS P Router

Problem

You want to set up the core of an MPLS network.

Solution

For the P routers in the core of the MPLS network, the primary requirement is to enable CEF and turn on MPLS on each of the interfaces that will be forwarding MPLS tagged packets. In this example, we have also enabled OSPF as a dynamic routing protocol within the MPLS core:

Router-P1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-P1(config)#ip cef
Router-P1(config)#mpls ip
Router-P1(config)#interface FastEthernet0/0
Router-P1(config-if)#description connection to Router-PE2
Router-P1(config-if)#ip address 10.1.2.11 255.255.255.0
Router-P1(config-if)#mpls ip
Router-P1(config-if)#exit
Router-P1(config)#interface Serial0/0
Router-P1(config-if)#description connection to Router-PE1
Router-P1(config-if)#ip address 10.1.1.14 255.255.255.252
Router-P1(config-if)#mpls ip
Router-P1(config-if)#exit
Router-P1(config)#interface Serial0/1
Router-P1(config-if)#description connection to Router-PE3
Router-P1(config-if)#ip address 10.1.1.10 255.255.255.252
Router-P1(config-if)#mpls ip
Router-P1(config-if)#exit
Router-P1(config)#interface Loopback0
Router-P1(config-if)#ip address 10.0.0.11 255.255.255.255
Router-P1(config-if)#exit
Router-P1(config)#router ospf 99
Router-P1(config-router)#router-id 10.0.0.11
Router-P1(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router-P1(config-router)#exit
Router-P1(config)#end
Router-P1#

 

Discussion

There are several things to note in this example. Firstly, enabling MPLS is simply a matter of enabling CEF globally on the router with the ip cef command, and then enabling MPLS on each interface with the mpls ip command:

Router-P1(config)#ip cef
Router-P1(config)#mpls ip
Router-P1(config)#interface FastEthernet0/0
Router-P1(config-if)#mpls ip

In some older references, the interface command for enabling MPLS on an interface is tag-switching ip instead of mpls ip. Both commands are accepted on most 12.x IOS levels. All IOS levels up to and including Version 12.3 automatically rewrite the new command into the old form. More confusingly, some IOS devices, such as the Lightstream 1010, interpret the mpls ip command as the global command and tag-switching ip as the interface command. So, on these devices, you may think that you have enabled MPLS on the interface when you have in fact just re-enabled it globally. So you should recheck your configuration after you have typed it to ensure that it is still what you intended.

We also note in passing that the global command, mpls ip, is often not required, as the router will forward MPLS packets by default when the interface level command is enabled. However, we have included this command here just in case the global forwarding behavior has been disabled. You can disable MPLS packet forwarding for the entire router by simply entering the "no" form of the global command:

Router-P1(config)#no mpls ip

The next thing to notice is that we have enabled MPLS on a FastEthernet interface and two Serial interfaces. You can run MPLS on a very wide variety of interface types. Later in this chapter, to save on physical connections, we will configure MPLS on Ethernet subinterfaces to allow us to use VLANs. MPLS also works well over ATM, as we will discuss in a subsequent recipe.

When you enable MPLS on an interface, the router automatically starts looking for LDP or TDP packets. Most Cisco devices support both and will auto-sense which one their neighbor is using, and most will run the Cisco proprietary TDP by default, but switch to the open standard LDP if they detect LDP packets coming from the neighbor. So you generally don't need to worry about which one you want to run, the router will automatically select the appropriate protocol.

In the example, we are using OSPF as an Interior Gateway Protocol (IGP) within the MPLS core. Remember that this MPLS core is itself just an IP network, so we need to distribute routing information. You could in principle use any routing protocol you choose for this purpose. However, some ATM switches, notably the Lightstream 1010, only support OSPF for use with MPLS, making it the most natural choice for the MPLS core IGP. For more information on OSPF, please refer to Chapter 8:

Router-P1(config)#interface Loopback0
Router-P1(config-if)#ip address 10.0.0.11 255.255.255.255
Router-P1(config-if)#exit
Router-P1(config)#router ospf 99
Router-P1(config-router)#router-id 10.0.0.11
Router-P1(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router-P1(config-router)#exit

It is a good general practice to use a real IP address on the device for the OSPF router ID. This is because the OSPF Router-ID appears in the neighbor display, and it is often much easier to troubleshoot problems with your IGP if you can do simple PING and Telnet tests to this address:

Router-P1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
10.0.0.3 0 FULL/ - 00:00:32 10.1.1.9 Serial0/1
10.0.0.2 0 FULL/ - 00:00:31 10.1.1.13 Serial0/0
10.0.0.4 1 FULL/DR 00:00:36 10.1.2.4 FastEthernet0/0
Router-P1#

There are three useful commands for verifying basic functionality of your MPLS P routers. The first simply shows you the status of all of your MPLS interfaces:

Router-P1#show mpls interfaces
Interface IP Tunnel Operational
FastEthernet0/0 Yes (tdp) No Yes
Serial0/0 Yes (tdp) No Yes
Serial0/1 Yes (tdp) No Yes
Router-P1#

In this example, you can see that the three interfaces that we configured for MPLS are all listed and flagged as "Operational."

The next command allows you to see information about the LDP or TDP neighbor relationships with each of these neighbors:

Router-P1#show mpls ldp neighbor
 Peer TDP Ident: 10.0.0.2:0; Local TDP Ident 10.0.0.11:0
 TCP connection: 10.0.0.2.711 - 10.0.0.11.28185
 State: Oper; PIEs sent/rcvd: 0/82; Downstream
 Up time: 01:04:45
 TDP discovery sources:
 Serial0/0, Src IP addr: 10.1.1.13
 Addresses bound to peer TDP Ident:
 10.0.0.2 10.1.1.2 10.1.1.13
 Peer TDP Ident: 10.0.0.3:0; Local TDP Ident 10.0.0.11:0
 TCP connection: 10.0.0.3.711 - 10.0.0.11.57014
 State: Oper; PIEs sent/rcvd: 0/79; Downstream
 Up time: 01:04:33
 TDP discovery sources:
 Serial0/1, Src IP addr: 10.1.1.9
 Addresses bound to peer TDP Ident:
 10.0.0.3 10.1.1.9 10.1.1.6
 Peer TDP Ident: 10.0.0.4:0; Local TDP Ident 10.0.0.11:0
 TCP connection: 10.0.0.4.711 - 10.0.0.11.21206
 State: Oper; PIEs sent/rcvd: 0/77; Downstream
 Up time: 01:04:50
 TDP discovery sources:
 FastEthernet0/0, Src IP addr: 10.1.2.4
 Addresses bound to peer TDP Ident:
 10.0.0.4 10.1.2.4
Router-P1#

This command is particularly useful if the output of the show mpls interfaces command indicated that one or more interfaces were not operational. You can see in this output both the IP address of the neighboring device and a Peer TDP ID. This peer ID value comes from a Loopback interface, if one has been configured, and identifies the entire device. This is particularly useful in situations when you have multiple links between neighboring devices. You will also notice that this display includes the IP address of the nearest interface on the neighboring device, as well as a list of all other addresses used by this device.

This display can also be useful for what it doesn't include. If you are having trouble getting an MPLS interface to become operational, you should check the TDP neighbor command to see if the router has discovered any neighbors at all on this interface. If not, then you might have a connection problem, or perhaps the neighbor is not properly configured for MPLS.

The third extremely useful command on MPLS P routers looks at the MPLS forwarding table :

Router-P1#show mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 10.0.0.2/32 7697 Se0/0 point2point
17 Pop tag 10.1.1.0/30 0 Se0/0 point2point
18 Pop tag 10.0.0.3/32 6685 Se0/1 point2point
19 Pop tag 10.1.1.4/30 0 Se0/1 point2point
20 21 10.0.0.1/32 0 Se0/0 point2point
 21 10.0.0.1/32 0 Se0/1 point2point
21 Pop tag 10.0.0.4/32 19700 Fa0/0 10.1.2.4
Router-P1#

This output shows you all of the MPLS tags that are currently in use and which interfaces they point to. It is often useful to look at the "Outgoing interface" and "Next Hop" columns to ensure that a given route prefix is taking the path that you expect.

See Also

Chapter 8






Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net