Saturday, August 13, 2011

Cisco Mpls VPN - VRF Load Balancing and Redundancy

In this lab, we have tested Load Balancing of PE routers according to Vrfs.
PE-1 and PE-2 routers were in the same POP.PE-3 was at the remote POP.PE-1 router is also
Route-Reflector(it is bad design for real world) of all routers.
R1: PE1: 1.1.1.1
R2: PE2: 2.2.2.2
R3: P1: 3.3.3.3
R4: P2: 4.4.4.4
R5 PE3: 5.5.5.5
R6 CE1
R7 CE2
There are two vrfs:
test
test2

For test vrf2, traffic should pass through PE-1
For test vrf, traffic should pass through PE-2







We have configured HSRP to provide loadbalancing and redundancy for incoming traffic to Provider network from the customer.For test vrf`s interface, PE-2 router was active; for test2 vrf`s interface PE-1 router was active.

We have increased weight on PE-1 router (which is also route-reflector) for incoming traffic from other POPs through Mpls backbone.



Here is the configurations:

R1(PE-1):

ip vrf test
 rd 1:1
 route-target export 1:1
 route-target import 1:1
!
ip vrf test2
 rd 1:2
 route-target export 1:2
 route-target import 1:2

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
description Link to R3
 ip address 192.168.13.1 255.255.255.0
 ip ospf network point-to-point
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
description Link to P2
 ip address 192.168.14.1 255.255.255.0
 ip ospf network point-to-point
 duplex auto
 speed auto
 mpls ip

interface Vlan510
 ip address 192.168.12.1 255.255.255.0
 ip ospf network point-to-point
 mpls ip
!
interface Vlan800
 description test-vrf-fw-connection
 ip vrf forwarding test
 ip address 10.10.10.3 255.255.255.248
 load-interval 30
 standby 1 ip 10.10.10.1
!
interface Vlan900
 description test2-vrf-fw-connection
 ip vrf forwarding test2
 ip address 10.10.20.3 255.255.255.248
 load-interval 30
 standby 1 ip 10.10.20.1
 standby 1 priority 150
 standby 1 preempt
!
router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 1
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 1
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 3.3.3.3 remote-as 1
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 4.4.4.4 remote-as 1
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 5.5.5.5 remote-as 1
 neighbor 5.5.5.5 update-source Loopback0
 !
 address-family ipv4
 neighbor 2.2.2.2 activate
 neighbor 2.2.2.2 route-reflector-client
 neighbor 3.3.3.3 activate
 neighbor 3.3.3.3 route-reflector-client
 neighbor 4.4.4.4 activate
 neighbor 4.4.4.4 route-reflector-client
 neighbor 5.5.5.5 activate
 neighbor 5.5.5.5 route-reflector-client
 no auto-summary
 no synchronization
 exit-address-family
 !
 address-family vpnv4
 neighbor 2.2.2.2 activate
 neighbor 2.2.2.2 send-community extended
 neighbor 2.2.2.2 route-reflector-client
 neighbor 2.2.2.2 route-map pe2-in in
 neighbor 3.3.3.3 activate
 neighbor 3.3.3.3 send-community extended
 neighbor 3.3.3.3 route-reflector-client
 neighbor 4.4.4.4 activate
 neighbor 4.4.4.4 send-community extended
 neighbor 4.4.4.4 route-reflector-client
 neighbor 5.5.5.5 activate
 neighbor 5.5.5.5 send-community extended
 neighbor 5.5.5.5 route-reflector-client
 exit-address-family
 !
 address-family ipv4 vrf test2
 redistribute connected
 redistribute static
 default-information originate
 no synchronization
 exit-address-family
 !
 address-family ipv4 vrf test
 redistribute connected
 redistribute static
 default-information originate
 no synchronization
 exit-address-family
!
ip route vrf test 0.0.0.0 0.0.0.0 10.10.10.2
ip route vrf test2 0.0.0.0 0.0.0.0 10.10.20.2
!
ip extcommunity-list 101 permit 1:2[0-9]*
!
ip http server
no ip http secure-server
!
route-map pe2-in permit 10
 match extcommunity 101
 set weight 40000
!
route-map pe2-in permit 20
!
!

R2(PE-2)

ip vrf test
 rd 1:1
 route-target export 1:1
 route-target import 1:1
