Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco CCIP MPLS Study Guide - James Reagan.pdf
Скачиваний:
250
Добавлен:
24.05.2014
Размер:
6.47 Mб
Скачать

Running RIP in an MPLS VPN 217

Configuring Route Targets

Route targets are configured from inside VRF configuration. To configure an export route target, use the route-target export number command. To configure an import route target, use the route-target import number command.

It’s possible to have multiple import and export route targets. Chapter 8,

“Advanced MPLS Topics,” explains how this works.

Remember, route targets are attached to VPN routes when they are redistributed into MP-BGP (export route targets). Route targets are also used (or read) when routes are redistributed from MP-BGP back into the VRF routing protocol (import route targets).

Let me show you how all of this works. Since route distinguishers can’t be used to differentiate between routes in MP-BGP, route targets must be used.

On PE1, from VRF configuration, you need to configure route targets for vpn_a and vpn_b as follows:

PE1#config t

PE1(config)#ip vrf vpn_a

PE1(config-vrf)#route-target export 100:1

PE1(config-vrf)#exit

PE1(config)#ip vrf vpn_b

PE1(config-vrf)route-target export 500:7

Route Target Value Selection

For a simple VPN like the one I’m using to explain the configuration commands with, the route target value is usually the same as the route distinguisher value. You might be inclined to link the route distinguisher and route targets together because they can have the same values, but they serve very different purposes. The route distinguisher keeps IP prefixes from overlapping in MP-BGP. The route target is used to help differentiate VPN routes. Don’t confuse the two. The values in the example network of 100:1 and 500:7 are an attempt to keep you from linking the route distinguisher and route target values.

Copyright ©2002 SYBEX, Inc., Alameda, CA

www.sybex.com

218 Chapter 6 MPLS VPNs and RIP

Figure 6.12 illustrates VPN routes from PE1 with the configured route targets.

F I G U R E 6 . 1 2 VPN routes from PE1 with route targets

 

 

 

 

ip vrf vpn_a

 

 

 

 

 

 

 

 

rd 1:1

 

 

 

 

 

 

 

 

route-target export 100:1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Customer A1

R

10.1.0.0

 

 

 

 

 

 

10.1.0.0/16

 

 

 

C

10.2.0.0

 

 

MP-IBGP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

10.2.0.0

 

 

 

 

 

 

 

 

 

RD

NLRI

RT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1:1

10.1.0.0

100:1

 

 

 

 

 

 

 

 

1:1

10.2.0.0

100:1

 

 

 

PE1

 

 

 

 

1:2

10.1.0.0

500:7

 

 

 

ip vrf vpn_b

1:2

10.2.0.0

500:7

 

 

 

 

 

 

10.2.0.0

rd 1:2

 

 

 

 

 

 

 

 

 

10.1.0.0/16

 

 

 

route-target export 500:7

 

 

 

 

 

 

 

Customer B1

R

10.1.0.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C

10.2.0.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 6.13 illustrates VPN routes from PE1 as they arrive at PE2.

F I G U R E 6 . 1 3 VPN routes from PE1 arriving at PE2

From PE1

 

 

 

Customer A2

 

 

 

 

 

 

MP-IBGP

 

 

 

RD

 

NLRI

RT

 

 

1:1

10.1.0.0

100:1

PE2

 

1:1

10.2.0.0

100:1

 

 

 

1:2

10.1.0.0

500:7

 

 

1:2

10.2.0.0

500:7

Customer B2

When PE2 does a redistribute from MP-BGP into the routing protocol for a particular VRF, it needs to have an import route target configured. The configuration for PE2 is as follows:

PE2#config t

PE2(config)#ip vrf vpn_a

PE2(config-vrf)#route-target import 100:1

PE2(config-vrf)#exit

PE2(config)#ip vrf vpn_b

PE2(config-vrf)route-target import 500:7

Copyright ©2002 SYBEX, Inc., Alameda, CA

www.sybex.com