Monday, August 8, 2011

VRF Lite with Route leaking on the Nexus 7000

Here is an example of route leaking with VRF on the Nexus 7k running 5.2 code. In this example I had 12 CUSTOMER VRFs and provided leaking all VRF routes into the CUSTOMER1 VRF and then only leaking CUSTOMER1 routes into CUSTOMER2.



!Command: show running-config bgp
!Time: Fri Aug  5 15:47:30 2011

version 5.2(1)
feature bgp

vrf context CUSTOMER1
  address-family ipv4 unicast
    route-target import 1:1
    route-target import 1:10
    route-target import 1:11
    route-target import 1:12
    route-target import 1:2
    route-target import 1:3
    route-target import 1:4
    route-target import 1:5
    route-target import 1:6
    route-target import 1:7
    route-target import 1:8
    route-target import 1:9
    route-target export 1:1
vrf context CUSTOMER2
  address-family ipv4 unicast
    route-target import 1:1
    route-target import 1:2
    route-target export 1:2
vrf context CUSTOMER3
  address-family ipv4 unicast
    route-target import 1:3
    route-target export 1:3
vrf context CUSTOMER4
  address-family ipv4 unicast
    route-target import 1:4
    route-target export 1:4
vrf context CUSTOMER5
  address-family ipv4 unicast
    route-target import 1:5
    route-target export 1:5
vrf context CUSTOMER6
  address-family ipv4 unicast
    route-target import 1:6
    route-target export 1:6
vrf context CUSTOMER7
  address-family ipv4 unicast
    route-target import 1:7
    route-target export 1:7
vrf context CUSTOMER8
  address-family ipv4 unicast
    route-target import 1:8
    route-target export 1:8
vrf context CUSTOMER9
  address-family ipv4 unicast
    route-target import 1:9
    route-target export 1:9
vrf context CUSTOMER10
  address-family ipv4 unicast
    route-target import 1:10
    route-target export 1:10
vrf context CUSTOMER11
  address-family ipv4 unicast
    route-target import 1:11
    route-target export 1:11
vrf context CUSTOMER12
  address-family ipv4 unicast
    route-target import 1:12
    route-target export 1:12
router bgp 65100
  vrf CUSTOMER1
    address-family ipv4 unicast
      network 10.1.191.0/24
      network 10.1.193.0/24
  vrf CUSTOMER10
    address-family ipv4 unicast
      network 10.1.200.0/24
  vrf CUSTOMER11
    address-family ipv4 unicast
      network 10.1.201.0/24
  vrf CUSTOMER12
    address-family ipv4 unicast
      network 10.1.202.0/24
  vrf CUSTOMER2
    address-family ipv4 unicast
      network 10.1.192.0/24
      redistribute static route-map test
  vrf CUSTOMER3
    address-family ipv4 unicast
      network 10.1.193.0/24
  vrf CUSTOMER4
    address-family ipv4 unicast
      network 10.1.194.0/24
  vrf CUSTOMER5
    address-family ipv4 unicast
      network 10.1.195.0/24
  vrf CUSTOMER6
    address-family ipv4 unicast
      network 10.1.196.0/24
  vrf CUSTOMER7
    address-family ipv4 unicast
      network 10.1.197.0/24
  vrf CUSTOMER8
    address-family ipv4 unicast
      network 10.1.198.0/24
  vrf CUSTOMER9
    address-family ipv4 unicast
      network 10.1.199.0/24


NEXUS7K#show ip route vrf CUSTOMER1
IP Route Table for VRF "CUSTOMER1"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
10.1.191.0/24, ubest/mbest: 1/0, attached
    *via 10.1.191.192, Vlan301, [0/0], 00:12:55, direct
10.1.191.192/32, ubest/mbest: 1/0, attached
    *via 10.1.191.192, Vlan301, [0/0], 00:12:55, local
10.1.192.0/24, ubest/mbest: 1/0, attached
    *via 10.1.192.192%CUSTOMER2, Vlan302, [20/0], 00:10:17, bgp-65100, external, tag 65100
10.1.194.0/24, ubest/mbest: 1/0, attached
    *via 10.1.194.194%CUSTOMER4, Vlan304, [20/0], 00:10:17, bgp-65100, external, tag 65100
10.1.195.0/24, ubest/mbest: 1/0, attached
    *via 10.1.195.195%CUSTOMER5, Vlan305, [20/0], 00:10:17, bgp-65100, external, tag 65100
10.1.196.0/24, ubest/mbest: 1/0, attached
    *via 10.1.196.196%CUSTOMER6, Vlan306, [20/0], 00:10:17, bgp-65100, external, tag 65100
10.1.197.0/24, ubest/mbest: 1/0, attached
    *via 10.1.197.197%CUSTOMER7, Vlan307, [20/0], 00:10:16, bgp-65100, external, tag 65100
10.1.198.0/24, ubest/mbest: 1/0, attached
    *via 10.1.198.198%CUSTOMER8, Vlan308, [20/0], 00:10:16, bgp-65100, external, tag 65100
10.1.199.0/24, ubest/mbest: 1/0, attached
    *via 10.1.199.199%CUSTOMER9, Vlan309, [20/0], 00:10:16, bgp-65100, external, tag 65100
10.1.200.0/24, ubest/mbest: 1/0, attached
    *via 10.1.200.200%CUSTOMER10, Vlan310, [20/0], 00:10:16, bgp-65100, external, tag 65100
10.1.201.0/24, ubest/mbest: 1/0, attached
    *via 10.1.201.201%CUSTOMER11, Vlan311, [20/0], 00:10:16, bgp-65100, external, tag 65100
10.1.202.0/24, ubest/mbest: 1/0, attached
    *via 10.1.202.202%CUSTOMER12, Vlan312, [20/0], 00:10:16, bgp-65100, external, tag 65100

NEXUS7K# sh ip route vrf CUSTOMER2
IP Route Table for VRF "CUSTOMER2"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]

10.1.191.0/24, ubest/mbest: 1/0, attached
    *via 10.1.191.192%CUSTOMER1, Vlan301, [20/0], 17:31:51, bgp-65100, external, tag 65100
10.1.192.0/24, ubest/mbest: 1/0, attached
    *via 10.1.192.192, Vlan302, [0/0], 17:40:39, direct
10.1.192.192/32, ubest/mbest: 1/0, attached
    *via 10.1.192.192, Vlan302, [0/0], 17:40:39, local

No comments:

Post a Comment