Você está na página 1de 13

Author: Shivlu Jain

Blog: http://shivlu.blogspot.com
MPLS TE Per VPN/VRF Basics
The congestion is becoming one of the stunning problem in network. In this document, I have tested
a scenarion which could be implemented by the MPLSVPN service providers to deliver SLA to their
esteemed clients in case the network is congested. MPLS TE is used to meet the objective with
area 0. Intra Area is not tested yet.

Topology

Two VRFs name TEST and TEST1 is created on R0 and R1. By default to reach R1 from R0, a directly
connected path is preferred i.e R0 --> R1. With the help of MPLS TE a tunnel is created for VRF TEST
which will follow the secondary path i.e. R0--> R2--> R1 but vrf TEST1 will follow the traditional path.

R0#sh ip vrf interfaces

Interface

IP-Address

VRF

Protocol

Lo100

192.168.1.2

TEST

up

Lo500

192.168.1.1

TEST1

up

Show Ip Route Of R0
Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks


O

172.16.200.1/32 [110/65] via 172.16.3.2, 00:00:06, Serial0/3

172.16.4.0/30 [110/128] via 172.16.3.2, 00:30:05, Serial0/3


[110/128] via 172.16.1.2, 00:30:05, Serial0/0

172.16.200.200/32 is directly connected, Loopback200

172.16.1.0/30 is directly connected, Serial0/0

172.16.3.0/30 is directly connected, Serial0/3

172.16.100.1/32 is directly connected, Loopback0

172.16.100.2/32 [110/65] via 172.16.3.2, 00:30:05, Serial0/3

172.16.100.3/32 [110/65] via 172.16.1.2, 00:30:05, Serial0/0

.
R0#traceroute 172.16.100.2
Type escape sequence to abort.
Tracing the route to 172.16.100.2
1 172.16.3.2 232 msec * 120 msec

R0#sh ip route vrf TEST


Routing Table: TEST
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.1.0/32 is subnetted, 2 subnets
B
192.168.1.1 [200/0] via 172.16.100.2, 00:13:09
C
192.168.1.2 is directly connected, Loopback100

R0#tracer vrf TEST 192.168.1.1


Type escape sequence to abort.
Tracing the route to 192.168.1.1
1 192.168.1.1 [MPLS: Label 20 Exp 0] 292 msec * 184 msec

Now SP want to change the traffic of VRF TEST via R2. To acomplish the task TE tunnel is created.
With TE a bgp next-hop attribute is used with in the vrf and a static route is imposed on the headend
router for this loopback. By doing this all the VRF TEST routes will come with the new loopback
instead of MP-iBGP loopback as next hop. The static route will forward the traffic within the tunnel
where the destination will be the new loopback.

R1#interface Loopback200
ip address 172.16.200.1 255.255.255.255
ip ospf 1 area 0
end

R1(config)#ip vrf TEST


R1(config-vrf)#bgp next-hop loo
R1(config-vrf)#bgp next-hop loopback 200

R0#sh ip route vrf TEST


192.168.1.0/32 is subnetted, 2 subnets
B
192.168.1.1 [200/0] via 172.16.200.1, 00:00:15
C
192.168.1.2 is directly connected, Loopback100
On remote router R0 next hop is changed 172.16.100.2 to 172.16.200.1.

Create a tunnel on R0
interface Tunnel100
ip unnumbered Loopback0
mpls ip
tunnel destination 172.16.100.2
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng path-option 1 explicit name TEST
R0#sh ip explicit-paths name TEST
PATH TEST (strict source route, path complete, generation 4)
1: next-address 172.16.1.2
2: next-address 172.16.4.2

Add the static route for loopbaclk on R0


R0(config)#ip route 172.16.200.1 255.255.255.255 tunnel 100
R0#tracer vrf TEST 192.168.1.1
Type escape sequence to abort.
Tracing the route to 192.168.1.1
1 172.16.1.2 [MPLS: Labels 16/20 Exp 0] 184 msec 196 msec 80 msec
2 192.168.1.1 [MPLS: Label 20 Exp 0] 220 msec * 152 msec
R0#tracer vrf TEST1 192.168.1.1
Type escape sequence to abort.
Tracing the route to 192.168.1.1
1 192.168.1.1 4 msec * 4 msec

Configs of R0
R0#sh running-config
Building configuration...
Current configuration : 2604 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R0
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
ip vrf TEST
rd 65500:1
route-target export 65500:1
route-target import 65500:1
bgp next-hop Loopback200
!
ip vrf TEST1
rd 65500:2
route-target export 65500:2
route-target import 65500:2
!
mpls label protocol ldp
mpls traffic-eng tunnels
!
interface Loopback0
ip address 172.16.100.1 255.255.255.255
ip ospf 1 area 0

