Wednesday, 28 December 2016

MPLS CHAPTER 8

MPLS CHAPTER 8:
Questions:
27. What keeps your customers routes unique from each other in mBGP ?
28. How do you assign a PE interface to a VRF ?

Solution:
VRF Name        R1-PE           R3-PE
Cust_site1    101:Cust_site1   101:Cust_site1
Cust_site2    102:Cust_site2   102:Cust_site2

Route Distinguisher
Cust_site1    1.1.1.1:1         3.3.3.3:1
Cust_site2    1.1.1.1:2         3.3.3.3:2

Route Targets
Cust_site1 export 1.1.1.1:101   3.3.3.3:101
Cust_site1 import 3.3.3.3:101   1.1.1.1:101
Cust_site2 export 1.1.1.1:102   3.3.3.3:102
Cust_site2 import 3.3.3.3:102   1.1.1.1:102

Attached interface :

Attached interfaces:
Cust_site1  fa0/1          s0/0
Cust_site2  s0/0           f0/0

Flow of traffic: CE-CE

CE Advertised route -> ipv4 route sent from CE to PE ->Recieved on VRF->
-> Exported to BGP as VPNv4 route with RD/RT -> send PE to PE ->
Imported into VRF based on RT -> IPv4 Route sent from PE to CE -> CE learnd route

Let us start the Lab:
How to enable vrf & assign to particular interface:
With our Diagram:



PE0R1(config)#ip vrf Cust_site1
PE0R1(config-vrf)#rd 1.1.1.1:1
PE0R1(config-vrf)#route-target export 1.1.1.1:101
PE0R1(config-vrf)#route-target import 3.3.3.3:101
PE0R1(config)#ip vrf Cust_site2
PE0R1(config-vrf)#rd 1.1.1.1:2
PE0R1(config-vrf)#route-target export 1.1.1.1:102
PE0R1(config-vrf)#route-target import 3.3.3.3:102

PE0R1#sh ip vrf
  Name                             Default RD          Interfaces
  Cust_site1                       1.1.1.1:1
  Cust_site2                       1.1.1.1:2
PE0R1#sh run  | se ip vrf
ip vrf Cust_site1
 rd 1.1.1.1:1
 route-target export 1.1.1.1:101
 route-target import 3.3.3.3:101
ip vrf Cust_site2
 rd 1.1.1.1:2
 route-target export 1.1.1.1:102
 route-target import 3.3.3.3:102
PE0R1#! Assign to particular interface
PE0R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
PE0R1(config)#int fa0/1
PE0R1(config-if)#ip vrf forwarding Cust_site1
% Interface FastEthernet0/1 IP address 10.1.14.1 removed due to enabling VRF Cust_site1
PE0R1(config-if)#ip add 10.1.14.1 255.255.255.0
PE0R1(config-if)#int s0/0
PE0R1(config-if)#ip vrf forwarding Cust_site2
% Interface Serial0/0 IP address 10.1.15.1 removed due to enabling VRF Cust_site2
PE0R1(config-if)#ip add 10.1.15.1 255.255.255.0
PE0R1(config-if)#do sh ip vrf
  Name                             Default RD          Interfaces
  Cust_site1                       1.1.1.1:1           Fa0/1
  Cust_site2                       1.1.1.1:2           Se0/0


PE0R3(config)#ip vrf Cust_site1
PE0R3(config-vrf)#rd 3.3.3.3:1
PE0R3(config-vrf)#route-target import 1.1.1.1:101
PE0R3(config-vrf)#route-target export 3.3.3.3:101
PE0R3(config-vrf)#ip vrf Cust_site2
PE0R3(config-vrf)#rd 3.3.3.3:2
PE0R3(config-vrf)#route-target import 1.1.1.1:102
PE0R3(config-vrf)#route-target export 3.3.3.3:102
PE0R3(config-vrf)#int s0/0
PE0R3(config-if)#ip vrf forwarding Cust_site1
% Interface Serial0/0 IP address 10.1.36.3 removed due to enabling VRF Cust_site1
PE0R3(config-if)#ip add 10.1.36.3 255.255.255.0
PE0R3(config-if)#int fa0/0
PE0R3(config-if)#ip vrf forwarding Cust_site2
% Interface FastEthernet0/0 IP address 10.1.37.3 removed due to enabling VRF Cust_site2
PE0R3(config-if)#ip add 10.1.37.3 255.255.255.0
PE0R3(config-if)#no sh
PE0R3(config-if)#do sh ip vrf
  Name                             Default RD          Interfaces
  Cust_site1                       3.3.3.3:1           Se0/0
  Cust_site2                       3.3.3.3:2           Fa0/0

PE0R3#sh ip vrf detail
VRF Cust_site1; default RD 3.3.3.3:1; default VPNID <not set>
  Interfaces:
    Se0/0
  Connected addresses are not in global routing table
  Export VPN route-target communities
    RT:3.3.3.3:101
  Import VPN route-target communities
    RT:1.1.1.1:101
  No import route-map
  No export route-map
  VRF label distribution protocol: not configured
VRF Cust_site2; default RD 3.3.3.3:2; default VPNID <not set>
  Interfaces:
    Fa0/0
  Connected addresses are not in global routing table
  Export VPN route-target communities
    RT:3.3.3.3:102
  Import VPN route-target communities
    RT:1.1.1.1:102
  No import route-map
  No export route-map
  VRF label distribution protocol: not configured

No comments:

Post a Comment