MPLS Traffic Engineering with Autoroute
Problem
You want to use the Autoroute feature to automatically maintain traffic-engineered paths through your MPLS network.
Solution
This recipe uses Cisco's Autoroute feature for managing Traffic Engineering (TE) with OSPF in an MPLS network. For this method, we must explicitly define all of the traffic paths and associate them with Tunnels on the PE routers:
Router-PE1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-PE1(config)#mpls traffic-eng tunnels
Router-PE1(config)#interface Loopback0
Router-PE1(config-if)#ip address 10.0.0.2 255.255.255.255
Router-PE1(config-if)#exit
Router-PE1(config)#interface Tunnel11
Router-PE1(config-if)#ip unnumbered Loopback0
Router-PE1(config-if)#tunnel destination 10.0.0.3
Router-PE1(config-if)#tunnel mode mpls traffic-eng
Router-PE1(config-if)#tunnel mpls traffic-eng autoroute announce
Router-PE1(config-if)#tunnel mpls traffic-eng priority 7 7
Router-PE1(config-if)#tunnel mpls traffic-eng bandwidth 256
Router-PE1(config-if)#tunnel mpls traffic-eng path-option 1 explicit name def-PE3
Router-PE1(config-if)#exit
Router-PE1(config)#interface Tunnel12
Router-PE1(config-if)#ip unnumbered Loopback0
Router-PE1(config-if)#tunnel destination 10.0.0.3
Router-PE1(config-if)#tunnel mode mpls traffic-eng
Router-PE1(config-if)#tunnel mpls traffic-eng autoroute announce
Router-PE1(config-if)#tunnel mpls traffic-eng priority 7 7
Router-PE1(config-if)#tunnel mpls traffic-eng bandwidth 256
Router-PE1(config-if)#tunnel mpls traffic-eng path-option 1 explicit name hi-PE3
Router-PE1(config-if)#exit
Router-PE1(config)#interface Serial0/0
Router-PE1(config-if)#ip address 10.1.1.13 255.255.255.252
Router-PE1(config-if)#mpls traffic-eng tunnels
Router-PE1(config-if)#tag-switching ip
Router-PE1(config-if)#ip rsvp bandwidth 512
Router-PE1(config-if)#exit
Router-PE1(config)#interface ATM1/0.1 tag-switching
Router-PE1(config-subif)#ip address 10.1.1.2 255.255.255.252
Router-PE1(config-subif)#mpls traffic-eng tunnels
Router-PE1(config-subif)#tag-switching ip
Router-PE1(config-subif)#ip rsvp bandwidth 4000
Router-PE1(config-subif)#exit
Router-PE1(config)#router ospf 99
Router-PE1(config-router)#router-id 10.0.0.2
Router-PE1(config-router)#log-adjacency-changes
Router-PE1(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router-PE1(config-router)#mpls traffic-eng router-id Loopback0
Router-PE1(config-router)#mpls traffic-eng area 0
Router-PE1(config-router)#exit
Router-PE1(config)#ip explicit-path name def-PE3 enable
Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.14
Explicit Path name def-PE3:
1: next-address 10.1.1.14
Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.9
Explicit Path name def-PE3:
1: next-address 10.1.1.14
2: next-address 10.1.1.9
Router-PE1(cfg-ip-expl-path)#exit
Router-PE1(config)#ip explicit-path name hi-PE3 enable
Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.1
Explicit Path name hi-PE3:
1: next-address 10.1.1.1
Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.6
Explicit Path name hi-PE3:
1: next-address 10.1.1.1
2: next-address 10.1.1.6
Router-PE1(cfg-ip-expl-path)#exit
Router-PE1(config)#end
Router-PE1#
The other PE router has a similar configuration:
Router-PE3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-PE3(config)#mpls traffic-eng tunnels
Router-PE3(config)#interface Loopback0
Router-PE3(config-if)#ip address 10.0.0.3 255.255.255.255
Router-PE3(config-if)#exit
Router-PE3(config)#interface Tunnel11
Router-PE3(config-if)#ip unnumbered Loopback0
Router-PE3(config-if)#tunnel destination 10.0.0.2
Router-PE3(config-if)#tunnel mode mpls traffic-eng
Router-PE3(config-if)#tunnel mpls traffic-eng autoroute announce
Router-PE3(config-if)#tunnel mpls traffic-eng priority 7 7
Router-PE3(config-if)#tunnel mpls traffic-eng bandwidth 256
Router-PE3(config-if)#tunnel mpls traffic-eng path-option 1 explicit name def-PE1
Router-PE3(config-if)#exit
Router-PE3(config)#interface Tunnel12
Router-PE3(config-if)#ip unnumbered Loopback0
Router-PE3(config-if)#tunnel destination 10.0.0.2
Router-PE3(config-if)#tunnel mode mpls traffic-eng
Router-PE3(config-if)#tunnel mpls traffic-eng autoroute announce
Router-PE3(config-if)#tunnel mpls traffic-eng priority 7 7
Router-PE3(config-if)#tunnel mpls traffic-eng bandwidth 256
Router-PE3(config-if)#tunnel mpls traffic-eng path-option 1 explicit name hi-PE1
Router-PE3(config-if)#exit
Router-PE3(config)#interface Serial0/0
Router-PE3(config-if)#ip address 10.1.1.9 255.255.255.252
Router-PE3(config-if)#mpls traffic-eng tunnels
Router-PE3(config-if)#tag-switching ip
Router-PE3(config-if)#ip rsvp bandwidth 512
Router-PE3(config-if)#exit
Router-PE3(config)#interface ATM1/0.1 tag-switching
Router-PE3(config-subif)#ip address 10.1.1.6 255.255.255.252
Router-PE3(config-subif)#mpls traffic-eng tunnels
Router-PE3(config-subif)#tag-switching ip
Router-PE3(config-subif)#ip rsvp bandwidth 4000
Router-PE3(config-subif)#exit
Router-PE3(config)#router ospf 99
Router-PE3(config-router)#router-id 10.0.0.3
Router-PE3(config-router)#log-adjacency-changes
Router-PE3(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router-PE3(config-router)#mpls traffic-eng router-id Loopback0
Router-PE3(config-router)#mpls traffic-eng area 0
Router-PE3(config-router)#exit
Router-PE3(config)#ip explicit-path name def-PE1 enable
Router-PE3(cfg-ip-expl-path)#next-address 10.1.1.10
Explicit Path name def-PE1:
1: next-address 10.1.1.10
Router-PE3(cfg-ip-expl-path)#next-address 10.1.1.13
Explicit Path name def-PE1:
1: next-address 10.1.1.10
2: next-address 10.1.1.13
Router-PE3(cfg-ip-expl-path)#exit
Router-PE3(config)#ip explicit-path name hi-PE1 enable
Router-PE3(cfg-ip-expl-path)#next-address 10.1.1.5
Explicit Path name hi-PE1:
1: next-address 10.1.1.5
Router-PE3(cfg-ip-expl-path)#next-address 10.1.1.2
Explicit Path name hi-PE1:
1: next-address 10.1.1.5
2: next-address 10.1.1.2
Router-PE3(cfg-ip-expl-path)#exit
Router-PE3(config)#end
Router-PE3#
Then we have to configure the P routers, which are somewhat simpler because they don't require tunnels or explicit path definitions. We will show only one P router because they are all essentially the same:
Router-P1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router-P1(config)#mpls traffic-eng tunnels
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)#interface Serial0/0
Router-P1(config-if)#ip address 10.1.1.14 255.255.255.252
Router-P1(config-if)#tag-switching ip
Router-P1(config-if)#mpls traffic-eng tunnels
Router-P1(config-if)#ip rsvp bandwidth 512
Router-P1(config-if)#exit
Router-P1(config)#interface Serial0/1
Router-P1(config-if)#ip address 10.1.1.10 255.255.255.252
Router-P1(config-if)#tag-switching ip
Router-P1(config-if)#mpls traffic-eng tunnels
Router-P1(config-if)#ip rsvp bandwidth 512
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)#log-adjacency-changes
Router-P1(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router-P1(config-router)#mpls traffic-eng router-id Loopback0
Router-P1(config-router)#mpls traffic-eng area 0
Router-P1(config-router)#exit
Router-P1(config)#end
Router-P1#
Discussion
Traffic Engineering (TE) is a large and complicated topic in itself, and a detailed discussion is out of the scope of this book. For more information, we encourage the reader to refer to one of the many books dedicated to MPLS networking.
In this example, we take advantage of OSPF to distribute information about resource utilization within the MPLS cloud. OSPF uses LSP number 10, the so-called Opaque LSP, to flood this information throughout the area. We enable this feature by using the mpls traffic-eng OSPF configuration commands:
Router-PE3(config)#router ospf 99
Router-PE3(config-router)#router-id 10.0.0.3
Router-PE3(config-router)#log-adjacency-changes
Router-PE3(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router-PE3(config-router)#mpls traffic-eng router-id Loopback0
Router-PE3(config-router)#mpls traffic-eng area 0
Since these TE LSPs are only flooded within the area, we have to specify the area to be used. In this case, everything is in Area 0. We have also specified a stable Loopback interface as the source for all TE LSPs to ensure that the information contained in these updates is consistent. Note that although the TE router-id is the same as the main OSPF router ID in this case, this is not always true. Recall from Chapter 8 that the main OSPF router ID is an arbitrary 32-bit value that does not need to be associated with any interfaces on the router.
The bandwidth resource information that the routers send using this method comes from RSVP, which we discuss in greater detail in Chapter 11. We enable RSVP on each MPLS interface and associate with it a maximum reservable bandwidth512 Kbps, in this case:
Router-PE1(config)#interface Serial0/0
Router-PE1(config-if)#ip address 10.1.1.13 255.255.255.252
Router-PE1(config-if)#mpls traffic-eng tunnels
Router-PE1(config-if)#tag-switching ip
Router-PE1(config-if)#ip rsvp bandwidth 512
This underscores one of the important features of TE tunnels. You can think of them as bandwidth reserved point-to-point virtual circuits between PE routers, across the MPLS cloud. RSVP handles the bandwidth reservation.
But the big trick to this particular type of MPLS TE is the use of special tunnels between the PE routers:
Router-PE1(config)#interface Tunnel11
Router-PE1(config-if)#ip unnumbered Loopback0
Router-PE1(config-if)#tunnel destination 10.0.0.3
Router-PE1(config-if)#tunnel mode mpls traffic-eng
Router-PE1(config-if)#tunnel mpls traffic-eng autoroute announce
Router-PE1(config-if)#tunnel mpls traffic-eng priority 7 7
Router-PE1(config-if)#tunnel mpls traffic-eng bandwidth 256
Router-PE1(config-if)#tunnel mpls traffic-eng path-option 1 explicit name def-PE3
In this case, we have defined a tunnel from Router-PE1 to Router-PE3. The tunnel mode command specifies that this is to be an MPLS TE tunnel. Recall that in Chapter 12 we looked at other tunnel types such as GRE. This is similar to those tunnels in that it can carry a wide variety of protocols. However it is dynamically generated by the MPLS TE process whenever it is required. The priority and bandwidth options define parameters that the TE process can use to determine which tunnels and which pathways may be used.
The most interesting command in this tunnel configuration is the last one, which associates this tunnel with an explicit path through the MPLS cloud. In this case, the path is named def-PE3, and it is defined using the ip explicit-path command:
Router-PE1(config)#ip explicit-path name def-PE3 enable
Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.14
Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.9
Usually in IP networking we don't want to explicitly define paths through the network for two main reasons. First, it doesn't scale well, and second, we usually want the routing protocol to select the best path for us. With TE, however, we do want to exercise control over which of many possible paths a particular conversation might take.
In this example, we have defined two flows, one through each of the two available paths, and have named them "def" and "hi" for default and high priority, respectively. You could use this in conjunction with the MPLS QoS functionality discussed in Recipe 26.9 to make sure that high priority traffic is sent through a different physical path through the network than low priority traffic.
The big advantage to using an IGP like OSPF to control these TE tunnels is that we can still have all of the fault tolerance afforded by multiple paths through the network. And, at the same time, we can ensure that all of the available paths are used appropriately to maximize throughput or to balance the internal loading of the network.
You can see which tunnels are in use with the show mpls traffic-eng tunnels command:
Router-PE1#show mpls traffic-eng tunnels
Name: Router-PE1_t11 (Tunnel11) Destination: 10.0.0.3
Status:
Admin: up Oper: up Path: valid Signalling: connected
path option 1, type explicit def-PE3 (Basis for Setup, path weight 128)
Config Parameters:
Bandwidth: 256 kbps (Global) Priority: 7 7 Affinity: 0x0/0xFFFF
Metric Type: TE (default)
AutoRoute: enabled LockDown: disabled Loadshare: 256 bw-based
auto-bw: disabled
InLabel : -
OutLabel : Serial0/0, 18
RSVP Signalling Info:
Src 10.0.0.2, Dst 10.0.0.3, Tun_Id 11, Tun_Instance 16
RSVP Path Info:
My Address: 10.0.0.2
Explicit Route: 10.1.1.14 10.1.1.9 10.0.0.3
Record Route: NONE
Tspec: ave rate=256 kbits, burst=1000 bytes, peak rate=256 kbits
RSVP Resv Info:
Record Route: NONE
Fspec: ave rate=256 kbits, burst=1000 bytes, peak rate=256 kbits
History:
Tunnel:
Time since created: 2 hours, 14 minutes
Time since path change: 2 hours, 12 minutes
Current LSP:
Uptime: 2 hours, 12 minutes
Name: Router-PE1_t12 (Tunnel12) Destination: 10.0.0.3
Status:
Admin: up Oper: down Path: not valid Signalling: Down
path option 1, type explicit hi-PE3
Config Parameters:
Bandwidth: 256 kbps (Global) Priority: 7 7 Affinity: 0x0/0xFFFF
Metric Type: TE (default)
AutoRoute: enabled LockDown: disabled Loadshare: 256 bw-based
auto-bw: disabled
History:
Tunnel:
Time since created: 2 hours, 14 minutes
Path Option 1:
Last Error: PCALC:: Explicit path has unknown address, 10.1.1.1
LSP Tunnel Router-PE3_t11 is signalled, connection is up
InLabel : Serial0/0, implicit-null
OutLabel : -
RSVP Signalling Info:
Src 10.0.0.3, Dst 10.0.0.2, Tun_Id 11, Tun_Instance 30
RSVP Path Info:
My Address: 10.0.0.2
Explicit Route: NONE
Record Route: NONE
Tspec: ave rate=256 kbits, burst=1000 bytes, peak rate=256 kbits
RSVP Resv Info:
Record Route: NONE
Fspec: ave rate=256 kbits, burst=1000 bytes, peak rate=256 kbits
Router-PE1#