My Countingdown

Friday, December 16, 2011

Lab 2. MPLS VPN

Here step-by-step configuration MPLS VPN:
In PE Router:
  1. Create VRF
  2. Activate VRF in interface that connected to CE Router and then add IP address
  3. Activate MP-BGP
  4. Activate routing PE-CE
In CE Router:
  1. Add IP address in CE
  2. Configure default route or routing CE-PE

Let’s take example

PE1#
ip vrf BRI_1                    ---- > create vrf. In vrf there are rd & route-target need to be set
 rd 65000:1
 route-target export 65000:1
 route-target import 65000:1
!
interface Loopback1        ---- > this loopback just for testing the vpn vrf BRI_1
 ip vrf forwarding BRI_1       
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/1
 description ###Link to BRI1###
 ip vrf forwarding BRI_1     --- > activate vrf in interface to CE then add ip address
 ip address 192.168.0.1 255.255.255.252
!
router bgp 65000
 address-family vpnv4        ---- > activate MP-BGP
  neighbor 10.10.10.2 activate
  neighbor 10.10.10.2 send-community extended
  neighbor 10.10.10.2 next-hop-self

PE2#
ip vrf BRI_2
 rd 65000:1
 route-target export 65000:1
 route-target import 65000:1
!
interface Loopback0
 ip address 10.10.10.2 255.255.255.255
!
interface Loopback2
 ip vrf forwarding BRI_2
 ip address 22.22.22.22 255.255.255.255
!
interface FastEthernet0/1
 description ###Link to BRI2###
 ip vrf forwarding BRI_2
 ip address 192.168.0.5 255.255.255.252
!
router bgp 65000
 address-family vpnv4
  neighbor 10.10.10.1 activate
  neighbor 10.10.10.1 send-community extended
  neighbor 10.10.10.1 next-hop-self

Please verify vrf

PE1#show ip vrf interfaces | s BRI
Lo1                    1.1.1.1             BRI_1                            up
Fa0/1                  92.168.0.1      BRI_1                            up

PE1#show ip vrf | s BRI
  BRI_1                            65000:1             Lo1
                                                                  Fa0/1

PE1#show ip vrf detail | s BRI
VRF BRI_1; default RD 65000:1; default VPNID <not set>
  Interfaces:
    Lo1                      Fa0/1
  Connected addresses are not in global routing table
  Export VPN route-target communities
    RT:65000:1
  Import VPN route-target communities
    RT:65000:1
  No import route-map
  No export route-map
  VRF label distribution protocol: not configured
  VRF label allocation mode: per-prefix

1 comment:

  1. There are few bits missing from BGP.
    Neighbor statements should be added to BGP outside vpnv4:

    #PE1
    router bgp 65000
    neighbor 10.10.10.2 remote-as 65000
    neighbor 10.10.10.2 update-source lo0

    address-family vpnv4
    neighbor 10.10.10.2 activate
    neighbor 10.10.10.2 send-community extended
    neighbor 10.10.10.2 next-hop-self

    #PE2
    router bgp 65000
    neighbor 10.10.10.1 remote-as 65000
    neighbor 10.10.10.1 update-source lo0

    address-family vpnv4
    neighbor 10.10.10.1 activate
    neighbor 10.10.10.1 send-community extended
    neighbor 10.10.10.1 next-hop-self

    ReplyDelete