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

A Review of Simple VPN Configuration 223

On the PE2 router, you configure MPLS for Serial 0/0 only with the following commands:

PE1#config t

PE1(config)#ip cef

PE1(config)#mpls ip

PE1(config-if)#interface serial 0/0

PE1(config-if)#mpls ip

Since you will be implementing MPLS VPNs, go ahead and set up MPBGP between PE1 and PE2.

On the PE1 router PE1, you configure MP-BGP with the following commands:

PE1#config t

PE1(config)#router bgp 1 PE1(config-router)#address-family vpnv4

PE1(config-router)#neighbor 192.168.1.4 activate PE1(config-router)#neighbor 192.168.1.4 next-hop-self PE1(config-router)#neighbor 192.168.1.4 send-community both

On the PE2 router, you configure MP-BGP with the following commands:

PE2#config t

PE2(config)#router bgp 1 PE2(config-router)#address-family vpnv4

PE2(config-router)#neighbor 192.168.1.1 activate PE2(config-router)#neighbor 192.168.1.1 next-hop-self PE1(config-router)#neighbor 192.168.1.1 send-community both

Simple VPN Configuration

To set up a simple VPN for Customer X, VRFs need to be configured on PE1 and PE2. You’ll need to create a VRF; let’s call it customer_x. You’ll use a route distinguisher of 1:1 and a route target of 1:1. Here are the commands to accomplish this:

PE1#config t

PE1(config)#ip vrf customer_x

PE1(config-vrf)#rd 1:1

PE1(config-vrf)#route-target both 1:1

Copyright ©2002 SYBEX, Inc., Alameda, CA

www.sybex.com

224 Chapter 6 MPLS VPNs and RIP

The route-target both command is the equivalent of entering the two commands route-target import and route-target export. When you view the configuration with the show running-configuration command, you’ll see the configuration as route-target import and route-target export. The route-target both command is a shortcut.

To place the Serial 0/1 interface on PE1 into the VRF for Customer X, use the following commands:

PE1#config t

PE1(config)#interface serial 0/1

PE1(config-if)#ip vrf forwarding customer_x

Remember that the IP address on the interface goes away after it is associated with a VRF. You’ll need to configure it with the IP address again, as follows:

PE1(config-if)#ip address 10.2.0.1 mask 255.255.0.0

The configuration of PE2 is pretty much a repeat of the configuration of PE1:

PE2#config t

PE2(config)#ip vrf customer_x

PE2(config-vrf)#rd 1:1

PE2(config-vrf)#route-target both 1:1

PE2(config-vrf)#exit

PE1(config)#interface serial 0/1

PE1(config-if)#ip vrf forwarding customer_x

PE1(config-if)#ip address 10.3.0.1 mask 255.255.0.0

Configuring the PE-CE Routing Protocol

The last thing you need to do is configure a routing protocol between the PE routers and the Customer X routers. Let’s configure RIPv2. The first step is to get the customer routers running RIPv2. Here are the commands for Customer X1:

CustomerX1#config t

CustomerX1(config)#router rip

CustomerX1(config-router)#version 2

CustomerX1(config-router)#network 10.0.0.0

You need to execute the same commands on Customer X2:

CustomerX2#config t

Copyright ©2002 SYBEX, Inc., Alameda, CA

www.sybex.com