Evil_TTL> show | s

MPLS VPN L3

Category:Cisco Systems -> Routing and Switching

MPLS-VPN-L3.jpg

CE1_R1

router ospf 1
 router
-id 9.9.9.9
 log
-adjacency-changes
 redistribute connected
 network 192.168.1.0 0.0.0.3 area 1
 network 192.168.2.0 0.0.0.3 area 0 

CE1_R2

router ospf 1
 router
-id 7.7.7.7
 log
-adjacency-changes
 network 7.7.7.7 0.0.0.0 area 3
 network 192.168.6.0 0.0.0.3 area 0 

PE1

ip vrf Customer_1
 rd 65000
:1
 route
-target export 65000:1
 route
-target import 65000:1

interface FastEthernet0/1
 ip vrf forwarding Customer_1
 ip address 192.168.2.2 255.255.255.252
 duplex auto
 speed auto
 mpls ip
!
interface 
FastEthernet1/0
 ip address 192.168.5.1 255.255.255.252
 duplex auto
 speed auto
 mpls ip
!
router ospf 2 vrf Customer_1
 log
-adjacency-changes
 redistribute bgp 65000 subnets
 network 192.168.2.0 0.0.0.3 area 0

router ospf 1
 router
-id 10.10.10.10
 log
-adjacency-changes
 network 10.10.10.10 0.0.0.0 area 0
 network 192.168.5.0 0.0.0.255 area 0
 network 192.168.7.0 0.0.0.255 area 0
!
router bgp 65000
 no synchronization
 bgp log
-neighbor-changes
 redistribute connected
 neighbor 4.4.4.4 remote
-as 65000
 neighbor 4.4.4.4 update
-source Loopback0
 no auto
-summary
 
!
 
address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send
-community both
 
exit-address-family
 
!
 
address-family ipv4 vrf Customer_1
  redistribute ospf 2 vrf Customer_1 match internal external 1 external 2
  no synchronization
 
exit-address-family 

PE2

ip vrf Customer_1
 rd 65000
:1
 route
-target export 65000:1
 route
-target import 65000:1

interface FastEthernet0/0
 ip vrf forwarding Customer_1
 ip address 192.168.6.2 255.255.255.252
 duplex auto
 speed auto
 mpls ip
!
interface 
FastEthernet0/1
 ip address 192.168.4.2 255.255.255.252
 duplex auto
 speed auto
 mpls ip

router ospf 2 vrf Customer_1
 log
-adjacency-changes
 redistribute bgp 65000 subnets
 network 192.168.6.0 0.0.0.3 area 0
!
router ospf 1
 router
-id 4.4.4.4
 log
-adjacency-changes
 network 4.4.4.4 0.0.0.0 area 0
 network 192.168.4.0 0.0.0.3 area 0
 network 192.168.7.0 0.0.0.3 area 0
!
router bgp 65000
 no synchronization
 bgp log
-neighbor-changes
 redistribute connected
 neighbor 10.10.10.10 remote
-as 65000
 neighbor 10.10.10.10 update
-source Loopback0
 no auto
-summary
 
!
 
address-family vpnv4
  neighbor 10.10.10.10 activate
  neighbor 10.10.10.10 send
-community both
 
exit-address-family
 
!
 
address-family ipv4 vrf Customer_1
  redistribute ospf 2 vrf Customer_1 match internal external 1 external 2
  no synchronization
 
exit-address-family 


P1

interface FastEthernet0/0
 ip address 192.168.5.2 255.255.255.252
 duplex auto
 speed auto
 mpls ip
!
interface 
FastEthernet0/1
 ip address 192.168.4.1 255.255.255.252
 duplex auto
 speed auto
 mpls ip

router ospf 1
 router
-id 8.8.8.8
 log
-adjacency-changes
 network 8.8.8.8 0.0.0.0 area 0
 network 192.168.4.0 0.0.0.3 area 0
 network 192.168.5.0 0.0.0.3 area 0

mpls ldp router
-id Loopback0



P1
(config-router)#
*Mar  1 00:10:18.763: %LDP-5-NBRCHGLDP Neighbor 10.10.10.10:(1is UP
*Mar  1 00:10:19.047: %LDP-5-NBRCHGLDP Neighbor 4.4.4.4:(2is UP

P1
#sh mpls ldp neighbor
    
Peer LDP Ident10.10.10.10:0Local LDP Ident 8.8.8.8:0
        TCP connection
10.10.10.10.40832 8.8.8.8.646
        State
OperMsgs sent/rcvd9/11Downstream
        Up time
00:00:36
        LDP discovery sources
:
          
FastEthernet0/0Src IP addr192.168.5.1
        Addresses bound to peer LDP Ident
:
          
192.168.3.1     192.168.5.1     10.10.10.10     4.2.2.2
          192.168.7.1
    Peer LDP Ident
4.4.4.4:0Local LDP Ident 8.8.8.8:0
        TCP connection
4.4.4.4.646 8.8.8.8.25633
        State
OperMsgs sent/rcvd9/9Downstream
        Up time
00:00:36
        LDP discovery sources
:
          
FastEthernet0/1Src IP addr192.168.4.2
        Addresses bound to peer LDP Ident
:
          
192.168.4.2     4.4.4.4         192.168.7.2 

R1

R1#trace 7.7.7.7

Type escape sequence to abort.
Tracing the route to 7.7.7.7

  1 192.168.1.1 48 msec 72 msec 32 msec
  2 192.168.2.2 160 msec 156 msec 160 msec
  3 192.168.5.2 [MPLS
Labels 17/19 Exp 0] 268 msec 156 msec 196 msec
  4 192.168.6.2 [MPLS
Label 19 Exp 0] 268 msec 156 msec 232 msec
  5 192.168.6.1 228 msec 
*  260 msec
R1

Also see MPLS VPN L2 Point to Point
Alternate approach: File:MPLS_VPN_L3.zip

By privilege15