!
interface Loopback100
ip vrf forwarding TEST
ip address 192.168.1.2 255.255.255.255
!
interface Loopback200
ip address 172.16.200.200 255.255.255.255
ip ospf 1 area 0
!
interface Loopback500
ip vrf forwarding TEST1
ip address 192.168.1.1 255.255.255.255
!
interface Tunnel10
no ip address
mpls ip
!
interface Tunnel100
ip unnumbered Loopback0
mpls ip
tunnel destination 172.16.100.2
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng path-option 1 explicit name TEST
no routing dynamic
!
interface Serial0/0
ip address 172.16.1.1 255.255.255.252
ip ospf 1 area 0
mpls label protocol ldp
mpls ip
mpls traffic-eng tunnels
serial restart-delay 0
no fair-queue
ip rsvp bandwidth 200 200
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
ip address 172.16.3.1 255.255.255.252
ip ospf 1 area 0
shutdown
mpls label protocol ldp

mpls ip
serial restart-delay 0
!
interface Serial0/3
ip address 172.16.3.1 255.255.255.252
ip ospf 1 area 0
mpls label protocol ldp
mpls ip
serial restart-delay 0
!
!
router ospf 1
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
log-adjacency-changes
!
router bgp 65500
bgp router-id 172.16.100.1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 172.16.100.2 remote-as 65500
neighbor 172.16.100.2 update-source Loopback0
!
address-family vpnv4
neighbor 172.16.100.2 activate
neighbor 172.16.100.2 send-community both
exit-address-family
!
address-family ipv4 vrf TEST1
redistribute connected
no synchronization
exit-address-family
!
address-family ipv4 vrf TEST
redistribute connected
no synchronization
exit-address-family
!
ip http server
no ip http secure-server
ip route 172.16.200.1 255.255.255.255 Tunnel100
!
ip explicit-path name TEST enable
next-address 172.16.1.2
next-address 172.16.4.2

!
!
!
mpls ldp router-id Loopback0 force
!
control-plane
!
line con 0
line aux 0
line vty 0 4
login
!

Configs Of R2
R2#s run
R2#show running-config
Building configuration...
Current configuration : 1261 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
mpls label protocol ldp

mpls traffic-eng tunnels


R2#h
R2#show run
R2#show running-config
Building configuration...
Current configuration : 1261 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
mpls label protocol ldp
mpls traffic-eng tunnels
!
interface Loopback0
ip address 172.16.100.3 255.255.255.255
ip ospf 1 area 0
!
interface Serial0/0
ip address 172.16.1.2 255.255.255.252
ip ospf 1 area 0
mpls label protocol ldp
mpls ip
mpls traffic-eng tunnels
serial restart-delay 0
no fair-queue
ip rsvp bandwidth 200 200
!

interface Serial0/1
ip address 172.16.4.1 255.255.255.252
ip ospf 1 area 0
mpls label protocol ldp
mpls ip
mpls traffic-eng tunnels
serial restart-delay 0
no fair-queue
ip rsvp bandwidth 200 200
ip rsvp resource-provider none
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
log-adjacency-changes
!
ip http server
no ip http secure-server
!
mpls ldp router-id Loopback0 force
!
control-plane
!
line con 0
line aux 0
line vty 0 4
login
!
!
end

Configs R1

R1#sh running-config
Building configuration...
Current configuration : 2667 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
ip vrf TEST
rd 65500:1
route-target export 65500:1
route-target import 65500:1
bgp next-hop Loopback200
!
ip vrf TEST1
rd 65500:2
route-target export 65500:2
route-target import 65500:2
!
mpls label protocol ldp
mpls traffic-eng tunnels
!
!
interface Loopback0
ip address 172.16.100.2 255.255.255.255
ip ospf 1 area 0
!
interface Loopback100

ip vrf forwarding TEST


ip address 192.168.1.1 255.255.255.255
!
interface Loopback200
ip address 172.16.200.1 255.255.255.255
ip ospf 1 area 0
!
interface Loopback500
ip vrf forwarding TEST1
ip address 192.168.1.2 255.255.255.255
!
interface Tunnel100
ip unnumbered Loopback0
mpls ip
tunnel destination 172.16.100.1
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng path-option 1 explicit name TEST
no routing dynamic
!
interface Serial0/1
ip address 172.16.4.2 255.255.255.252
ip ospf 1 area 0
mpls label protocol ldp
mpls ip
mpls traffic-eng tunnels
serial restart-delay 0
no fair-queue
ip rsvp bandwidth 200 200
ip rsvp resource-provider none
!
interface Serial0/2
ip address 172.16.3.2 255.255.255.252
ip ospf 1 area 0
mpls label protocol ldp
mpls ip
serial restart-delay 0
!
!
router ospf 1
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
log-adjacency-changes
!
router bgp 65500
bgp router-id 172.16.100.2

no bgp default ipv4-unicast


bgp log-neighbor-changes
neighbor 172.16.100.1 remote-as 65500
neighbor 172.16.100.1 update-source Loopback0
!
address-family vpnv4
neighbor 172.16.100.1 activate
neighbor 172.16.100.1 send-community both
exit-address-family
!
address-family ipv4 vrf TEST1
redistribute connected
no synchronization
exit-address-family
!
address-family ipv4 vrf TEST
redistribute connected
no synchronization
exit-address-family
!
ip http server
no ip http secure-server
ip route 172.16.200.200 255.255.255.255 Tunnel100
ip explicit-path name TEST enable
next-address 172.16.4.1
next-address 172.16.1.1
!
mpls ldp router-id Loopback0 force

Você também pode gostar