Sunday 26 August 2012

MPLS VPN Configuration and Tracing LDP Labels

PE Routers
R1 Config

ip vrf one
 rd 1:1
 route-target export 1:1
 route-target import 1:1
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
interface FastEthernet0/0
 ip address 192.168.12.1 255.255.255.0
 mpls ip
interface FastEthernet0/1
 ip vrf forwarding one
 ip address 192.168.15.1 255.255.255.0
router ospf 1
 network 1.1.1.1 0.0.0.0 area 0
 network 192.168.12.1 0.0.0.0 area 0
router bgp 1
 no bgp default ipv4-unicast
 neighbor 4.4.4.4 remote-as 1
 neighbor 4.4.4.4 update-source Loopback0
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community extended
 address-family ipv4 vrf one
  redistribute connected
  redistribute static
ip route vrf one 5.5.5.5 255.255.255.255 192.168.15.5
ip route vrf one 55.55.55.55 255.255.255.255 192.168.15.5

R4 Config

ip vrf one
 rd 1:1
 route-target export 1:1
 route-target import 1:1
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
interface FastEthernet0/0
 ip address 192.168.34.4 255.255.255.0
 mpls ip
interface FastEthernet0/1
 ip vrf forwarding one
 ip address 192.168.46.4 255.255.255.0
router ospf 1
 network 4.4.4.4 0.0.0.0 area 0
 network 192.168.34.4 0.0.0.0 area 0
router bgp 1
 no bgp default ipv4-unicast
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 update-source Loopback0
 address-family vpnv4
  neighbor 1.1.1.1 activate
  neighbor 1.1.1.1 send-community extended
 address-family ipv4 vrf one
  redistribute connected
  redistribute static
ip route vrf one 6.6.6.6 255.255.255.255 192.168.46.6
ip route vrf one 66.66.66.66 255.255.255.255 192.168.46.6

P Routers
R2 Config

interface FastEthernet0/0
 ip address 192.168.12.2 255.255.255.0
 mpls ip
interface FastEthernet0/1
 ip address 192.168.23.2 255.255.255.0
 mpls ip
router ospf 1
 network 192.168.12.2 0.0.0.0 area 0
 network 192.168.23.2 0.0.0.0 area 0

R3 Config

interface FastEthernet0/0
 ip address 192.168.23.3 255.255.255.0
 mpls ip
interface FastEthernet0/1
 ip address 192.168.34.3 255.255.255.0
 mpls ip
router ospf 1
 network 192.168.23.3 0.0.0.0 area 0
 network 192.168.34.3 0.0.0.0 area 0

CE Routers
R5 Config

interface Loopback0
 ip address 5.5.5.5 255.255.255.255
interface Loopback1
 ip address 55.55.55.55 255.255.255.255
interface FastEthernet0/0
 ip address 192.168.15.5 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.15.1

R6 Config

interface Loopback0
 ip address 6.6.6.6 255.255.255.255
interface Loopback1
 ip address 66.66.66.66 255.255.255.255
interface FastEthernet0/0
 ip address 192.168.46.6 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.46.4

Verification

R1#show bgp vpnv4 unicast all summary
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
4.4.4.4         4     1      18      19       13    0    0 00:13:00        3

R1#show bgp vpnv4 unicast all
Route Distinguisher: 1:1 (default for vrf one)
*> 5.5.5.5/32       192.168.15.5             0         32768 ?
*>i6.6.6.6/32       4.4.4.4                  0    100      0 ?
*> 55.55.55.55/32   192.168.15.5             0         32768 ?
*>i66.66.66.66/32   4.4.4.4                  0    100      0 ?
*> 192.168.15.0     0.0.0.0                  0         32768 ?
*>i192.168.46.0     4.4.4.4                  0    100      0 ?


R5#ping 6.6.6.6 source loopback 0
!!!!!


Ingress PE router imposes two labels on the customers data packets when forwarding to the egress PE router. The bottom label in the label stack is called vpnv4 label which is used by the egress PE router sending the packet to the appropriate customer. The top label is called transport label that is used in the provider core for the purpose of switching the packets to the respective PE router.

Tracing the VPNv4 Label

R5#traceroute 6.6.6.6
  1 192.168.15.1 16 msec 28 msec 4 msec
  2 192.168.12.2 [MPLS: Labels 18/19 Exp 0] 80 msec 60 msec 76 msec
  3 192.168.23.3 [MPLS: Labels 18/19 Exp 0] 64 msec 116 msec 60 msec
  4 192.168.46.4 [MPLS: Label 19 Exp 0] 60 msec 68 msec 52 msec
  5 192.168.46.6 88 msec *  140 msec

R1#show bgp vpnv4 unicast vrf one 6.6.6.6
BGP routing table entry for 1:1:6.6.6.6/32, version 5
    4.4.4.4 (metric 31) from 4.4.4.4 (4.4.4.4)
         Extended Community: RT:1:1
      mpls labels in/out nolabel/19

R4#show bgp vpnv4 unicast vrf one labels
 Route Distinguisher: 1:1 (one)
   6.6.6.6/32       192.168.46.6    19/nolabel

Tracing Transport Label

R1#show mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
18     18          4.4.4.4/32        0          Fa0/0      192.168.12.2

R2#show  mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
18     18          4.4.4.4/32        4463       Fa0/1      192.168.23.3

R3#show mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
18     Pop tag     4.4.4.4/32        4748       Fa0/1      192.168.34.4

No comments:

Post a Comment