!
ip vrf test2
 rd 1:2
 route-target export 1:2
 route-target import 1:2
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
description Link to P2
 ip address 192.168.24.2 255.255.255.0
 ip ospf network point-to-point
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
description Link to P1
 ip address 192.168.23.2 255.255.255.0
 ip ospf network point-to-point
 duplex auto
 speed auto
 mpls ip

interface Vlan510
 ip address 192.168.12.2 255.255.255.0
 ip ospf network point-to-point
 mpls ip
!
interface Vlan800
 description test-vrf-fw-connection
 ip vrf forwarding test
 ip address 10.10.10.4 255.255.255.248
 load-interval 30
 standby 1 ip 10.10.10.1
 standby 1 priority 150
 standby 1 preempt
!
interface Vlan900
 description test2-vrf-fw-connection
 ip vrf forwarding test2
 ip address 10.10.20.4 255.255.255.248
 load-interval 30
 standby 1 ip 10.10.20.1
 standby 1 preempt
!
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 1
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 1.1.1.1 activate
 neighbor 1.1.1.1 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf test2
 redistribute connected
 redistribute static
 default-information originate
 no synchronization
 exit-address-family
 !
 address-family ipv4 vrf test
 redistribute connected
 redistribute static
 default-information originate
 no synchronization
 exit-address-family
!
ip route vrf test 0.0.0.0 0.0.0.0 10.10.10.2
ip route vrf test2 0.0.0.0 0.0.0.0 10.10.20.2
!

R3(P1)

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 192.168.13.3 255.255.255.0
 ip ospf network point-to-point
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
 ip address 192.168.23.3 255.255.255.0
 ip ospf network point-to-point
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet1/0
 ip address 192.168.100.3 255.255.255.0
 ip ospf network broadcast
 duplex auto
 speed auto
 mpls ip
!
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 1.1.1.1 activate
 neighbor 1.1.1.1 send-community extended
 exit-address-family

R4(P2)

interface Loopback0
 ip address 4.4.4.4 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 192.168.24.4 255.255.255.0
 ip ospf network point-to-point
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
 ip address 192.168.14.4 255.255.255.0
 ip ospf network point-to-point
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet1/0
 ip address 192.168.100.4 255.255.255.0
 ip ospf network broadcast
 duplex auto
 speed auto
 mpls ip
!
router ospf 1
 router-id 4.4.4.4
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 1.1.1.1 activate
 neighbor 1.1.1.1 send-community extended
 exit-address-family


R5(P3)

ip vrf test
 rd 1:1
 route-target export 1:1
 route-target import 1:1
!
ip vrf test2
 rd 1:2
 route-target export 1:2
 route-target import 1:2
!

interface Loopback0
 ip address 5.5.5.5 255.255.255.255
 ip ospf 1 area 0
!
interface Loopback110
 ip vrf forwarding test
 ip address 110.110.110.110 255.255.255.255
!
interface Loopback120
 ip vrf forwarding test2
 ip address 120.120.120.120 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.100.5 255.255.255.0
 ip ospf network broadcast
 ip ospf priority 0
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router ospf 1
 router-id 5.5.5.5
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 1.1.1.1 activate
 neighbor 1.1.1.1 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf test2
 redistribute connected
 no synchronization
 exit-address-family
 !
 address-family ipv4 vrf test
 redistribute connected
 no synchronization
 exit-address-family
!

CE router/firewalls have just default routes to P network.


Here is RIB tables and HSRP status of PE-1:

PE-1#show 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 10.10.10.2 to network 0.0.0.0
     110.0.0.0/32 is subnetted, 1 subnets
B       110.110.110.110 [200/0] via 5.5.5.5, 01:23:14
     10.0.0.0/29 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, Vlan800
S*   0.0.0.0/0 [1/0] via 10.10.10.2

PE-1#show ip route vrf test2
Routing Table: test2
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 10.10.20.2 to network 0.0.0.0
     10.0.0.0/29 is subnetted, 1 subnets
C       10.10.20.0 is directly connected, Vlan900
     120.0.0.0/32 is subnetted, 1 subnets
B       120.120.120.120 [200/0] via 5.5.5.5, 01:23:17
S*   0.0.0.0/0 [1/0] via 10.10.20.2

PE-1#show ip bgp vpnv4 vrf test
BGP table version is 41, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf test)
r>i0.0.0.0          2.2.2.2                  0    100  40000 ?
r                   10.10.10.2               0         32768 ?
r>i10.10.10.0/29    2.2.2.2                  0    100  40000 ?
r                   0.0.0.0                  0         32768 ?
*>i110.110.110.110/32
                    5.5.5.5                  0    100      0 ?

PE-1#sh ip bgp vpnv4 vrf test2
BGP table version is 41, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:2 (default for vrf test2)
* i0.0.0.0          2.2.2.2                  0    100      0 ?
*>                  10.10.20.2               0         32768 ?
* i10.10.20.0/29    2.2.2.2                  0    100      0 ?
*>                  0.0.0.0                  0         32768 ?
*>i120.120.120.120/32
                    5.5.5.5                  0    100      0 ?


PE-1#show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP    
Vl800       1   100  P Standby  10.10.10.4      local           10.10.10.1    
Vl900       1   150  P Active   local           10.10.20.4      10.10.20.1

Lets check remote RIB and LFIB tables:
PE-3#show 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 2.2.2.2 to network 0.0.0.0
     110.0.0.0/32 is subnetted, 1 subnets
C       110.110.110.110 is directly connected, Loopback110
     10.0.0.0/29 is subnetted, 1 subnets
B       10.10.10.0 [200/0] via 2.2.2.2, 00:03:26
B*   0.0.0.0/0 [200/0] via 2.2.2.2, 00:03:26

PE-3#show ip route vrf test2
Routing Table: test2
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 1.1.1.1 to network 0.0.0.0
     10.0.0.0/29 is subnetted, 1 subnets
B       10.10.20.0 [200/0] via 1.1.1.1, 00:03:29
     120.0.0.0/32 is subnetted, 1 subnets
C       120.120.120.120 is directly connected, Loopback120
B*   0.0.0.0/0 [200/0] via 1.1.1.1, 00:03:29

PE-3#show mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
tag    tag or VC   or Tunnel Id      switched   interface             
16     16          1.1.1.1/32        0          Fa0/0      192.168.100.4
       16          1.1.1.1/32        0          Fa0/0      192.168.100.3
17     17          2.2.2.2/32        0          Fa0/0      192.168.100.4
       17          2.2.2.2/32        0          Fa0/0      192.168.100.3
18     Pop tag     3.3.3.3/32        0          Fa0/0      192.168.100.3
19     Pop tag     4.4.4.4/32        0          Fa0/0      192.168.100.4
20     19          192.168.12.0/24   0          Fa0/0      192.168.100.4
       18          192.168.12.0/24   0          Fa0/0      192.168.100.3
21     Pop tag     192.168.13.0/24   0          Fa0/0      192.168.100.3
22     Pop tag     192.168.14.0/24   0          Fa0/0      192.168.100.4
23     Pop tag     192.168.23.0/24   0          Fa0/0      192.168.100.3
24     Pop tag     192.168.24.0/24   0          Fa0/0      192.168.100.4
25     Aggregate   110.110.110.110/32[V]   \
                                     6528                              
26     Aggregate   120.120.120.120/32[V]   \
Lets check te path:
                                                                 
PE-3#trace vrf test 11.11.11.11 num
Type escape sequence to abort.
Tracing the route to 11.11.11.11
  1 192.168.100.3 [MPLS: Labels 17/16 Exp 0] 284 msec
    192.168.100.4 [MPLS: Labels 17/16 Exp 0] 424 msec
    192.168.100.3 [MPLS: Labels 17/16 Exp 0] 348 msec
  2 10.10.10.4 [MPLS: Label 16 Exp 0] 436 msec 132 msec 168 msec
  3 10.10.10.2 476 msec *  288 msec

PE-3#trace vrf test2 22.22.22.22 num
Type escape sequence to abort.
Tracing the route to 22.22.22.22
  1 192.168.100.4 [MPLS: Labels 16/26 Exp 0] 364 msec
    192.168.100.3 [MPLS: Labels 16/26 Exp 0] 324 msec
    192.168.100.4 [MPLS: Labels 16/26 Exp 0] 384 msec
  2 10.10.20.3 [MPLS: Label 26 Exp 0] 280 msec 212 msec 104 msec
  3 10.10.20.2 320 msec *  512 msec






No comments:

Post a Comment